1 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3 * linux-low.c (handle_extended_wait, linux_create_inferior)
4 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5 (dequeue_one_deferred_signal, linux_resume_one_thread)
6 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7 (linux_tracefork_grandchild, linux_test_for_tracefork)
8 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10 where the argument is 0.
12 2013-01-25 Yao Qi <yao@codesourcery.com>
14 * event-loop.c: Include "queue.h".
15 (gdb_event_p): New typedef.
16 (struct gdb_event) <next_event>: Remove.
17 (event_queue): Change to QUEUE(gdb_event_p).
18 (async_queue_event): Remove.
19 (gdb_event_xfree): New.
20 (initialize_event_loop): New.
21 (process_event): Use API from QUEUE.
22 (wait_for_event): Likewise.
23 * server.c (main): Call initialize_event_loop.
24 * server.h (initialize_event_loop): Declare.
26 2013-01-18 Yao Qi <yao@codesourcery.com>
28 * ax.h (struct eval_agent_expr_context): New.
29 (gdb_eval_agent_expr): Update declaration.
30 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
31 TFRAME. Add new argument CTX.
32 * server.h (struct eval_agent_expr_context): Declare.
33 (agent_mem_read, agent_tsv_read): Update declaration.
34 (agent_mem_read_string): Likewise.
35 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
36 (add_traceframe_block): Add new argument TPOINT.
37 Increase TPOINT->traceframe_usage.
38 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
39 eval_tracepoint_agent_expr.
40 (condition_true_at_tracepoint): Likewise.
41 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
42 (agent_mem_read_string, agent_tsv_read): Likewise.
44 2013-01-16 Yao Qi <yao@codesourcery.com>
46 * linux-low.c (linux_resume_one_lwp): Don't check
47 'lwp->bp_reinsert != 0'.
49 2013-01-07 Joel Brobecker <brobecker@adacore.com>
50 Pedro Alves <palves@redhat.com>
52 * lynx-low.c (ptrace_request_to_str): Define a temporary
53 macro and use it to simplify this function's implementation.
55 2013-01-07 Joel Brobecker <brobecker@adacore.com>
57 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
60 2013-01-07 Joel Brobecker <brobecker@adacore.com>
62 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
64 2013-01-07 Joel Brobecker <brobecker@adacore.com>
66 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
68 2013-01-07 Joel Brobecker <brobecker@adacore.com>
70 * lynx-low.c (lynx_resume): Use the resume_info parameter
71 to determine the ptid for the lynx_ptrace call, unless
72 it is equal to minus_one_ptid, in which case we use the
73 ptid of the current_inferior.
74 (lynx_wait_1): After having received a thread create/exit
75 event, resume the inferior's execution using the signaling
76 thread's ptid, rather than the old ptid.
78 2013-01-07 Joel Brobecker <brobecker@adacore.com>
80 * lynx-low.c (lynx_resume): Delete variable ret.
82 2013-01-01 Joel Brobecker <brobecker@adacore.com>
84 * gdbreplay.c (gdbreplay_version): Update copyright year.
85 * server.c (gdbserver_version): Likewise.
87 2012-12-17 Joel Brobecker <brobecker@adacore.com>
89 * lynx-low.c (lynx_wait_1): Add debug trace before adding
92 2012-12-17 Joel Brobecker <brobecker@adacore.com>
94 * lynx-low.c (ptrace_request_to_str): Add handling for
97 2012-12-17 Joel Brobecker <brobecker@adacore.com>
99 * lynx-low.c (lynx_attach): Delete variable new_process.
101 2012-12-17 Joel Brobecker <brobecker@adacore.com>
103 * lynx-low.c (lynx_create_inferior): Delete variable
106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
108 * lynx-low.c (ptrace_request_to_str): Do not handle
109 PTRACE_GETTHREADLIST if this macro does not exist.
111 2012-12-15 Yao Qi <yao@codesourcery.com>
113 * Makefile.in (OBS): Add notif.o.
114 * notif.c, notif.h: New.
115 * server.c: Include "notif.h".
116 (struct vstop_notif) <next>: Remove.
118 (queue_stop_reply): Update.
119 (push_event, send_next_stop_reply): Remove.
120 (discard_queued_stop_replies): Update.
121 (notif_stop): New variable.
122 (handle_v_stopped): Remove.
123 (handle_v_requests): Don't call handle_v_stopped. Call
124 handle_ack_notif instead.
125 (queue_stop_reply_callback): Call notif_event_enque instead
127 (handle_status): Don't call send_next_stop_reply, call
128 notif_write_event instead.
129 (kill_inferior_callback): Likewise.
130 (detach_or_kill_inferior_callback): Likewise.
131 (main): Call initialize_notif.
132 (process_serial_event): Call QUEUE_is_empty.
133 (handle_target_event): Call notif_push instead of push event.
134 * server.h (push_event): Remove declaration.
136 2012-12-10 Tom Tromey <tromey@redhat.com>
138 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
139 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
142 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
143 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
144 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
145 (amd64-linux-ipa.o, ax.o): Rewrite.
146 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
147 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
148 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
149 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
150 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
151 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
152 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
153 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
154 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
155 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
156 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
157 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
158 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
159 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
160 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
161 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
162 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
163 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
164 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
165 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
166 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
167 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
168 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
169 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
170 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
171 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
172 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
173 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
174 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
175 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
176 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
177 (reg-tilegx.o): Remove.
178 (all_object_files): New macro.
180 * aclocal.m4, configure: Rebuild.
181 * acinclude.m4: Include depstand.m4, lead-dot.m4.
182 * configure.ac: Invoke ZW_CREATE_DEPDIR,
183 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
185 2012-12-05 Tom Tromey <tromey@redhat.com>
188 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
190 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
192 * configure.ac: Check for linux/perf_event.h.
193 * config.in: Regenerated.
194 * configure: Regenerated.
196 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
198 * hostio.c (handle_readlink): Decrease buffer size
199 parameter passed to readlink by one byte.
201 2012-11-26 Yao Qi <yao@codesourcery.com>
203 * configure.ac (build_warnings): Append '-Wempty-body'.
204 * configure: Regenerated.
205 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
208 2012-11-15 Pierre Muller <muller@sourceware.org>
210 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
211 * config.in: Regenerate.
212 * configure: Regenerate.
213 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
214 Use "gdb_wait.h" header instead of <sys/wait.h> header.
215 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
216 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
218 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
219 instead of <sys/wait.h> header.
220 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
222 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
224 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
225 (various make rules): Remove -DGDBSERVER
227 2012-11-09 Yao Qi <yao@codesourcery.com>
229 * spu-low.c (current_ptid): Move it to ..
230 * gdbthread.h: ... here. New.
231 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
232 * server.c (myresume, process_serial_event): Likewise.
233 * thread-db.c (thread_db_find_new_threads): Likewise.
234 * tracepoint.c (run_inferior_command): Likewise.
236 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
238 * server.c (handle_search_memory_1): Include access length in
241 2012-09-05 Michael Brandt <michael.brandt@axis.com>
243 * linux-crisv32-low.c: Fix compile errors.
245 2012-09-04 Yao Qi <yao@codesourcery.com>
247 * tracepoint.c (cmd_qtsv): Adjust debug message.
248 Don't check CUR_TPOINT.
250 2012-08-28 Yao Qi <yao@codesourcery.com>
252 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
253 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
254 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
255 Remove declarations of xmalloc, xreallloc, xstrdup and
257 * Makefile.in (libiberty_h): New.
258 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
259 (linux-bfin-low.o): Append dependency 'libiberty.h'.
261 2012-08-23 Yao Qi <yao@codesourcery.com>
263 * server.h: Remove declaration of 'xsnprintf'.
265 2012-08-22 Keith Seitz <keiths@redhat.com>
267 * server.h: Include build-gnulib-gbserver/config.h.
268 * gdbreplay.c: Likewise.
270 2012-08-08 Doug Evans <dje@google.com>
272 * Makefile.in (SFILES): Add gdb_vecs.c.
273 (OBS): Add gdb_vecs.o.
274 (gdb_vecs_h, host_defs_h): New variables.
275 (thread-db.o): Add $(gdb_vecs_h) dependency.
276 (gdb_vecs.o): New rule.
277 * thread-db.c: #include "gdb_vecs.h".
278 (thread_db_load_search): Use a vector to iterate over path elements.
279 Handle text appearing after "$pdir".
281 * configure.ac: Add check for strstr.
282 * config.in: Regenerate.
283 * configure: Regenerate.
285 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
287 * hostio.c (handle_pread): If pread fails, fall back to attempting
289 (handle_pwrite): Likewise for pwrite.
291 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
293 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
294 between unsupported TYPE and unimplementable ADDR/LEN combination.
295 (arm_insert_point): Act on new return value.
297 2012-07-31 Pedro Alves <palves@redhat.com>
299 * server.c (process_point_options): Only skip tokens if we find
300 one that is unrecognized. Don't treat 'X' specially while
301 skipping unrecognized tokens.
303 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
305 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
306 to 4-byte-align HW breakpoint addresses for Thumb.
308 2012-07-27 Yao Qi <yao@codesourcery.com>
312 * server.h: Declare gdb_agent_about_to_close.
313 * target.c (kill_inferior): Include "agent.h".
314 New. Send command 'kill'.
315 * target.h (kill_inferior): Removed macro.
316 * tracepoint.c (gdb_agent_about_to_close): New.
317 (gdb_agent_helper_thread): Handle command 'close'.
318 Wait endlessly until the inferior stops.
319 Install gdb_agent_remove_socket to atexit hook.
320 (agent_socket_name): New static variable.
321 (gdb_agent_socket_init): Replace local variable 'name' with
323 (gdb_agent_remove_socket): New.
325 2012-07-27 Yao Qi <yao@codesourcery.com>
327 * server.c (process_point_options): Stop at 'X' when parsing.
329 2012-07-19 Michael Eager <eager@eagercon.com>
331 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
333 * linux-x86-low.c (x86_insert_point, x86_remove_point):
334 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
337 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
339 * gdbserver/linux-low.c (initialize_low): Call
340 linux_ptrace_init_warnings.
342 2012-07-02 Doug Evans <dje@google.com>
344 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
347 2012-07-02 Stan Shebs <stan@codesourcery.com>
349 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
350 (ax.o): Add it to build rule.
353 (IPA_OBS): Add format.o.
354 * server.c (handle_query): Claim support for breakpoint commands.
355 (process_point_options): Add command case.
356 (process_serial_event): Leave running if there are printfs in
358 * mem-break.h (any_persistent_commands): Declare.
359 (add_breakpoint_commands): Declare.
360 (gdb_no_commands_at_breakpoint): Declare.
361 (run_breakpoint_commands): Declare.
362 * mem-break.c (struct point_command_list): New struct.
363 (struct breakpoint): New field command_list.
364 (any_persistent_commands): New function.
365 (add_commands_to_breakpoint): New function.
366 (add_breakpoint_commands): New function.
367 (gdb_no_commands_at_breakpoint): New function.
368 (run_breakpoint_commands): New function.
369 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
371 * ax.c: Include format.h.
372 (ax_printf): New function.
373 (gdb_eval_agent_expr): Add printf opcode.
375 2012-06-13 Yao Qi <yao@codesourcery.com>
377 * server.c (start_inferior): Remove duplicated writes to fields
378 'last_resume_kind' and 'last_status' of 'current_inferior'.
380 2012-06-12 Yao Qi <yao@codesourcery.com>
381 Pedro Alves <palves@redhat.com>
383 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
385 * server.c (handle_v_cont): Extend comment.
387 2012-06-11 Yao Qi <yao@codesourcery.com>
389 * linux-low.c (linux_attach): Add 'static'.
391 2012-06-06 Yao Qi <yao@codesourcery.com>
393 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
395 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
397 Fix gcc -flto compilation warning.
398 * server.c (main): Make variable multi_mode and attach volatile.
400 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
402 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
403 if the platform doesn't know about it.
405 2012-05-30 Jeff Kenton <jkenton@tilera.com>
407 * Makefile.in (SFILES): Add linux-tile-low.c.
408 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
409 * configure.srv: Handle tilegx-*-linux*.
410 * linux-tile-low.c: New file.
412 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
414 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
416 2012-05-24 Pedro Alves <palves@redhat.com>
420 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
422 2012-05-24 Pedro Alves <palves@redhat.com>
426 Replace target_signal with gdb_signal throughout.
428 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
430 * linux-low.c (linux_store_registers): Avoid the copying sequence
431 when no data has been retrieved by ptrace.
433 2012-05-22 Will Deacon <will.deacon@arm.com>
435 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
436 Include asm/ptrace.h.
437 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
440 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
442 * linux-low.c (linux_store_registers): Don't re-retrieve data
443 with ptrace that has already been obtained from /proc. Always
444 copy any data retrieved with ptrace to the buffer supplied.
446 2012-05-11 Yao Qi <yao@codesourcery.com>
447 Pedro Alves <palves@redhat.com>
449 * linux-low.c (enum stopping_threads_kind): New.
450 (stopping_threads): Change type to `enum stopping_threads_kind'.
451 (handle_extended_wait): If stopping and suspending threads, leave
452 the new_lwp suspended too.
453 (linux_wait_for_event): Adjust.
454 (stop_all_lwps): Set `stopping_threads' to
455 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
456 whether we're suspending threads or just stopping them. Assert no
459 2012-04-29 Yao Qi <yao@codesourcery.com>
461 * server.h: Move some code to ...
462 * gdbthread.h: ... here. New.
463 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
464 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
465 (nto-low.o, win32-low.o): Likewise.
466 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
467 * regcache.c, remote-utils.c, server.c: Likewise.
468 * target.c, tracepoint.c, win32-low.c: Likewise.
470 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
472 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
473 (PTRACE_ARG4_TYPE): Likewise.
474 (PTRACE_XFER_TYPE): Likewise.
475 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
476 ptrace to PTRACE_ARG3_TYPE.
477 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
478 (PTRACE_ARG4_TYPE): Likewise.
479 (PTRACE_XFER_TYPE): Likewise.
480 (linux_detach_one_lwp): Cast fourth argument of
481 ptrace to long then PTRACE_ARG4_TYPE.
482 (regsets_fetch_inferior_registers): Cast third argument of
483 ptrace to long then PTRACE_ARG3_TYPE.
484 (regsets_store_inferior_registers): Likewise.
486 2012-04-20 Pedro Alves <palves@redhat.com>
488 * configure: Regenerate.
490 2012-04-19 Pedro Alves <palves@redhat.com>
492 * Makefile.in (GNULIB_BUILDDIR): New.
493 (LIBGNU, INCGNU, GNULIB_H): Adjust.
494 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
495 (all, install-only, uninstall, clean-info, all-lib, clean): No
496 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
497 (maintainer-clean realclean distclean): Use subdir_do.
499 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
500 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
501 * acinclude.m4: Include acx_configure_dir.m4.
502 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
503 calls. Call AC_PROG_RANLIB. Configure gnulib using
506 (GNULIB_STDINT_H): Adjust.
507 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
508 * gdbreplay.c: Include build-gnulib/config.h.
509 * server.h: Likewise.
510 * aclocal.m4: Regenerate.
511 * config.in: Regenerate.
512 * configure: Regenerate.
514 2012-04-19 Pedro Alves <palves@redhat.com>
516 * Makefile.in (LIBGNU, INCGNU): Adjust.
517 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
518 (all, install-only, uninstall, clean-info, all-lib, clean)
519 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
520 * configure.ac: Adjust AC_OUTPUT output.
521 * aclocal.m4: Regenerate.
522 * configure: Regenerate.
524 2012-04-19 Pedro Alves <palves@redhat.com>
526 * Makefile.in (generated_files): New.
527 (server_h): Remove the explicit dependency on config.h, and depend
530 2012-04-19 Pedro Alves <palves@redhat.com>
532 * Makefile.in (INCGNU): Add -Ignulib.
534 2012-04-19 Pedro Alves <palves@redhat.com>
536 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
537 (INCGNU): ... this, and spell out -I here.
538 (GNULIB_LIB): Rename to ...
540 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
542 2012-04-19 Pedro Alves <palves@redhat.com>
544 * config.in: Regenerate.
546 2012-04-19 Pedro Alves <palves@redhat.com>
548 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
549 * server.h (memmem): Remove declaration.
550 * config.in: Regenerate.
551 * configure: Regenerate.
553 2012-04-19 Yao Qi <yao@codesourcery.com>
555 * Makefile.in (SFILES): Add common/vec.c.
559 2012-04-19 Yao Qi <yao@codesourcery.com>
561 * remote-utils.c (prepare_resume_reply): Replace with macro
562 target_core_of_thread.
563 * server.c (handle_qxfer_threads_proper): Likewise.
564 * target.h (traget_core_of_thread): New macro.
566 2012-04-18 Pedro Alves <palves@redhat.com>
568 * aclocal.m4: Regenerate.
569 * configure: Regenerate.
571 2012-04-16 Yao Qi <yao@codesourcery.com>
573 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
574 duplicated on address.
576 2012-04-16 Yao Qi <yao@codesourcery.com>
578 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
579 (struct tracepoint_action_ops) <send>: New field.
580 (m_tracepoint_action_send, r_tracepoint_action_send): New.
581 (agent_expr_send, x_tracepoint_action_send): New.
582 (l_tracepoint_action_send): New.
583 (cmd_qtdp): Download and install tracepoint
584 according to `use_agent'.
585 (run_inferior_command): Add one more parameter `len'.
587 (tracepoint_send_agent): New.
588 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
590 2012-04-16 Yao Qi <yao@codesourcery.com>
592 * tracepoint.c (download_tracepoints): Moved to ...
593 (cmd_qtstart): ... here.
595 2012-04-14 Yao Qi <yao@codesourcery.com>
597 * tracepoint.c: Include inttypes.h.
598 (struct collect_memory_action): Use sized types.
599 (struct tracepoint): Likewise.
600 (cmd_qtdp, stop_tracing): Update print specifiers.
601 (cmd_qtp, response_tracepoint): Likewise.
602 (collect_data_at_tracepoint): Likewise.
603 (collect_data_at_step): Likewise.
605 2012-04-14 Yao Qi <yao@codesourcery.com>
607 Import gnulib module inttypes.
608 * aclocal.m4, config.in, configure: Regenerated.
610 2012-04-14 Yao Qi <yao@codesourcery.com>
612 * Makefile.in (maintainer-clean, realclean, distclean): Remove
613 Makefile and config.status at last.
615 2012-04-13 Yao Qi <yao@codesourcery.com>
617 * tracepoint.c: Include stdint.h unconditionally.
619 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
621 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
622 on BFD_HAVE_SYS_PROCFS_TYPE.
623 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
624 * configure: Regenerate.
625 * config.in: Likewise.
627 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
629 * Makefile.in (clean): Also remove x32.c x32-linux.c
630 x32-avx.c x32-avx-linux.c.
633 (x32-linux.o): Likewise.
634 (x32-linux.c): Likewise.
635 (x32-avx.o): Likewise.
636 (x32-avx.c): Likewise.
637 (x32-avx-linux.o): Likewise.
638 (x32-avx-linux.c): Likewise.
640 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
641 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
642 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
643 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
644 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
645 i386/x32-avx-linux.xml.
647 * linux-x86-low.c (init_registers_x32_linux): New prototype.
648 (init_registers_x32_avx_linux): Likwise.
649 (x86_linux_update_xmltarget): Call init_registers_x32_linux
650 or init_registers_x32_avx_linux if linux_is_elf64 is false.
652 2012-04-13 Pedro Alves <palves@redhat.com>
654 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
655 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
656 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
657 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
660 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
662 * linux-x86-low.c (compat_x32_clock_t): New.
663 (compat_x32_siginfo_t): Likewise.
664 (compat_x32_siginfo_from_siginfo): Likewise.
665 (siginfo_from_compat_x32_siginfo): Likewise.
666 (linux_is_elf64): Likewise.
667 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
668 and siginfo_from_compat_x32_siginfo for x32.
669 (x86_arch_setup): Set linux_is_elf64.
671 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
674 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
676 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
677 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
678 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
679 compatible with process.
681 2012-04-12 Yao Qi <yao@codesourcery.com>
683 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
684 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
685 (install-only, install-info, clean): Handle sub dir gnulib.
686 (all-lib, am--refresh): New targets.
687 (memmem.o): Remove target.
688 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
689 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
690 (AC_REPLACE_FUNCS): Remove memmem.
691 Invoke gl_INIT and AM_INIT_AUTOMAKE.
692 (AC_OUTPUT): Generate Makefile in gnulib/.
693 * aclocal.m4, config.in, configure: Regenerated.
695 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
697 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
699 2012-04-05 Pedro Alves <palves@redhat.com>
701 -Werror=strict-aliasing
703 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
706 2012-04-04 Pedro Alves <palves@redhat.com>
708 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
709 (sparc_store_gregset_from_stack, sparc_store_gregset)
710 (sparc_breakpoint_at): Fix formatting.
712 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
714 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
716 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
717 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
718 * config.in: Regenerate.
719 * configure: Likewise.
721 2012-03-29 Pedro Alves <palves@redhat.com>
723 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
724 Correct ptrace arguments.
726 2012-03-28 Pedro Alves <palves@redhat.com>
728 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
729 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
730 (IA64_FR1_REGNUM): New defines.
731 (ia64_fetch_register): New.
732 (the_low_target): Install it.
733 * linux-low.h (struct linux_target_ops) <fetch_register>: New
735 * linux-low.c (linux_fetch_registers): Try the
736 the_low_target.fetch_register hook first.
738 * linux-arm-low.c (the_low_target): Adjust.
739 * linux-bfin-low.c (the_low_target): Adjust.
740 * linux-cris-low.c (the_low_target): Adjust.
741 * linux-crisv32-low.c (the_low_target): Adjust.
742 * linux-m32r-low.c (the_low_target): Adjust.
743 * linux-m68k-low.c (the_low_target): Adjust.
744 * linux-mips-low.c (the_low_target): Adjust.
745 * linux-ppc-low.c (the_low_target): Adjust.
746 * linux-s390-low.c (the_low_target): Adjust.
747 * linux-sh-low.c (the_low_target): Adjust.
748 * linux-sparc-low.c (the_low_target): Adjust.
749 * linux-tic6x-low.c (the_low_target): Adjust.
750 * linux-x86-low.c (the_low_target): Adjust.
751 * linux-xtensa-low.c (the_low_target): Adjust.
753 2012-03-26 Pedro Alves <palves@redhat.com>
755 * server.c (handle_qxfer_libraries): Don't bail early if
756 the_target->qxfer_libraries_svr4 is not NULL.
758 2012-03-26 Pedro Alves <palves@redhat.com>
760 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
762 2012-03-23 Pedro Alves <palves@redhat.com>
764 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
765 "library-list-svr4" element's start tag when the the DSO list is
768 2012-03-23 Pedro Alves <palves@redhat.com>
770 * linux-low.c (read_one_ptr): Read the inferior's pointer through
771 a variable whose type size is the same as the inferior's pointer
774 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
776 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
778 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
779 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
780 * linux-low.h: Include <signal.h>.
781 (struct siginfo): Remove forward declaration.
782 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
785 2012-03-21 Mike Frysinger <vapier@gentoo.org>
787 * .gitignore: Ignore more files.
789 2012-03-19 Pedro Alves <palves@redhat.com>
790 Jan Kratochvil <jan.kratochvil@redhat.com>
792 * server.c (cont_thread, general_thread): Add describing comments.
793 (start_inferior): Clear `cont_thread'.
794 (handle_v_cont): Don't set `cont_thread' if resuming all threads
797 2012-03-15 Yao Qi <yao@codesourcery.com>
799 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
801 (cmd_qtdp): ... here.
803 2012-03-15 Yao Qi <yao@codesourcery.com>
805 * tracepoint.c (struct tracepoint_action_ops): New.
806 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
807 (m_tracepoint_action_download): New.
808 (r_tracepoint_action_download): New.
809 (x_tracepoint_action_download): New.
810 (l_tracepoint_action_download): New.
811 (add_tracepoint_action): Install `action->ops' according type.
812 (download_tracepoint_1): Move code `download' function pointer
813 of various tracepoint_action_ops.
815 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
817 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
818 linux_ptrace_attach_warnings.
820 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
822 * Makefile.in (linux-ptrace.o): New.
823 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
824 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
825 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
826 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
827 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
829 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
831 2012-03-08 Yao Qi <yao@codesourcery.com>
832 Pedro Alves <palves@redhat.com>
835 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
837 * tracepoint.c (remove_tracepoint): New.
838 (cmd_qtdp): Call remove_tracepoint when failed to install.
840 2012-03-07 Pedro Alves <palves@redhat.com>
842 * linux-low.c (get_detach_signal): New.
843 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
844 Pass on pending signals to PTRACE_DETACH. Check the result of the
846 * server.c (program_signals, program_signals_p): New.
847 (handle_general_set): Handle QProgramSignals.
848 * server.h (program_signals, program_signals_p): Declare.
850 2012-03-05 Pedro Alves <palves@redhat.com>
851 Jan Kratochvil <jan.kratochvil@redhat.com>
853 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
856 2012-03-03 Yao Qi <yao@codesourcery.com>
858 * tracepoint.c (tracepoint_look_up_symbols): Update call to
859 agent_look_up_symbols.
861 2012-03-03 Yao Qi <yao@codesourcery.com>
863 * Makefile.in (linux-low.o): Keep dependence on agent.h.
864 (linux-x86-low.o): Likewise.
865 * server.h: Remove in_process_agent_loaded.
866 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
870 2012-03-03 Yao Qi <yao@codesourcery.com>
872 * tracepoint.c (gdb_agent_capability): New global.
873 (in_process_agent_loaded_ust): Renamed to
874 `in_process_agent_supports_ust'.
876 (in_process_agent_supports_ust): Call agent_capability_check.
877 (clear_installed_tracepoints): Assert that agent supports
880 2012-03-03 Yao Qi <yao@codesourcery.com>
882 * linux-low.c (linux_supports_agent): New.
883 (linux_target_ops): Initialize field `supports_agent' with
884 linux_supports_agent.
885 * target.h (struct target_ops) <supports_agent>: New.
886 (target_supports_agent): New macro.
887 * server.c (handle_general_set): Handle packet 'QAgent'.
888 (handle_query): Send `QAgent+'.
889 * Makefile.in (server.o): Depends on agent.h.
891 2012-03-03 Yao Qi <yao@codesourcery.com>
893 * Makefile.in (OBS): Add agent.o.
894 Add new rule for agent.o.
895 Track dependence of tracepoint.c on agent.h.
896 * tracepoint.c (run_inferior_command_1):
897 (run_inferior_command): Call agent_run_command.
898 (gdb_ust_connect_sync_socket): Deleted. Move it to
900 (resume_thread, stop_thread): Likewise.
901 (gdb_ust_socket_init): Renamed to ...
902 (gdb_agent_socket_init): ... New.
903 (gdb_ust_thread): Renamed to ...
904 (gdb_agent_helper_thread): ... New.
905 (gdb_ust_init): Move some code to ...
906 (gdb_agent_init): ... here. New.
907 [HAVE_UST]: Call gdb_ust_init.
908 (initialize_tracepoint_ftlib): Call gdb_agent_init.
909 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
910 * config.in, configure: Regenerated.
912 2012-03-02 Pedro Alves <palves@redhat.com>
914 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
915 * linux-low.c (struct simple_pid_list): New.
916 (stopped_pids): New a struct simple_pid_list pointer.
917 (add_to_pid_list, pull_pid_from_list): New.
918 (handle_extended_wait): Don't assume the first signal new children
919 report is SIGSTOP. Adjust call to pull_pid_from_list.
920 (linux_wait_for_lwp): Adjust.
922 2012-03-02 Yao Qi <yao@codesourcery.com>
924 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
927 2012-03-02 Yao Qi <yao@codesourcery.com>
929 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
930 `stop_pc' and `tpoint'. Update caller.
932 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
934 * linux-low.h (linux_target_ops): Add regset_bitmap member.
935 * linux-low.c (use_linux_regsets): New macro.
936 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
937 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
938 (linux_register_in_regsets): New function.
939 (usr_fetch_inferior_registers): Skip registers covered by
941 (usr_store_inferior_registers): Likewise.
942 (usr_fetch_inferior_registers): New macro.
943 (usr_store_inferior_registers): Likewise.
944 (linux_fetch_registers): Handle mixed regset/non-regset targets.
945 (linux_store_registers): Likewise.
946 * linux-mips-low.c (init_registers_mips_dsp_linux): New
948 (init_registers_mips64_dsp_linux): Likewise.
949 (init_registers_mips_linux): New macro.
950 (init_registers_mips_dsp_linux): Likewise.
951 (mips_dsp_num_regs): Likewise.
952 (DSP_BASE, DSP_CONTROL): New fallback macros.
953 (mips_base_regs): New macro.
954 (mips_regmap): Use it. Fix the size.
955 (mips_dsp_regmap): New variable.
956 (mips_dsp_regset_bitmap): Likewise.
957 (mips_arch_setup): New function.
958 (mips_cannot_fetch_register): Use the_low_target.regmap rather
960 (mips_cannot_store_register): Likewise.
961 (the_low_target): Update .arch_setup, .num_regs and .regmap
962 initializers. Add .regset_bitmap initializer.
963 * linux-arm-low.c (the_low_target): Add .regset_bitmap
965 * linux-bfin-low.c (the_low_target): Likewise.
966 * linux-cris-low.c (the_low_target): Likewise.
967 * linux-crisv32-low.c (the_low_target): Likewise.
968 * linux-ia64-low.c (the_low_target): Likewise.
969 * linux-m32r-low.c (the_low_target): Likewise.
970 * linux-m68k-low.c (the_low_target): Likewise.
971 * linux-ppc-low.c (the_low_target): Likewise.
972 * linux-s390-low.c (the_low_target): Likewise.
973 * linux-sh-low.c (the_low_target): Likewise.
974 * linux-sparc-low.c (the_low_target): Likewise.
975 * linux-tic6x-low.c (the_low_target): Likewise.
976 * linux-x86-low.c (the_low_target): Likewise.
977 * linux-xtensa-low.c (the_low_target): Likewise.
978 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
979 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
980 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
982 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
983 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
985 2012-02-29 Yao Qi <yao@codesourcery.com>
986 Pedro Alves <palves@redhat.com>
988 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
989 `step_over_finished' is true.
991 2012-02-27 Pedro Alves <palves@redhat.com>
993 * linux-low.c (pid_is_stopped): Delete, moved to common/.
994 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
996 2012-02-27 Pedro Alves <palves@redhat.com>
999 * linux-low.c (pid_is_stopped): New.
1000 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1002 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1004 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1007 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1009 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1011 2012-02-24 Luis Machado <lgustavo@codesourcery>
1013 * server.c (handle_query): Advertise support for target-side
1014 breakpoint condition evaluation.
1015 (process_point_options): New function.
1016 (process_serial_event): When inserting a breakpoint, check for
1017 a target-side condition that should be evaluated.
1019 * mem-break.c: Include regcache.h and ax.h.
1020 (point_cond_list_t): New data structure.
1021 (breakpoint) <cond_list>: New field.
1022 (find_gdb_breakpoint_at): Make non-static.
1023 (delete_gdb_breakpoint_at): Clear any target-side
1025 (clear_gdb_breakpoint_conditions): New function.
1026 (add_condition_to_breakpoint): Likewise.
1027 (add_breakpoint_condition): Likewise.
1028 (gdb_condition_true_at_breakpoint): Likewise.
1029 (gdb_breakpoint_here): Return result directly instead
1030 of going through a local variable.
1032 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1033 (clear_gdb_breakpoint_conditions): Likewise.
1034 (add_breakpoint_condition): Likewise.
1035 (gdb_condition_true_at_breakpoint): Likewise.
1037 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1038 (need_step_over_p): Take target-side breakpoint condition into
1041 2012-02-24 Luis Machado <lgustavo@codesourcery>
1043 * server.h: Include tracepoint.h.
1044 (agent_mem_read, agent_get_trace_state_variable_value,
1045 agent_set_trace_state_variable_value,
1046 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1047 get_set_tsv_func_addr): New prototypes.
1049 * ax.h: New include file.
1050 * ax.c: New source file.
1052 * tracepoint.c: Include ax.h.
1053 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1054 agent_expr, eval_result_type): Move to ax.h.
1055 (parse_agent_expr): Rename to ...
1056 (gdb_parse_agent_expr): ... this, make it non-static and move
1058 (unparse_agent_expr) Rename to ...
1059 (gdb_unparse_agent_expr): ... this, make it non-static and move
1061 (eval_agent_expr): Rename to ...
1062 (eval_tracepoint_agent_expr): ... this.
1063 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1064 forward declarations.
1065 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1066 (agent_get_trace_state_variable_value): New function.
1067 (agent_set_trace_state_variable_value): New function.
1068 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1069 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1070 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1071 (condition_true_at_tracepoint): Likewise.
1072 (parse_agent_expr): Rename to ...
1073 (gdb_parse_agent_expr): ... this and move to ax.c.
1074 (unparse_agent_expr): Rename to ...
1075 (gdb_unparse_agent_expr): ... this and move to ax.c.
1076 (gdb_agent_op_name): Move to ax.c.
1077 (eval_agent_expr): Rename to ...
1078 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1080 (eval_tracepoint_agent_expr): New function.
1081 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1083 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1085 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1086 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1087 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1088 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1089 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1090 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1091 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1092 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1093 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1094 (compile_bytecodes): Remove forward declaration.
1095 (is_goto_target): Move to ax.c.
1096 (compile_bytecodes): Move to ax.c and call
1097 agent_get_trace_state_variable_value (...) and
1098 agent_set_trace_state_variable_value (...).
1100 * Makefile.in: Update ax.c and IPA dependencies.
1102 2012-02-24 Pedro Alves <palves@redhat.com>
1104 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1105 (cmd_bigqtbuffer_circular): ... this. Only handle
1106 'QTBuffer:circular:'.
1107 (handle_tracepoint_general_set): Adjust.
1109 2012-02-16 Yao Qi <yao@codesourcery.com>
1111 * inferiors.c: Move code to ...
1112 * dll.c: .... here. New.
1113 * server.h: Declare clear_dlls.
1114 * Makefile.in (SFILES): Add dll.c.
1118 2012-02-11 Yao Qi <yao@codesourcery.com>
1120 * server.c: (handle_monitor_command): Add a new parameter
1122 (handle_query): Update caller.
1124 2012-02-09 Joel Brobecker <brobecker@adacore.com>
1126 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1127 * configure, config.in: Regenerate.
1128 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1131 2012-02-02 Pedro Alves <palves@redhat.com>
1133 Try SIGKILL first, then PTRACE_KILL.
1134 * linux-low.c (linux_kill_one_lwp): New.
1135 (linux_kill_one_lwp): Rename to ...
1136 (kill_one_lwp_callback): ... this. Use the new
1139 2012-02-02 Pedro Alves <palves@redhat.com>
1141 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1144 2012-01-27 Pedro Alves <palves@redhat.com>
1146 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1147 (elf_64_file_p): Make static.
1148 (linux_pid_exe_is_elf_64_file): New.
1149 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1150 Delete declarations.
1151 (linux_pid_exe_is_elf_64_file): Declare.
1152 * linux-x86-low.c (x86_arch_setup): Use
1153 linux_pid_exe_is_elf_64_file.
1155 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1157 * linux-low.c (linux_wait_for_event_1): Rename to ...
1158 (linux_wait_for_event): ... here and merge it with former
1159 linux_wait_for_event - new variable wait_ptid, use it.
1160 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1162 2012-01-23 Pedro Alves <palves@redhat.com>
1164 * server.c (main): Avoid yet another case of infinite loop while
1165 detaching/killing after a longjmp.
1167 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1170 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1172 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1174 * hostio.c (handle_readlink): New function.
1175 (handle_vFile): Call it to handle "vFile:readlink" packets.
1177 2012-01-20 Pedro Alves <palves@redhat.com>
1178 Ulrich Weigand <ulrich.weigand@linaro.org>
1180 * server.c (handle_v_requests): Only support vAttach and vRun to
1181 start multiple processes when in extended protocol mode.
1183 2012-01-17 Pedro Alves <palves@redhat.com>
1185 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1186 memalign plus mprotect to allocate the scratch buffer.
1188 2012-01-13 Pedro Alves <palves@redhat.com>
1190 * server.c (attach_inferior): Clear `cont_thread'.
1192 2012-01-13 Pedro Alves <palves@redhat.com>
1194 * server.c (main): Avoid infinite loop while detaching/killing
1197 2012-01-09 Doug Evans <dje@google.com>
1199 * server.c (start_inferior): Set last_ptid in --wrapper case.
1201 2012-01-06 Yao Qi <yao@codesourcery.com>
1203 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1205 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1207 2012-01-04 Yao Qi <yao@codesourcery.com>
1209 * tracepoint.c (cmd_qtdp): Print debug message
1210 for static tracepoint.
1212 2012-01-04 Yao Qi <yao@codesourcery.com>
1214 * tracepoint.c (trace_vdebug): Differentiate debug message
1215 between gdbserver and IPA.
1217 2012-01-03 Yao Qi <yao@codesourcery.com>
1219 * tracepoint.c (tracepoint_was_hit): Don't collect for
1222 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1224 * terminal.h: Reformat copyright header.
1226 2012-01-02 Joel Brobecker <brobecker@adacore.com>
1228 * server.c (gdbserver_version): Update copyright year.
1229 * gdbreplay.c (gdbreplay_version): Likewise.
1231 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1233 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1236 2011-12-18 Hui Zhu <teawater@gmail.com>
1237 * linux-low.c (linux_create_inferior): Save return value to ret.
1239 2011-12-18 Hui Zhu <teawater@gmail.com>
1241 * linux-low.c (linux_create_inferior): Save return value to ret.
1243 2011-12-16 Doug Evans <dje@google.com>
1245 * linux-low.c (linux_create_inferior): If stdio connection,
1246 redirect stdin from /dev/null, stdout to stderr.
1247 * remote-utils.c (remote_is_stdio): New static global.
1248 (remote_connection_is_stdio): New function.
1249 (remote_prepare): Handle stdio connection.
1250 (remote_open): Ditto.
1251 (remote_close): Don't close stdin for stdio connections.
1252 (read_prim,write_prim): New functions. Replace all calls to
1253 read/write to these.
1254 * server.c (main): Watch for "-" argument. Move call to
1255 remote_prepare before start_inferior.
1256 * server.h (STDIO_CONNECTION_NAME): New macro.
1257 (remote_connection_is_stdio): Declare.
1259 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1260 in debugging output.
1262 2011-12-15 Yao Qi <yao@codesourcery.com>
1264 * tracepoint.c: Include sys/syscall.h.
1265 (gdb_ust_thread): Remove preprocessor conditional.
1267 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1269 * linux-low.c (linux_detach_one_lwp): Call
1270 the_low_target.prepare_to_resume before detaching.
1272 2011-12-14 Yao Qi <yao@codesourcery.com>
1274 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1277 2011-12-14 Yao Qi <yao@codesourcery.com>
1279 * i386-low.c (i386_low_stopped_data_address): Initialize local
1282 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1286 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1287 DR_CONTROL unless necessary. Extend comments.
1288 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1289 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1291 2011-12-13 Yao Qi <yao@codesourcery.com>
1293 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1295 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1297 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1299 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1300 Print new debug message for such case.
1302 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1304 Fix overlapping memcpy.
1305 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1306 the read_inferior_memory transfer.
1307 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1308 write_inferior_memory transfer.
1309 (set_fast_tracepoint_jump): New variable buf. Use it for the
1310 read_inferior_memory and write_inferior_memory transfers.
1311 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1312 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1313 Use it for the write_inferior_memory transfer.
1314 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1317 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1319 * linux-low.c (fetch_register, store_register): Make code
1320 consistent, fix formatting.
1322 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1324 * linux-low.c (usr_store_inferior_registers): Factor out code
1325 to handle individual registers into...
1326 (store_register): ... this new function.
1328 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1330 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1331 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1332 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1333 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1334 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1335 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1336 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1337 (srv_xmlfiles): Add new XML files.
1339 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1341 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1342 (init_registers_s390_linux32v1): Add prototype.
1343 (init_registers_s390_linux32v2): Likewise.
1344 (init_registers_s390_linux64v1): Likewise.
1345 (init_registers_s390_linux64v2): Likewise.
1346 (init_registers_s390x_linux64v1): Likewise.
1347 (init_registers_s390x_linux64v2): Likewise.
1348 (s390_num_regs): Increment to 52.
1349 (s390_regmap): Add orig_r2 register.
1350 (s390_num_regs_3264): Increment to 68.
1351 (s390_regmap_3264): Add orig_r2 register.
1352 (s390_collect_ptrace_register): Handle orig_r2 register.
1353 (s390_supply_ptrace_register): Likewise.
1354 (s390_fill_last_break): New function.
1355 (s390_store_last_break): Likewise.
1356 (s390_fill_system_call): New function.
1357 (s390_store_system_call): Likewise.
1358 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1360 (s390_check_regset): New function.
1361 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1362 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1363 Update target_regsets for available register sets.
1365 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1366 Jan Kratochvil <jan.kratochvil@redhat.com>
1368 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1369 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1371 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1372 * linux-low.h (struct process_info_private): New member r_debug.
1373 * server.c (handle_qxfer_libraries): Call
1374 the_target->qxfer_libraries_svr4.
1375 (handle_qxfer_libraries_svr4): New function.
1376 (qxfer_packets): New entry "libraries-svr4".
1377 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1378 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1379 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1380 PACKET_qXfer_libraries_svr4.
1382 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1384 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1385 PSW address/mask between 8-byte and 16-byte formats.
1386 (s390_supply_ptrace_register): Likewise.
1387 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1388 basic addressing mode bit.
1390 2011-11-24 Stan Shebs <stan@codesourcery.com>
1392 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1394 2011-11-17 Stan Shebs <stan@codesourcery.com>
1396 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1397 (tracing_start_time): New global.
1398 (tracing_stop_time): New global.
1399 (tracing_user_name): New global.
1400 (tracing_notes): New global.
1401 (tracing_stop_note): New global.
1402 (cmd_qtstart): Set traceframe_usage, start_time.
1403 (stop_tracing): Set stop_time.
1404 (cmd_qtstatus): Report additional status.
1405 (cmd_qtp): New function.
1406 (handle_tracepoint_query): Call it.
1407 (cmd_qtnotes): New function.
1408 (handle_tracepoint_general_set): Call it.
1409 (get_timestamp): Rename from tsv_get_timestamp.
1411 2011-11-14 Stan Shebs <stan@codesourcery.com>
1412 Kwok Cheung Yeung <kcy@codesourcery.com>
1414 * linux-x86-low.c (small_jump_insn): New.
1415 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1416 trampoline and error message, build a trampoline and issue a small
1417 jump instruction to it.
1418 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1419 trampoline and error message.
1420 (x86_get_min_fast_tracepoint_insn_len): New.
1421 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1422 * linux-low.h (struct linux_target_ops): Add arguments to
1423 install_fast_tracepoint_jump_pad operation, add new operation.
1424 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1426 (linux_get_min_fast_tracepoint_insn_len): New function.
1427 (linux_target_op): Add new operation.
1428 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1429 (gdb_trampoline_buffer_end): Ditto.
1430 (gdb_trampoline_buffer_error): Ditto.
1431 (struct ipa_sym_addresses): Add fields for new IPA variables.
1432 (symbol_list): Add entries for new IPA variables.
1433 (struct tracepoint): Add fields to hold the address range of the
1434 trampoline used by the tracepoint.
1435 (trampoline_buffer_head): New static variable.
1436 (trampoline_buffer_tail): Ditto.
1437 (claim_trampoline_space): New function.
1438 (have_fast_tracepoint_trampoline_buffer): New function.
1439 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1441 (install_fast_tracepoint): Ditto, also add error buffer argument.
1442 (cmd_qtminftpilen): New function.
1443 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1444 (fast_tracepoint_from_trampoline_address): New function.
1445 (fast_tracepoint_collecting): Handle trampoline as part of jump
1447 (set_trampoline_buffer_space): New function.
1448 (initialize_tracepoint): Initialize new IPA variables.
1449 * target.h (struct target_ops): Add arguments to
1450 install_fast_tracepoint_jump_pad operation, add new
1451 get_min_fast_tracepoint_insn_len operation.
1452 (target_get_min_fast_tracepoint_insn_len): New.
1453 (install_fast_tracepoint_jump_pad): Add arguments.
1454 * server.h (IPA_BUFSIZ): Define.
1455 * linux-i386-ipa.c: Include extra header files.
1456 (initialize_fast_tracepoint_trampoline_buffer): New function.
1457 (initialize_low_tracepoint): Call it.
1458 * server.h (set_trampoline_buffer_space): Declare.
1459 (claim_trampoline_space): Ditto.
1460 (have_fast_tracepoint_trampoline_buffer): Ditto.
1462 2011-11-14 Yao Qi <yao@codesourcery.com>
1464 * server.c (handle_query): Handle InstallInTrace for qSupported.
1465 * tracepoint.c (add_tracepoint): Sort list.
1466 (install_tracepoint, download_tracepoint): New.
1467 (cmd_qtdp): Call them to install and download tracepoints.
1468 (sort_tracepoints): Removed.
1469 (cmd_qtstart): Update.
1471 2011-11-14 Yao Qi <yao@codesourcery.com>
1473 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1474 * mem-break.h: Declare.
1475 * tracepoint.c (cmd_qtstart): Move some code to ...
1476 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1478 (download_tracepoints): Move some code to ...
1479 (download_tracepoint_1): ... here. New.
1481 2011-11-08 Yao Qi <yao@codesourcery.com>
1483 * remote-utils.c (relocate_instruction): A comment fix.
1485 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1487 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1488 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1489 dr_status_mirror and dr_control_mirror from debug_reg_state.
1490 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1491 (i386_initial_stuff): Remove use of deleted globals.
1492 (i386_get_thread_context, i386_set_thread_context,
1493 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1494 from debug_reg_state.
1496 2011-11-05 Yao Qi <yao@codesourcery.com>
1498 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1499 address as TPOINT's.
1501 2011-11-02 Stan Shebs <stan@codesourcery.com>
1503 * tracepoint.c (agent_mem_read_string): New function.
1504 (eval_agent_expr): Call it for tracenz.
1505 * server.c (handle_query): Report support for tracenz.
1507 2011-11-02 Yao Qi <yao@codesourcery.com>
1509 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1511 2011-11-02 Yao Qi <yao@codesourcery.com>
1513 * target.h: Fix a typo in comment.
1515 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1517 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1518 clobber the breakpoints' shadows with fast tracepoint jumps.
1519 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1520 * target.c (write_inferior_memory): Also pass MYADDR down to
1523 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1525 * configure.ac: Check support for personality routine.
1526 * configure: Regenerate.
1527 * config.in: Likewise.
1528 * linux-low.c: Include <sys/personality.h>.
1529 Define ADDR_NO_RANDOMIZE if necessary.
1530 (linux_create_inferior): Disable address space randomization when
1531 forking inferior, if requested.
1532 (linux_supports_disable_randomization): New function.
1533 (linux_target_ops): Install it.
1534 * server.h (disable_randomization): Declare.
1535 * server.c (disable_randomization): New global variable.
1536 (handle_general_set): Handle QDisableRandomization.
1537 (handle_query): Likewise for qSupported.
1538 (main): Support --disable-randomization and --no-disable-randomization
1539 command line arguments.
1540 * target.h (struct target_ops): Add supports_disable_randomization.
1541 (target_supports_disable_randomization): New macro.
1543 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1545 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1547 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1548 [!PT_GETDSBT] (target_loadmap): New definition.
1549 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1550 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1551 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1552 and PT_GETDSBT to LINUX_LOADMAP.
1553 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1554 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1556 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1558 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1559 (arm_linux_hwbp_cap): New static variable.
1560 (arm_linux_get_hwbp_cap): Replace by ...
1561 (arm_linux_init_hwbp_cap): ... this new function.
1562 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1563 (arm_linux_get_hw_watchpoint_count): Likewise.
1564 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1565 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1566 (arm_prepare_to_resume): Use perror_with_name instead of error.
1568 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1570 * linux-arm-low.c: Include <signal.h>.
1571 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1572 (struct arm_linux_hwbp_cap): New data type.
1573 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1574 (struct arm_linux_hw_breakpoint): New data type.
1575 (MAX_BPTS, MAX_WPTS): Define.
1576 (struct arch_process_info, struct arch_lwp_info): New data types.
1577 (arm_linux_get_hwbp_cap): New function.
1578 (arm_linux_get_hw_breakpoint_count): Likewise.
1579 (arm_linux_get_hw_watchpoint_count): Likewise.
1580 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1581 (arm_hwbp_control_initialize): Likewise.
1582 (arm_hwbp_control_is_enabled): Likewise.
1583 (arm_hwbp_control_is_initialized): Likewise.
1584 (arm_hwbp_control_disable): Likewise.
1585 (arm_linux_hw_breakpoint_equal): Likewise.
1586 (arm_linux_hw_point_initialize): Likewise.
1587 (struct update_registers_data): New data structure.
1588 (update_registers_callback: New function.
1589 (arm_insert_point): Likewise.
1590 (arm_remove_point): Likewise.
1591 (arm_stopped_by_watchpoint): Likewise.
1592 (arm_stopped_data_address): Likewise.
1593 (arm_new_process): Likewise.
1594 (arm_new_thread): Likewise.
1595 (arm_prepare_to_resume): Likewise.
1596 (the_low_target): Register arm_insert_point, arm_remove_point,
1597 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1598 arm_new_thread, and arm_prepare_to_resume.
1600 2011-09-15 Stan Shebs <stan@codesourcery.com>
1602 * server.h (struct emit_ops): Add compare-goto fields.
1603 * tracepoint.c (gdb_agent_op_sizes): New table.
1604 (emit_eq_goto): New function.
1605 (emit_ne_goto): New function.
1606 (emit_lt_goto): New function.
1607 (emit_le_goto): New function.
1608 (emit_gt_goto): New function.
1609 (emit_ge_goto): New function.
1610 (is_goto_target): New function.
1611 (compile_bytecodes): Recognize special cases of compare-goto
1612 combinations and call specialized emitters for them.
1613 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1614 (amd64_emit_ne_goto): New function.
1615 (amd64_emit_lt_goto): New function.
1616 (amd64_emit_le_goto): New function.
1617 (amd64_emit_gt_goto): New function.
1618 (amd64_emit_ge_goto): New function.
1619 (amd64_emit_ops): Add the new functions.
1620 (i386_emit_eq_goto): New function.
1621 (i386_emit_ne_goto): New function.
1622 (i386_emit_lt_goto): New function.
1623 (i386_emit_le_goto): New function.
1624 (i386_emit_gt_goto): New function.
1625 (i386_emit_ge_goto): New function.
1626 (i386_emit_ops): Add the new functions.
1628 2011-09-08 Stan Shebs <stan@codesourcery.com>
1630 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1631 (i386_emit_epilogue): Restore %ebx.
1633 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1635 * server.c (step_thread): Remove definition.
1636 (process_serial_event): Don't handle Hs.
1637 * server.h (step_thread): Remove declaration.
1638 * target.c (set_desired_inferior): Remove use of step_thread.
1640 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1642 * linux-low.c: Include linux-procfs.h.
1643 (linux_attach_lwp_1): Update comments.
1644 (linux_attach): Scan for existing threads when attaching to a
1645 process that is the tgid.
1646 * Makefile.in: Update dependencies.
1648 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1650 * configure.srv: Add linux-procfs.o dependencies.
1652 2011-08-14 Yao Qi <yao@codesourcery.com>
1654 * target.h (struct target_ops): Fix indent.
1655 * win32-low.c (win32_target_ops): Fix comment.
1657 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1658 Yao Qi <yao@codesourcery.com>
1660 * Makefile.in (clean): Remove tic6x-*.c files.
1661 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1662 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1663 (tic6x-c64xp-linux.c): Likewise.
1664 * configure.srv: Add support for tic6x-*-uclinux.
1665 * linux-tic6x-low.c: New.
1666 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1668 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1669 Yao Qi <yao@codesourcery.com>
1671 * target.h (struct target_ops): Add read_loadmap.
1672 * linux-low.c (struct target_loadseg): New type.
1673 (struct target_loadmap): New type.
1674 (linux_read_loadmap): New function.
1675 (linux_target_ops): Add linux_read_loadmap.
1676 * server.c (handle_query): Support qXfer:fdpic:read packet.
1677 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1679 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1681 * win32-low.c: Include <stdint.h>.
1683 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1685 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1686 to the inferior here.
1687 (i386_remove_aligned_watchpoint): Ditto.
1688 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1689 fit part of the watchpoint in the debug registers.
1690 (i386_update_inferior_debug_regs): New.
1691 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1692 registers, and only update the inferior on success.
1693 (i386_low_remove_watchpoint): Ditto.
1695 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1697 * linux-low.c (compare_ints, unique, list_threads, show_process,
1698 linux_core_of_thread): Delete.
1699 (linux_target_ops): Change linux_core_of_thread to
1700 linux_common_core_of_thread.
1701 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1702 * utils.c (malloc_failure): Change type of argument.
1703 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1704 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1705 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1706 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1707 (IPA_OBJS): Add common-utils-ipa.o.
1708 (ptid_h, linux_osdata_h): New macros.
1709 (server_h): Add common/common-utils.h, common/xml-utils.h,
1710 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1712 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1713 ptid.o, buffer.o): New rules.
1714 (linux-low.o): Add common/linux-osdata.h as a dependency.
1715 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1716 * configure.ac: Add AC_HEADER_DIRENT check.
1717 * config.in: Regenerate.
1718 * configure: Regenerate.
1719 * remote-utils.c (xml_escape_text): Delete.
1720 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1721 buffer_xml_printf): Move to common/buffer.c.
1722 * server.c (main): Remove call to initialize_inferiors.
1723 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1724 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1725 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1726 internal_error, gdb_assert, gdb_assert_fail): Delete.
1727 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1728 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1730 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1731 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1732 initialize_inferiors): Delete.
1734 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1736 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1739 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1741 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1743 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1745 2011-05-26 Yao Qi <yao@codesourcery.com>
1747 * Makefile.in (thread-db.o): Track dependence to
1748 common/gdb_thread_db.h.
1749 * thread-db.c: include gdb_thread_db.h from right place.
1751 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1753 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1754 __FILE__ and __LINE__ to internal_error.
1756 2011-05-13 Doug Evans <dje@google.com>
1758 * thread-db.c (try_thread_db_load_from_sdir): New function.
1759 (try_thread_db_load_from_dir): New function.
1760 (thread_db_load_search): Handle $sdir, ignore $pdir.
1761 Remove trying of system directories if search of
1762 libthread-db-search-path fails, that is now done via $sdir.
1764 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1766 * server.c (handle_query): Add EnableDisableTracepoints to the list
1767 of supported features.
1768 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1770 (cmd_qtenable_disable): New.
1771 (cmd_qtstart): Install tracepoints even if disabled.
1772 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1773 receiving a QTEnable or QTDisable packet.
1774 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1775 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1777 (gdb_probe): Skip data collection if static tracepoint is disabled.
1779 2011-05-10 Doug Evans <dje@google.com>
1781 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1783 2011-05-04 Doug Evans <dje@google.com>
1785 * linux-low.c (linux_join): Skip process lookup.
1786 * spu-low.c (spu_join): Ditto.
1787 * server.c (join_inferiors_callback): Delete.
1788 (process_serial_event): For 'D' packet (detach) call join_inferior
1791 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1793 * README: Don't mention xscale*-*-linux*.
1794 * configure.srv (xscale*-*-linux*): Don't handle target.
1796 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1798 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1800 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1801 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1802 (i386_emit_void_call_2): Likewise.
1804 2011-04-26 Yao Qi <yao@codesourcery.com>
1806 * linux-low.c: Move common macros to linux-ptrace.h.
1807 Include linux-ptrace.h.
1808 * Makefile.in (linux_ptrace_h): New.
1809 (linux-low.o): Depends on linux-ptrace.h.
1811 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1813 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1814 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1815 (remote_prepare): New function with most of the TCP code from ...
1816 (remote_open): ... here. Detect PORT here unconditionally. Move also
1817 setting transport_is_reliable.
1818 * server.c (run_once): New variable.
1819 (gdbserver_usage): Document it.
1820 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1821 the first run if RUN_ONCE.
1822 * server.h (run_once, remote_prepare): New declarations.
1824 2011-04-19 Tom Tromey <tromey@redhat.com>
1826 * win32-low.c (handle_load_dll): Remove duplicate "the".
1828 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1830 Remove support for old Cygwin 1.5 versions.
1831 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1832 function to avoid warning.
1833 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1836 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1838 * gdbserver/server.h (Macro _): Define it if not available.
1840 2011-03-14 Michael Snyder <msnyder@vmware.com>
1842 * hostio.c (handle_close): Remove unnecessary null test.
1844 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1846 * Makefile.in (maintainer-clean realclean distclean): Remove
1847 "make ... subdir_do" command.
1849 2011-03-10 Michael Snyder <msnyder@vmware.com>
1851 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1853 * server.c (handle_v_run): Free alloced buffer on early return.
1855 2011-03-09 Yao Qi <yao@codesourcery.com>
1858 2011-03-04 Yao Qi <yao@codesourcery.com>
1860 * Makefile.in: Remove GNU make feature --directory.
1862 2011-03-05 Yao Qi <yao@codesourcery.com>
1864 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1865 (subdir_do): New make target. Copied from gdb/Makefile.
1866 (maintainer-clean, realclean, distclean, clean): Call corresponding
1867 make targets in common/Makefile.
1869 2011-02-11 Yao Qi <yao@codesourcery.com>
1871 * configure.ac: Call AC_PROG_RANLIB.
1872 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1873 * configure: Regenerate.
1875 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1877 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1879 2011-03-06 Yao Qi <yao@codesourcery.com>
1881 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1883 2011-03-05 Yao Qi <yao@codesourcery.com>
1885 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1886 (subdir_do): New make target. Copied from gdb/Makefile.
1887 (maintainer-clean, realclean, distclean, clean): Call corresponding
1888 make targets in common/Makefile.
1890 2011-03-04 Yao Qi <yao@codesourcery.com>
1892 * Makefile.in: Remove GNU make feature --directory.
1894 2011-03-04 Michael Snyder <msnyder@vmware.com>
1896 * server.c (queue_stop_reply): Call xmalloc not malloc.
1898 2011-03-02 Michael Snyder <msnyder@vmware.com>
1900 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1902 2011-02-28 Michael Snyder <msnyder@vmware.com>
1904 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1905 (cmd_qtframe): Ditto.
1906 (cmd_qtbuffer): Ditto.
1907 (cmd_bigqtbuffer): Ditto.
1909 * utils.c (decimal2str): Initialize 'width' to nine, then
1912 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1914 * hostio.c (require_data): Free *data, not data.
1916 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1918 * hostio.c (require_data): Use free, not xfree.
1920 2011-02-27 Michael Snyder <msnyder@vmware.com>
1922 * server.c (handle_query): Discard unused value.
1924 * hostio.c (require_data): Free malloc memory before returning
1927 2011-02-26 Michael Snyder <msnyder@vmware.com>
1929 * linux-low.c (list_threads): Call closedir for dirent.
1931 2011-02-27 Michael Snyder <msnyder@vmware.com>
1933 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1934 a case statement falls through.
1936 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1938 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1941 2011-02-26 Michael Snyder <msnyder@vmware.com>
1943 * utils.c (decimal2str): Eliminate dead code and dead param.
1944 (pulongest): Drop dead param from call to decimal2str.
1947 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1949 Revert the following patch (not approved yet):
1950 2011-02-21 Hui Zhu <teawater@gmail.com>
1951 * tracepoint.c (tp_printf): New function.
1952 (eval_agent_expr): Handle gdb_agent_op_printf.
1954 2011-02-21 Hui Zhu <teawater@gmail.com>
1956 * tracepoint.c (tp_printf): New function.
1957 (eval_agent_expr): Handle gdb_agent_op_printf.
1959 2011-02-18 Tom Tromey <tromey@redhat.com>
1961 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1962 (tracepoint.o): Likewise.
1963 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1964 (gdb_agent_op_names): Likewise.
1966 2011-02-18 Tom Tromey <tromey@redhat.com>
1968 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1969 gdb_agent_op_rot>: New constants.
1970 (gdb_agent_op_names): Add pick and roll.
1971 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1974 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1976 * aclocal.m4: Regenerated with aclocal-1.11.1.
1978 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1980 * server.c (handle_qxfer_traceframe_info): New.
1981 (qxfer_packets): Register "traceframe-info".
1982 (handle_query): Report support for qXfer:traceframe-info:read+.
1983 * tracepoint.c (match_blocktype): New.
1984 (traceframe_find_block_type): Rename to ...
1985 (traceframe_walk_blocks): ... this. Add callback filter argument,
1987 (traceframe_find_block_type): New, reimplemented on top of
1988 traceframe_walk_blocks.
1989 (build_traceframe_info_xml): New.
1990 (traceframe_read_info): New.
1991 * server.h (traceframe_read_info): Declare.
1993 2011-02-11 Yao Qi <yao@codesourcery.com>
1995 * configure.ac: Call AC_PROG_RANLIB.
1996 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1997 * configure: Regenerate.
1999 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2001 * server.c (gdb_read_memory): Change return semantics to allow
2003 (handle_search_memory_1): Adjust.
2004 (process_serial_event) <'m' packet>: Handle partial transfers.
2005 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2007 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2009 * regcache.c (init_register_cache): Initialize
2010 regcache->register_status.
2011 (free_register_cache): Release regcache->register_status.
2012 (regcache_cpy): Copy register_status.
2013 (registers_to_string): Print 'x's for unavailable registers.
2014 (supply_register): Mark the register's status valid or
2015 unavailable, depending on whether a buffer was passed in or not.
2016 (supply_register_zeroed): New.
2017 (supply_regblock): Mark the registers' status valid or
2018 unavailable, depending on whether a buffer was passed in or not.
2019 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2020 (struct regcache): New `register_status' field.
2021 (supply_register_zeroed): Declare.
2022 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2023 supply_register_zeroed, rather than passing a NULL buffer to
2025 * tracepoint.c (fetch_traceframe_registers): Update comment.
2027 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2029 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2032 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2034 * server.h (decode_xfer_write): Change prototype.
2035 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2036 and don't extract the annex here.
2037 * server.c (decode_xfer_read): Remove `annex' parameter,
2038 and don't extract the annex here.
2040 (struct qxfer): New.
2041 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2042 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2043 (handle_qxfer_statictrace): New functions, abstracted out from
2044 handle_query, and made to use the struct qxfer interface.
2045 (handle_threads_qxfer_proper): Rename to ...
2046 (handle_qxfer_threads_proper): ... this.
2047 (handle_threads_qxfer): Rename to ...
2048 (handle_qxfer_threads): ... this. Adjust.
2049 (qxfer_packets): New array.
2050 (handle_qxfer): New function.
2051 (handle_query): Use handle_qxfer.
2053 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2055 * gdbreplay.c: Shorten lines of >= 80 columns.
2056 * linux-low.c: Ditto.
2057 * linux-ppc-low.c: Ditto.
2058 * linux-s390-low.c: Ditto.
2059 * linux-sparc-low.c: Ditto.
2060 * linux-x86-low.c: Ditto.
2061 * linux-xtensa-low.c: Ditto.
2062 * mem-break.c: Ditto.
2064 * regcache.h: Ditto.
2065 * remote-utils.c: Ditto.
2068 * thread-db.c: Ditto.
2069 * tracepoint.c: Ditto.
2071 * win32-low.h: Ditto.
2073 2011-01-05 Joel Brobecker <brobecker@adacore.com>
2075 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2078 2011-01-01 Joel Brobecker <brobecker@adacore.com>
2080 * server.c (gdbserver_version): Update copyright year in version
2082 * gdbreplay.c (gdbreplay_version): Ditto.
2084 2010-12-29 Jie Zhang <jie.zhang@analog.com>
2086 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2087 * linux-bfin-low.c: New file.
2088 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2089 PT_DATA_ADDR for BFIN targets.
2090 * Makefile.in (SFILES): Add linux-bfin-low.c.
2091 (clean): Remove reg-bfin.c.
2092 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2093 * README: Mention supported Blackfin targets.
2095 2010-12-23 Mike Frysinger <vapier@gentoo.org>
2097 * .gitignore: New file.
2099 2010-11-16 Mike Frysinger <vapier@gentoo.org>
2101 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2103 2010-10-22 Jie Zhang <jie@codesourcery.com>
2105 * Makefile.in: Add FLAGS_TO_PASS variable.
2106 (install): Remove dependency of install-only and recursively
2107 invoke make for install-only.
2109 2010-10-04 Doug Evans <dje@google.com>
2111 * Makefile.in (uninstall): Use $(DESTDIR).
2113 2010-09-24 Pedro Alves <pedro@codesourcery.com>
2117 * linux-x86-low.c (compat_siginfo_from_siginfo)
2118 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2119 si_code is < 0. Check for si_code == SI_TIMER before checking for
2122 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2124 * lynx-i386-low.c: New file.
2125 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2127 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2129 * lynx-low.c (ptrace_request_to_str): Remove handling for
2130 request values that have been removed in LynxOS 5.x.
2132 2010-09-13 Joel Brobecker <brobecker@adacore.com>
2134 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2137 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2139 * configure.ac: Add --enable-inprocess-agent option.
2140 * configure: Rebuilt.
2142 2010-09-06 Yao Qi <yao@codesourcery.com>
2144 * linux-low.c (linux_kill): Remove unused variable.
2145 (linux_stabilize_threads): Likewise.
2146 * server.c (start_inferior): Likewise.
2147 (queue_stop_reply_callback): Likewise.
2148 * tracepoint.c (do_action_at_tracepoint): Likewise.
2150 2010-09-06 Yao Qi <yao@codesourcery.com>
2152 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2155 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2157 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2159 2010-09-06 Pedro Alves <pedro@codesourcery.com>
2161 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2164 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2166 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2167 gdbserver/lynx-ppc-low.c: New files.
2168 * Makefile.in (lynx_low_h): New variable.
2169 (lynx-low.o, lynx-ppc-low.o): New rules.
2170 * configure.ac: On LynxOS, link with -lnetinet.
2171 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2172 * configure: regenerate.
2174 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2176 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2177 * configure.ac: Add check for vasprintf and vsnprintf.
2178 * configure, config.in: Regenerate.
2179 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2181 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2183 * gdbreplay.c: Move include of alloca.h up, next to include of
2185 * server.h: Add include of malloc.h.
2186 * mem-break.c: Remove include of malloc.h.
2187 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2189 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2191 * Makefile.in (memmem.o): Build with -Wno-error.
2193 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2195 * utils.c (xsnprintf): Make non-static.
2196 * server.h: Add xsnprintf declaration.
2197 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2198 replace calls to snprintf by calls to xsnprintf throughout.
2200 2010-09-01 Joel Brobecker <brobecker@adacore.com>
2202 * configure.ac: Add configure check for alloca.
2203 * configure, config.in: Regenerate.
2204 * server.h: Include alloca.h if it exists.
2205 * gdbreplay.c: Include alloca.h if it exists.
2207 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2209 * linux-low.c (__SIGRTMIN): Define if not already defined.
2210 (linux_create_inferior): Check for __ANDROID__ rather than
2212 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2213 are already deferred.
2214 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2215 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2216 stopped and already has a pending signal to report.
2217 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2218 a pending signal to report or is moving out of a jump pad.
2219 (linux_init_signals): Check for __ANDROID__ rather than
2222 2010-08-28 Pedro Alves <pedro@codesourcery.com>
2224 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2225 debug_threads check. Avoid a linear search when not doing debug
2228 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2230 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2231 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2232 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2233 (process_event): Change local fd's type to gdb_fildes_t.
2234 (create_file_handler): Adjust prototype.
2235 (delete_file_handler): Adjust prototype.
2236 (handle_file_event): Adjust prototype. Use pfildes.
2237 (create_file_event): Adjsut prototype.
2238 * remote-utils.c (remote_desc, listen_desc): Change type to
2240 * server.h: New gdb_fildes_t typedef.
2241 [USE_WIN32API]: Include winsock2.h.
2242 (delete_file_handler, add_file_handler): Adjust prototypes.
2244 * utils.c (pfildes): New.
2246 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2248 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2249 * configure: Regenerate.
2251 2010-08-27 Pedro Alves <pedro@codesourcery.com>
2253 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2254 (linux_done_accessing_memory): ... this.
2255 (linux_target_ops): Adjust.
2256 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2257 * nto-low.c (nto_target_ops): Adjust comment.
2258 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2259 * spu-low.c (spu_target_ops): Adjust comment.
2260 * target.h (target_ops): Rename unprepare_to_access_memory field
2261 to done_accessing_memory.
2262 (unprepare_to_access_memory): Rename to ...
2263 (done_accessing_memory): ... this.
2265 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2267 * linux-low.c (linux_prepare_to_access_memory): New.
2268 (linux_unprepare_to_access_memory): New.
2269 (linux_target_ops): Install them.
2270 * server.c (read_memory): Rename to ...
2271 (gdb_read_memory): ... this. Use
2272 prepare_to_access_memory/prepare_to_access_memory.
2273 (write_memory): Rename to ...
2274 (gdb_write_memory): ... this. Use
2275 prepare_to_access_memory/prepare_to_access_memory.
2276 (handle_search_memory_1): Adjust.
2277 (process_serial_event): Adjust.
2278 * target.h (struct target_ops): New fields
2279 prepare_to_access_memory and unprepare_to_access_memory.
2280 (prepare_to_access_memory, unprepare_to_access_memory): New.
2281 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2282 prepare_to_access_memory/prepare_to_access_memory.
2283 * nto-low.c (nto_target_ops): Adjust.
2284 * spu-low.c (spu_target_ops): Adjust.
2285 * win32-low.c (win32_target_ops): Adjust.
2287 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2289 * Makefile.in (WARN_CFLAGS): Get it from configure.
2290 (WERROR_CFLAGS): New.
2291 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2292 * configure.ac: Introduce --enable-werror, which adds -Werror to
2293 the compiler command line. Enabled by default. Disable with
2294 --disable-werror. Add -Wdeclaration-after-statement
2295 Wpointer-arith and -Wformat-nonliteral to warning flags.
2296 * configure: Regenerate.
2298 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2300 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2302 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2304 * gdbreplay.c (remote_error): New.
2306 (expect): Use gdbchar. Check for error reading from GDB.
2307 Clarify sync error output.
2308 (play): Check for errors writing to GDB.
2309 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2310 * remote-utils.c (getpkt): Check for errors writing to the remote
2313 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2315 * linux-low.c (linux_wait_1): Move non-debugging code out of
2316 `debug_threads' control.
2318 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2320 * linux-low.c (linux_wait_1): Don't set last_status here.
2321 * server.c (push_event, queue_stop_reply_callback): Assert we're
2322 not pushing a TARGET_WAITKIND_IGNORE event.
2323 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2324 (myresume, handle_target_event): Set the thread's last_resume_kind
2325 and last_status from the target returned status.
2327 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2331 * linux-x86-low.c (update_debug_registers_callback): New.
2332 (i386_dr_low_set_addr): Use it.
2333 (i386_dr_low_get_addr): New.
2334 (i386_dr_low_set_control): Use update_debug_registers_callback.
2335 (i386_dr_low_get_control): New.
2336 (i386_dr_low_get_status): Adjust.
2337 * linux-low.c (linux_stop_lwp): New.
2338 * linux-low.h (linux_stop_lwp): Declare.
2340 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2341 argument instead of a i386_debug_reg_state.
2342 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2343 a i386_debug_reg_state.
2344 (i386_insert_aligned_watchpoint): Adjust.
2345 (i386_remove_aligned_watchpoint): Adjust.
2346 (i386_low_stopped_data_address): Read the debug registers from the
2347 inferior instead of from the mirrors.
2348 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2349 (i386_dr_low_get_addr): Declare.
2350 (i386_dr_low_get_control): Declare.
2351 (i386_dr_low_get_status): Change prototype.
2353 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2354 (i386_dr_low_get_addr): New.
2355 (i386_dr_low_get_control): New.
2356 (i386_dr_low_get_status): Adjust prototype. Return
2358 (i386_initial_stuff): Clear dr_status_mirror and
2360 (i386_get_thread_context): Adjust.
2361 (i386_set_thread_context): Adjust.
2362 (i386_thread_added): Adjust.
2364 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2366 * linux-low.h (linux_thread_area): Delete declaration.
2368 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2370 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2371 after its termination.
2373 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2375 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2376 (gdb_wants_all_stopped): Delete.
2377 (linux_wait_1): Don't call them.
2378 * server.c (handle_v_cont): Tag all threads as want-stopped.
2379 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2380 stopped as "client-wants-stopped".
2382 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2384 * Makefile.in (signals_h): New.
2385 (server_h): Depend on it.
2386 (server.o): Don't depend on $(signals_def).
2387 (signals.o): Depend on $(signals_def).
2389 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2391 * Makefile.in (signals_def): New.
2392 (server_h): Append include/gdb/signals.h and signals_def.
2393 (server.o): Append signals_def.
2395 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2397 * server.c (handle_target_event): Use target_signal_to_host for
2398 resume_info.sig initialization.
2399 * target.h (struct thread_resume) <sig>: New comment.
2401 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2403 * server.c (handle_query): strcpy() the returned string from paddress()
2404 instead of sprintf().
2405 * utils.c (paddress): Return phex_nz().
2407 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2409 * server.c (handle_v_cont): Call mourn_inferior if process
2411 (myresume): Likewise.
2413 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2415 Static tracepoints, and integration with UST.
2417 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2418 * mem-break.c (uninsert_all_breakpoints)
2419 (reinsert_all_breakpoints): New.
2420 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2421 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2422 (gdb_agent_ust_loaded, helper_thread_id)
2423 (gdb_agent_helper_thread_id): New macros.
2424 (struct ipa_sym_addresses): Add addr_ust_loaded,
2425 addr_helper_thread_id, addr_cmd_buf.
2426 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2427 (in_process_agent_loaded_ust): New.
2428 (write_e_ust_not_loaded): New.
2429 (maybe_write_ipa_ust_not_loaded): New.
2430 (struct collect_static_trace_data_action): New.
2431 (enum tracepoint_type) <static_tracepoint>: New.
2432 (struct tracepoint) <handle>: Mention static tracepoints.
2433 (struct static_tracepoint_ctx): New.
2434 (CMD_BUF_SIZE): New.
2435 (add_tracepoint_action): Handle static tracepoint actions.
2436 (unprobe_marker_at): New.
2437 (clear_installed_tracepoints): Handle static tracepoints.
2438 (cmd_qtdp): Handle static tracepoints.
2439 (probe_marker_at): New.
2440 (cmd_qtstart): Handle static tracepoints.
2441 (response_tracepoint): Handle static tracepoints.
2442 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2443 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2444 (get_context_regcache): Handle static tracepoints.
2445 (do_action_at_tracepoint): Handle static tracepoint actions.
2446 (traceframe_find_block_type): Handle static trace data blocks.
2447 (traceframe_read_sdata): New.
2448 (download_tracepoints): Download static tracepoint actions.
2449 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2450 (GDB_PROBE_NAME): New.
2455 (ust_marker_to_static_tracepoint): New.
2457 (collect_ust_data_at_tracepoint): New.
2458 (gdb_ust_probe): New.
2459 (UNIX_PATH_MAX, SOCK_DIR): New.
2460 (gdb_ust_connect_sync_socket): New.
2461 (resume_thread, stop_thread): New.
2462 (run_inferior_command): New.
2463 (init_named_socket): New.
2464 (gdb_ust_socket_init): New.
2465 (cstr_to_hexstr): New.
2467 (first_marker, next_marker): New.
2468 (response_ust_marker): New.
2469 (cmd_qtfstm, cmd_qtsstm): New.
2470 (unprobe_marker_at, probe_marker_at): New.
2471 (cmd_qtstmat, gdb_ust_thread): New.
2472 (gdb_ust_init): New.
2473 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2474 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2476 (x86_64_st_collect_regmap): New.
2477 (X86_64_NUM_ST_COLLECT_GREGS): New.
2478 (AMD64_RIP_REGNUM): New.
2479 (supply_static_tracepoint_registers): New.
2480 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2482 (i386_st_collect_regmap): New.
2483 (i386_NUM_ST_COLLECT_GREGS): New.
2484 (supply_static_tracepoint_registers): New.
2485 * server.c (handle_query): Handle qXfer:statictrace:read.
2486 <qSupported>: Report support for StaticTracepoints, and
2487 qXfer:statictrace:read features.
2488 * server.h (traceframe_read_sdata)
2489 (supply_static_tracepoint_registers): Declare.
2490 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2491 (unpack_varlen_hex): Include in IPA build.
2492 * Makefile.in (ustlibs, ustinc): New.
2493 (IPA_OBJS): Add remote-utils-ipa.o.
2494 ($(IPA_LIB)): Link -ldl and -lpthread.
2496 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2497 * config.in, configure: Regenerate.
2499 2010-06-20 Ian Lance Taylor <iant@google.com>
2500 Pedro Alves <pedro@codesourcery.com>
2502 * linux-x86-low.c (always_true): Delete.
2503 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2504 trying to fool the compiler with always_true.
2506 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2508 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2509 conditions in gdbserver.
2511 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2513 * spu-low.c (spu_read_memory): Wrap around local store limit.
2514 (spu_write_memory): Likewise.
2516 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2518 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2519 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2521 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2523 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2524 uses with LONGEST uses.
2526 2010-06-14 Stan Shebs <stan@codesourcery.com>
2527 Pedro Alves <pedro@codesourcery.com>
2531 * linux-x86-low.c: Include limits.h.
2536 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2537 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2538 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2539 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2540 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2541 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2542 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2543 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2544 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2545 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2546 (amd64_emit_void_call_2): New.
2547 (amd64_emit_ops): New.
2548 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2549 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2550 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2551 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2552 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2553 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2554 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2555 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2556 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2557 (i386_emit_stack_adjust, i386_emit_int_call_1)
2558 (i386_emit_void_call_2): New.
2559 (i386_emit_ops): New.
2560 (x86_emit_ops): New.
2561 (the_low_target): Install x86_emit_ops.
2562 * server.h (struct emit_ops): New.
2563 (get_raw_reg_func_addr): Declare.
2564 (current_insn_ptr, emit_error): Declare.
2565 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2566 (set_trace_state_variable_value): New defines.
2567 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2568 addr_get_trace_state_variable_value and
2569 addr_set_trace_state_variable_value.
2570 (symbol_list): New fields for get_raw_reg,
2571 get_trace_state_variable_value and set_trace_state_variable_value.
2572 (condfn): New typedef.
2573 (struct tracepoint): New field `compiled_cond'.
2574 (do_action_at_tracepoint): Clear compiled_cond.
2575 (get_trace_state_variable_value, set_trace_state_variable_value):
2577 (condition_true_at_tracepoint): If there's a compiled condition,
2579 (current_insn_ptr, emit_error): New globals.
2580 (struct bytecode_address): New.
2581 (get_raw_reg_func_addr): New.
2582 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2583 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2584 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2585 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2586 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2587 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2588 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2589 (compile_tracepoint_condition, compile_bytecodes): New.
2590 * target.h (emit_ops): Forward declare.
2591 (struct target_ops): New field emit_ops.
2592 (target_emit_ops): New.
2593 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2594 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2595 * linux-low.c (linux_emit_ops): New.
2596 (linux_target_ops): Install it.
2597 * linux-low.h (struct linux_target_ops): New field emit_ops.
2599 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2601 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2602 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2604 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2605 Stan Shebs <stan@codesourcery.com>
2607 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2608 (all): Depend on $(extra_libraries).
2609 (install-only): Install the IPA.
2610 (IPA_OBJS, IPA_LIB): New.
2611 (clean): Remove the IPA lib.
2612 (IPAGENT_CFLAGS): New.
2613 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2614 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2615 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2616 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2617 * configure.ac: Check for atomic builtins support in the compiler.
2618 (IPA_DEPFILES, extra_libraries): Define.
2619 * configure.srv (ipa_obj): Add description.
2620 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2621 (i[34567]86-*-linux*): Set ipa_obj.
2622 (x86_64-*-linux*): Set ipa_obj.
2623 * linux-low.c (stabilizing_threads): New.
2624 (supports_fast_tracepoints): New.
2625 (linux_detach): Stabilize threads before detaching.
2626 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2627 the lwp is either not stabilizing, or is moving out of a jump pad.
2628 (linux_fast_tracepoint_collecting): New.
2629 (maybe_move_out_of_jump_pad): New.
2630 (enqueue_one_deferred_signal): New.
2631 (dequeue_one_deferred_signal): New.
2632 (linux_wait_for_event_1): If moving out of a jump pad, defer
2633 pending signals to later.
2634 (linux_stabilize_threads): New.
2635 (linux_wait_1): Check if threads need moving out of jump pads, and
2637 (stuck_in_jump_pad_callback): New.
2638 (move_out_of_jump_pad_callback): New.
2640 (linux_resume_one_lwp): Handle moving out of jump pads.
2641 (linux_set_resume_request): Dequeue deferred signals.
2642 (need_step_over_p): Also step over fast tracepoint jumps.
2643 (start_step_over): Also uninsert fast tracepoint jumps.
2644 (finish_step_over): Also reinsert fast tracepoint jumps.
2645 (linux_install_fast_tracepoint_jump): New.
2646 (linux_target_ops): Install linux_stabilize_threads and
2647 linux_install_fast_tracepoint_jump_pad.
2648 * linux-low.h (linux_target_ops) <get_thread_area,
2649 install_fast_tracepoint_jump_pad>: New fields.
2650 (struct lwp_info) <collecting_fast_tracepoint,
2651 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2652 (linux_get_thread_area): Declare.
2653 * linux-x86-low.c (jump_insn): New.
2654 (x86_get_thread_area): New.
2655 (append_insns): New.
2657 (amd64_install_fast_tracepoint_jump_pad): New.
2658 (i386_install_fast_tracepoint_jump_pad): New.
2659 (x86_install_fast_tracepoint_jump_pad): New.
2660 (the_low_target): Install x86_get_thread_area and
2661 x86_install_fast_tracepoint_jump_pad.
2662 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2663 (struct fast_tracepoint_jump): New.
2664 (fast_tracepoint_jump_insn): New.
2665 (fast_tracepoint_jump_shadow): New.
2666 (find_fast_tracepoint_jump_at): New.
2667 (fast_tracepoint_jump_here): New.
2668 (delete_fast_tracepoint_jump): New.
2669 (set_fast_tracepoint_jump): New.
2670 (uninsert_fast_tracepoint_jumps_at): New.
2671 (reinsert_fast_tracepoint_jumps_at): New.
2672 (set_breakpoint_at): Use write_inferior_memory.
2673 (uninsert_raw_breakpoint): Use write_inferior_memory.
2674 (check_mem_read): Mask out fast tracepoint jumps.
2675 (check_mem_write): Mask out fast tracepoint jumps.
2676 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2677 (set_fast_tracepoint_jump): Declare.
2678 (delete_fast_tracepoint_jump)
2679 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2680 (reinsert_fast_tracepoint_jumps_at): Declare.
2681 * regcache.c: Don't compile many functions when building the
2682 in-process agent library.
2683 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2684 the register buffer in the heap.
2685 (free_register_cache): If the register buffer isn't owned by the
2686 regcache, don't free it.
2687 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2688 pre-existing register caches.
2689 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2691 (convert_ascii_to_int): : Constify `from' parameter type.
2692 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2693 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2694 the needed buffer in-place.
2695 (relocate_instruction): New.
2696 * server.c (handle_query) <qSymbols>: If the target supports
2697 tracepoints, give it a chance of looking up symbols. Report
2698 support for fast tracepoints.
2699 (handle_status): Stabilize threads.
2700 (process_serial_event): Adjust.
2701 * server.h (struct fast_tracepoint_jump): Forward declare.
2702 (struct process_info) <fast_tracepoint_jumps>: New field.
2703 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2704 (decode_X_packet, decode_M_packet): Adjust.
2705 (relocate_instruction): Declare.
2706 (in_process_agent_loaded): Declare.
2707 (tracepoint_look_up_symbols): Declare.
2708 (struct fast_tpoint_collect_status): Declare.
2709 (fast_tracepoint_collecting): Declare.
2710 (force_unlock_trace_buffer): Declare.
2711 (handle_tracepoint_bkpts): Declare.
2712 (initialize_low_tracepoint)
2713 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2714 * target.h (struct target_ops) <stabilize_threads,
2715 install_fast_tracepoint_jump_pad>: New fields.
2716 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2717 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2718 [HAVE_STDINT_H]: Include stdint.h.
2719 (trace_debug_1): Rename to ...
2720 (trace_vdebug): ... this.
2721 (trace_debug): Rename to ...
2722 (trace_debug_1): ... this. Add `level' parameter.
2724 (ATTR_USED, ATTR_NOINLINE): New.
2725 (IP_AGENT_EXPORT): New.
2726 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2727 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2728 (about_to_request_buffer_space, trace_buffer_is_full)
2729 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2730 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2731 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2732 (traceframe_write_count, traceframes_created)
2733 (trace_state_variables)
2734 New renaming defines.
2735 (struct ipa_sym_addresses): New.
2736 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2738 (ipa_sym_addrs): New.
2739 (all_tracepoint_symbols_looked_up): New.
2740 (in_process_agent_loaded): New.
2741 (write_e_ipa_not_loaded): New.
2742 (maybe_write_ipa_not_loaded): New.
2743 (tracepoint_look_up_symbols): New.
2744 (debug_threads) [IN_PROCESS_AGENT]: New.
2745 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2746 (UNKNOWN_SIDE_EFFECTS): New.
2747 (stop_tracing): New.
2748 (flush_trace_buffer): New.
2749 (stop_tracing_bkpt): New.
2750 (flush_trace_buffer_bkpt): New.
2751 (read_inferior_integer): New.
2752 (read_inferior_uinteger): New.
2753 (read_inferior_data_pointer): New.
2754 (write_inferior_data_pointer): New.
2755 (write_inferior_integer): New.
2756 (write_inferior_uinteger): New.
2757 (struct collect_static_trace_data_action): Delete.
2758 (enum tracepoint_type): New.
2759 (struct tracepoint) <type>: New field `type'.
2760 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2761 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2762 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2763 (tracepoints): Use IP_AGENT_EXPORT.
2764 (last_tracepoint): Don't include in the IPA.
2765 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2766 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2767 (alloced_trace_state_variables): New.
2768 (trace_state_variables): Use IP_AGENT_EXPORT.
2769 (traceframe_t): Delete unused variable.
2770 (circular_trace_buffer): Don't include in the IPA.
2771 (trace_buffer_start): Delete.
2772 (struct trace_buffer_control): New.
2773 (trace_buffer_free): Delete.
2774 (struct ipa_trace_buffer_control): New.
2775 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2776 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2778 (trace_buffer_ctrl): New.
2779 (TRACE_BUFFER_CTRL_CURR): New.
2780 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2781 Reimplement as macros.
2782 (trace_buffer_wrap): Delete.
2783 (traceframe_write_count, traceframe_read_count)
2784 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2785 (struct tracepoint_hit_ctx) <type>: New field.
2786 (struct fast_tracepoint_ctx): New.
2787 (memory_barrier): New.
2789 (record_tracepoint_error): Update atomically in the IPA.
2790 (clear_inferior_trace_buffer): New.
2791 (about_to_request_buffer_space): New.
2792 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2793 updating the same buffer.
2794 (add_tracepoint): Default the tracepoint's type to trap
2795 tracepoint, and orig_size to -1.
2796 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2798 (create_trace_state_variable): New parameter `gdb'. Handle it.
2799 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2800 (cmd_qtdp): Handle fast tracepoints.
2802 (max_jump_pad_size): New.
2803 (gdb_jump_pad_head): New.
2804 (get_jump_space_head): New.
2805 (claim_jump_space): New.
2806 (sort_tracepoints): New.
2807 (MAX_JUMP_SIZE): New.
2808 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2810 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2811 support. Upload fast traceframes, and delete internal IPA
2813 (stop_tracing_handler): New.
2814 (flush_trace_buffer_handler): New.
2815 (cmd_qtstop): Upload fast tracepoints.
2816 (response_tracepoint): Handle fast tracepoints.
2817 (tracepoint_finished_step): Upload fast traceframes. Set the
2818 tracepoint hit context's tracepoint type.
2819 (handle_tracepoint_bkpts): New.
2820 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2821 type. Add comment about fast tracepoints.
2822 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2823 non-existing action_str field.
2824 (get_context_regcache): Handle fast tracepoints.
2825 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2827 (fast_tracepoint_from_jump_pad_address): New.
2828 (fast_tracepoint_from_ipa_tpoint_address): New.
2829 (collecting_t): New.
2830 (force_unlock_trace_buffer): New.
2831 (fast_tracepoint_collecting): New.
2834 (write_inferior_data_ptr): New.
2835 (target_tp_heap): New.
2836 (target_malloc): New.
2837 (download_agent_expr): New.
2839 (download_tracepoints): New.
2840 (download_trace_state_variables): New.
2841 (upload_fast_traceframes): New.
2842 (IPA_FIRST_TRACEFRAME): New.
2843 (IPA_NEXT_TRACEFRAME_1): New.
2844 (IPA_NEXT_TRACEFRAME): New.
2845 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2846 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2847 (gdb_jump_pad_buffer_end): New.
2848 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2849 (initialize_tracepoint): Adjust.
2850 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2851 buffer. Initialize the low module.
2852 * utils.c (PREFIX, TOOLNAME): New.
2853 (malloc_failure): Use PREFIX.
2854 (error): In the IPA, an error causes an exit.
2855 (fatal, warning): Use PREFIX.
2856 (internal_error): Use TOOLNAME.
2857 (NUMCELLS): Increase to 10.
2858 * configure, config.in: Regenerate.
2860 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2862 * server.c (handle_query) <qSupported>: Do two passes over the
2863 qSupported string to avoid nesting strtok.
2865 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2867 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2869 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2871 * configure: Regenerate.
2872 * proc-service.list: New.
2874 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2876 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2879 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2881 * gdbreplay.c (remote_open): Check error return from socket() call by
2882 its equality to -1 not by it being negative.
2883 * remote-utils.c (remote_open): Likewise.
2885 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2887 * config.h: Regenerate.
2889 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2891 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2892 doesn't provide PTRACE_GET_THREAD_AREA.
2894 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2896 * linux-m68k-low.c: Include <asm/ptrace.h>
2897 (ps_get_thread_area): Implement.
2899 2010-05-03 Doug Evans <dje@google.com>
2901 * event-loop.c (struct callback_event): New struct.
2902 (callback_list): New global.
2903 (append_callback_event, delete_callback_event): New functions.
2904 (process_callback): New function.
2905 (start_event_loop): Call it.
2906 * remote-utils.c (NOT_SCHEDULED): Define.
2907 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2908 moved out of readchar.
2909 (readchar): Rewrite. Call reschedule before returning.
2910 (reset_readchar): New function.
2911 (remote_close): Call it.
2912 (process_remaining, reschedule): New functions.
2913 * server.h (callback_handler_func): New typedef.
2914 (append_callback_event, delete_callback_event): Declare.
2916 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2918 * proc-service.c (ps_pglobal_lookup): Use
2919 thread_db_look_up_one_symbol.
2920 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2921 parameter. Use it instead of all_symbols_looked_up.
2922 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2924 (all_symbols_looked_up): Don't declare.
2925 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2926 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2928 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2929 Set all_symbols_looked_up here.
2930 (thread_db_look_up_one_symbol): New.
2931 (thread_db_get_tls_address): Adjust.
2932 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2933 thread_db object on the heap, and tentatively set it in the
2935 (thread_db_init): Don't set all_symbols_looked_up here.
2936 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2938 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2940 * linux-low.c (linux_kill, linux_detach): Adjust.
2941 (status_pending_p_callback): Remove redundant statement. Check
2942 for !TARGET_WAITIKIND_IGNORE, instead of
2943 TARGET_WAITKIND_STOPPED.
2944 (handle_tracepoints): Make sure LWP is locked. Adjust.
2945 (linux_wait_for_event_1): Adjust.
2946 (linux_cancel_breakpoints): New.
2947 (unsuspend_one_lwp): New.
2948 (unsuspend_all_lwps): New.
2949 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2950 (send_sigstop_callback): Change return type to int, add new
2951 `except' parameter and handle it.
2952 (suspend_and_send_sigstop_callback): New.
2953 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2954 pass them down. If SUSPEND, also increment the lwp's suspend
2956 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2957 (need_step_over_p): Don't consider suspended LWPs.
2958 (start_step_over): Adjust.
2959 (proceed_one_lwp): Change return type to int, add new `except'
2960 parameter and handle it.
2961 (unsuspend_and_proceed_one_lwp): New.
2962 (proceed_all_lwps): Use find_inferior instead of
2964 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2965 also decrement the suspend count of LWPs. Pass `except' down,
2966 instead of hacking its suspend count.
2967 (linux_pause_all): Add `freeze' parameter. Adjust.
2968 (linux_unpause_all): New.
2969 (linux_target_ops): Install linux_unpause_all.
2970 * server.c (handle_status): Adjust.
2971 * target.h (struct target_ops): New fields `unpause_all' and
2972 `cancel_breakpoints'. Add new parameter to `pause_all'.
2973 (pause_all): Add new `freeze' parameter.
2975 (cancel_breakpoints): New.
2976 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2978 (cmd_qtstart): Pause threads.
2979 (stop_tracing): Pause threads, and cancel breakpoints.
2980 * win32-low.c (win32_target_ops): Adjust.
2982 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2984 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2985 the inferior right away from here...
2986 (linux_wait_1): ... to here, and adjust to check the thread's
2987 last_resume_kind instead of the lwp's step or stop_expected flags.
2989 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2991 * README: Use consistent `GDB' and `GDBserver' spellings.
2993 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2995 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2996 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2997 (linux_detach_one_lwp): Assume the lwp is stopped.
2998 (any_thread_of): Delete.
2999 (linux_detach): Stop all lwps here. Don't blindly delete all
3001 (delete_lwp_callback): New.
3002 (linux_mourn): Delete all lwps of the process that is gone.
3003 (linux_wait_1): Don't delete the last lwp of the process here.
3004 * mem-break.h (mark_breakpoints_out): Declare.
3005 * mem-break.c (mark_breakpoints_out): New.
3006 (free_all_breakpoints): Use it.
3007 * server.c (handle_target_event): If the process is gone, mark
3009 * thread-db.c (struct thread_db) <create_bp>: New field.
3010 (thread_db_enable_reporting): Fix prototype. Store a thread event
3011 breakpoint reference in the thread_db struct.
3012 (thread_db_load_search): Clear the thread_db object.
3013 (try_thread_db_load_1): Ditto.
3014 (switch_to_process): New.
3015 (disable_thread_event_reporting): Use it.
3016 (remove_thread_event_breakpoints): New.
3017 (thread_db_detach, thread_db_mourn): Use it.
3019 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3021 * linux-low.c (linux_enable_event_reporting): New.
3022 (linux_wait_for_event_1, handle_extended_wait): Use it.
3024 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3026 * linux-low.c (linux_kill_one_lwp, linux_kill)
3027 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3028 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3029 SIGSTOP even if the LWP is stopped.
3030 (send_sigstop_callback): New.
3031 (stop_all_lwps): Use send_sigstop_callback instead.
3032 (linux_resume_one_thread): Adjust.
3033 (proceed_one_lwp): Still proceed an LWP that the client has
3034 requested to stop, if we haven't reported it as stopped yet. Make
3035 sure that LWPs the client want stopped, have a pending SIGSTOP.
3037 2010-04-26 Doug Evans <dje@google.com>
3039 * server.c (handle_general_set): Make static.
3041 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3042 Print received char after testing for error/eof instead of before.
3043 (input_interrupt): Tweak comment.
3045 2010-04-23 Doug Evans <dje@google.com>
3047 * server.c (start_inferior): Print inferior argv if --debug.
3049 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3051 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3052 * nto-x86-low.c: Include server.h
3054 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3056 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3057 be consistent with other sources of this directory.
3058 (init_registers_amd64): Correct name of source file of this function
3061 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3063 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3066 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3068 * win32-i386-low.c: Add 64-bit support.
3069 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3070 (init_registers_amd64): Declare.
3071 (mappings): Add 64-bit version of array.
3072 (init_windows_x86): New function.
3073 (the_low_target): Change init_arch field to init_windows_x86.
3075 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3077 * win32-low.c: Adapt to support also 64-bit architecture.
3078 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3079 (get_image_name): Use SIZE_T type for local variable `done'.
3080 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3081 (toolhelp_get_dll_name): Idem.
3082 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3083 Use uintptr_t typecast to avoid warning.
3084 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3085 (handle_exception): Use phex_nz to avoid warning.
3086 (win32_wait): Remove unused local variable `process'.
3088 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3090 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3093 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3095 * configure.ac: Use `ws2_32' library for srv_mingw.
3096 * configure: Regenerate.
3097 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3098 * remote-utils.c: Likewise.
3100 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3102 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3103 if __x86_64__ is defined.
3105 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3107 * configure: Regenerate.
3109 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3111 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3112 * target.h (target_ops): New get_tib_address field.
3113 * win32-low.h (win32_thread_info): Add thread_local_base field.
3114 * win32-low.c (child_add_thread): Add tlb argument.
3115 Set thread_local_base field to TLB.
3116 (get_child_debug_event): Adapt to child_add_thread change.
3117 (win32_get_tib_address): New function.
3118 (win32_target_ops): Set get_tib_address field to
3119 win32_get_tib_address.
3120 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3122 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3124 * linux-low.c (linux_mourn): Also remove the process.
3125 * server.c (handle_target_event): Don't remove the process here.
3126 * nto-low.c (nto_mourn): New.
3127 (nto_target_ops): Install it.
3128 * spu-low.c (spu_mourn): New.
3129 (spu_target_ops): Install it.
3130 * win32-low.c (win32_mourn): New.
3131 (win32_target_ops): Install it.
3133 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3135 * server.h (buffer_xml_printf): Remove redundant `;'.
3137 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3139 * regcache.c (set_register_cache): Invalidate regcaches before
3140 changing the register cache layout.
3141 (regcache_invalidate_one): Allow a NULL regcache.
3142 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3143 regcaches before changing the register cache layout or the target
3146 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3148 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3149 variable warning on Linux/x86-64.
3151 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3153 GDBserver disconnected tracing support.
3155 * linux-low.c (linux_remove_process): Delete.
3156 (add_lwp): Don't set last_resume_kind here.
3157 (linux_kill): Use `mourn'.
3158 (linux_detach): Use `thread_db_detach', and `mourn'.
3160 (linux_attach_lwp_1): Adjust comment.
3161 (linux_attach): last_resume_kind moved the thread_info; adjust.
3162 (status_pending_p_callback): Adjust.
3163 (linux_wait_for_event_1): Adjust.
3164 (count_events_callback, select_singlestep_lwp_callback)
3165 (select_event_lwp_callback, cancel_breakpoints_callback)
3166 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3167 (proceed_one_lwp): Adjust.
3168 (linux_async): Add debug output.
3169 (linux_thread_stopped): New.
3170 (linux_pause_all): New.
3171 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3173 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3174 (thread_db_free): Delete declaration.
3175 (thread_db_detach, thread_db_mourn): Declare.
3176 * thread-db.c (thread_db_init): Use thread_db_mourn.
3177 (thread_db_free): Delete, split in two.
3178 (disable_thread_event_reporting): New.
3179 (thread_db_detach): New.
3180 (thread_db_mourn): New.
3182 * server.h (struct thread_info) <last_resume_kind>: New field.
3183 <attached>: Add comment.
3184 <gdb_detached>: New field.
3185 (handler_func): Change return type to int.
3186 (handle_serial_event, handle_target_event): Ditto.
3187 (gdb_connected): Declare.
3189 (disconnected_tracing): Declare.
3190 (stop_tracing): Declare.
3192 * server.c (handle_query) <qSupported>: Report support for
3193 disconnected tracing.
3194 (queue_stop_reply_callback): Account for running threads.
3195 (gdb_wants_thread_stopped): New.
3196 (gdb_wants_all_threads_stopped): New.
3197 (gdb_reattached_process): New.
3198 (handle_status): Clear the `gdb_detached' flag of all processes.
3199 In all-stop, stop all threads.
3200 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3201 (process_serial_event): If the remote connection breaks, or if an
3202 exit was forced with "monitor exit", force an event loop exit.
3203 Handle disconnected tracing on detach.
3204 (handle_serial_event): Adjust.
3205 (handle_target_event): If GDB isn't connected, forward events back
3206 to the inferior, unless the last process exited, in which case,
3207 exit gdbserver. Adjust interface.
3209 * remote-utils.c (remote_open): Don't block in accept. Instead
3210 register an event loop source on the listen socket file
3211 descriptor. Refactor bits into ...
3212 (listen_desc): ... this new global.
3213 (gdb_connected): ... this new function.
3214 (enable_async_notification): ... this new function.
3215 (handle_accept_event): ... this new function.
3216 (remote_close): Clear remote_desc.
3218 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3220 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3222 (mourn_inferior): Define.
3223 (target_process_qsupported): Avoid the dangling else problem.
3224 (thread_stopped): Define.
3225 (pause_all): Define.
3226 (target_waitstatus_to_string): Declare.
3227 * target.c (target_waitstatus_to_string): New.
3229 * tracepoint.c (tracing): Make extern.
3230 (disconnected_tracing): New.
3231 (stop_tracing): Make extern. Handle tracing stops due to GDB
3233 (cmd_qtdisconnected): New.
3234 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3235 (handle_tracepoint_general_set): Handle QTDisconnected.
3237 * event-loop.c (event_handler_func): Change return type to int.
3238 (process_event): Bail out if the event handler wants the event
3240 (handle_file_event): Ditto.
3241 (start_event_loop): Bail out if the event handler wants the event
3244 * nto-low.c (nto_target_ops): Adjust.
3245 * spu-low.c (spu_wait): Don't remove the process here.
3246 (spu_target_ops): Adjust.
3247 * win32-low.c (win32_wait): Don't remove the process here.
3248 (win32_target_ops): Adjust.
3250 2010-04-11 Pedro Alves <pedro@codesourcery.com>
3252 * regcache.c (realloc_register_cache): Invalidate inferior's
3253 regcache before recreating it.
3255 2010-04-09 Pedro Alves <pedro@codesourcery.com>
3257 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3259 2010-04-09 Stan Shebs <stan@codesourcery.com>
3260 Pedro Alves <pedro@codesourcery.com>
3262 * server.h (LONGEST): New.
3263 (struct thread_info) <while_stepping>: New field.
3264 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3266 (initialize_tracepoint, handle_tracepoint_general_set)
3267 (handle_tracepoint_query, tracepoint_finished_step)
3268 (tracepoint_was_hit, release_while_stepping_state_list):
3269 (current_traceframe): Declare.
3270 * server.c (handle_general_set): Handle tracepoint packets.
3272 (write_memory): New.
3273 (handle_search_memory_1): Use read_memory.
3274 (handle_query): Report support for conditional tracepoints, trace
3275 state variables, and tracepoint sources. Handle tracepoint
3277 (main): Initialize the tracepoints module.
3278 (process_serial_event): Handle traceframe reads/writes.
3280 * linux-low.c (handle_tracepoints): New.
3281 (linux_wait_1): Call it.
3282 (linux_resume_one_lwp): Handle while-stepping.
3283 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3284 (linux_target_ops): Install them.
3285 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3287 * linux-x86-low.c (x86_supports_tracepoints): New.
3288 (the_low_target). Install it.
3290 * mem-break.h (delete_breakpoint): Declare.
3291 * mem-break.c (delete_breakpoint): Make external.
3293 * target.h (struct target_ops): Add `supports_tracepoints',
3294 `read_pc', and `write_pc' fields.
3295 (target_supports_tracepoints): Define.
3296 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3299 * regcache.h (struct regcache) <registers_owned>: New field.
3300 (init_register_cache, regcache_cpy): Declare.
3301 (regcache_read_pc, regcache_write_pc): Declare.
3302 (register_cache_size): Declare.
3303 (supply_regblock): Declare.
3304 * regcache.c (init_register_cache): New.
3305 (new_register_cache): Use it.
3306 (regcache_cpy): New.
3307 (register_cache_size): New.
3308 (supply_regblock): New.
3309 (regcache_read_pc, regcache_write_pc): New.
3311 * tracepoint.c: New.
3313 * Makefile.in (OBS): Add tracepoint.o.
3314 (tracepoint.o): New rule.
3316 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3318 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3320 (i386-mmx.c): Likewise.
3321 (i386-mmx-linux.o): Likewise.
3322 (i386-mmx-linux.c): Likewise.
3324 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3325 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3326 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3327 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3329 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3330 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3331 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3333 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3335 * Makefile.in (clean): Updated.
3337 (i386-avx.c): Likewise.
3338 (i386-avx-linux.o): Likewise.
3339 (i386-avx-linux.c): Likewise.
3340 (amd64-avx.o): Likewise.
3341 (amd64-avx.c): Likewise.
3342 (amd64-avx-linux.o): Likewise.
3343 (amd64-avx-linux.c): Likewise.
3345 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3346 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3347 (srv_amd64_regobj): Add amd64-avx.o.
3348 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3349 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3350 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3351 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3352 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3353 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3354 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3356 * i387-fp.c: Include "i386-xstate.h".
3358 (i387_cache_to_xsave): Likewise.
3359 (i387_xsave_to_cache): Likewise.
3360 (x86_xcr0): Likewise.
3362 * i387-fp.h (i387_cache_to_xsave): Likewise.
3363 (i387_xsave_to_cache): Likewise.
3364 (x86_xcr0): Likewise.
3366 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3367 * linux-crisv32-low.c (target_regsets): Likewise.
3368 * linux-m68k-low.c (target_regsets): Likewise.
3369 * linux-mips-low.c (target_regsets): Likewise.
3370 * linux-ppc-low.c (target_regsets): Likewise.
3371 * linux-s390-low.c (target_regsets): Likewise.
3372 * linux-sh-low.c (target_regsets): Likewise.
3373 * linux-sparc-low.c (target_regsets): Likewise.
3374 * linux-xtensa-low.c (target_regsets): Likewise.
3376 * linux-low.c: Include <sys/uio.h>.
3377 (regsets_fetch_inferior_registers): Support nt_type.
3378 (regsets_store_inferior_registers): Likewise.
3379 (linux_process_qsupported): New.
3380 (linux_target_ops): Add linux_process_qsupported.
3382 * linux-low.h (regset_info): Add nt_type.
3383 (linux_target_ops): Add process_qsupported.
3385 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3387 (init_registers_i386_avx_linux): New.
3388 (init_registers_amd64_avx_linux): Likewise.
3389 (xmltarget_i386_linux_no_xml): Likewise.
3390 (xmltarget_amd64_linux_no_xml): Likewise.
3391 (PTRACE_GETREGSET): Likewise.
3392 (PTRACE_SETREGSET): Likewise.
3393 (x86_fill_xstateregset): Likewise.
3394 (x86_store_xstateregset): Likewise.
3395 (use_xml): Likewise.
3396 (x86_linux_update_xmltarget): Likewise.
3397 (x86_linux_process_qsupported): Likewise.
3398 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3399 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3400 init_registers_i386_linux here. Call
3401 x86_linux_update_xmltarget.
3402 (the_low_target): Add x86_linux_process_qsupported.
3404 * server.c (handle_query): Call target_process_qsupported.
3406 * target.h (target_ops): Add process_qsupported.
3407 (target_process_qsupported): New.
3409 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3411 * inferiors.c (add_thread): Set last_status kind to
3412 TARGET_WAITKIND_IGNORE.
3413 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3414 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3415 (linux_wait_1): Move `thread' local definition to block that uses
3416 it. Don't NULL initialize `event_child'.
3417 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3418 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3419 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3421 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3423 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3424 an extended waitstatus, or by a watchpoint.
3425 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3426 thread was stepping or has been stopped by a watchpoint.
3428 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3430 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3431 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3432 of another, then delete the previous, and validate all
3434 (validate_inserted_breakpoint): New.
3435 (delete_disabled_breakpoints): New.
3436 (validate_breakpoints): New.
3437 (check_mem_read): Validate breakpoints before trusting their
3438 shadow. Delete disabled breakpoints.
3439 (check_mem_write): Validate breakpoints before trusting they
3440 should be inserted. Delete disabled breakpoints.
3441 * mem-break.h (validate_breakpoints):
3442 * server.c (handle_query): Validate breakpoints when we see a
3445 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3447 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3448 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3449 if we could tell there's a GDB breakpoint at stop_pc.
3450 (need_step_over_p): Don't do a step over if we find a GDB
3451 breakpoint at the resume PC.
3453 * mem-break.c (struct raw_breakpoint): New.
3454 (enum bkpt_type): New type `gdb_breakpoint'.
3455 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3456 fields. New field `raw'.
3457 (find_raw_breakpoint_at): New.
3458 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3460 (set_breakpoint_at): Adjust.
3461 (delete_raw_breakpoint): New.
3462 (release_breakpoint): New.
3463 (delete_breakpoint): Rename to...
3464 (delete_breakpoint_1): ... this. Add proc parameter. Use
3465 release_breakpoint. Return ENOENT.
3466 (delete_breakpoint): Reimplement.
3467 (find_breakpoint_at): Delete.
3468 (find_gdb_breakpoint_at): New.
3469 (delete_breakpoint_at): Delete.
3470 (set_gdb_breakpoint_at): New.
3471 (delete_gdb_breakpoint_at): New.
3472 (gdb_breakpoint_here): New.
3473 (set_reinsert_breakpoint): Use release_breakpoint.
3474 (uninsert_breakpoint): Rename to ...
3475 (uninsert_raw_breakpoint): ... this.
3476 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3477 (reinsert_raw_breakpoint): Change parameter type to
3479 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3481 (check_breakpoints): Adjust. Use release_breakpoint.
3482 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3483 (breakpoint_inserted_here): Ditto.
3484 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3485 Don't trust the breakpoint's shadow if it is not inserted.
3486 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3487 (delete_all_breakpoints): Adjust.
3488 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3489 use delete_breakpoint_1.
3491 * mem-break.h (breakpoints_supported): Delete declaration.
3492 (set_gdb_breakpoint_at): Declare.
3493 (gdb_breakpoint_here): Declare.
3494 (delete_breakpoint_at): Delete.
3495 (delete_gdb_breakpoint_at): Declare.
3497 * server.h (struct raw_breakpoint): Forward declare.
3498 (struct process_info): New field `raw_breakpoints'.
3500 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3503 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3505 * linux-low.c (status_pending_p_callback): Fix comment.
3506 (linux_wait_for_event_1): Move most of the internal breakpoint
3507 handling from here...
3508 (linux_wait_1): ... to here.
3509 (count_events_callback): New.
3510 (select_singlestep_lwp_callback): New.
3511 (select_event_lwp_callback): New.
3512 (cancel_breakpoints_callback): New.
3513 (select_event_lwp): New.
3514 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3515 priority to all LWPs that have had events that should be reported
3516 to the client. Cancel breakpoints when about to reporting the
3517 event to the client, not while stopping lwps. No longer cancel
3518 finished single-steps here.
3519 (cancel_finished_single_step): Delete.
3520 (cancel_finished_single_steps): Delete.
3522 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3524 * mem-break.c (enum bkpt_type): New.
3525 (struct breakpoint): New field `type'.
3526 (set_breakpoint_at): Change return type to struct breakpoint
3527 pointer. Set type to `other_breakpoint' by default.
3528 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3529 in the breakpoint list.
3530 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3531 (reinsert_breakpoint): Rename to ...
3532 (reinsert_raw_breakpoint): ... this.
3533 (reinsert_breakpoints_at): Adjust.
3534 * mem-break.h (struct breakpoint): Declare.
3535 (set_breakpoint_at): Change return type to struct breakpoint
3538 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3540 * server.c (handle_query): Assign, not compare.
3542 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3544 Teach linux gdbserver to step-over-breakpoints.
3546 * linux-low.c (can_hardware_single_step): New.
3547 (supports_breakpoints): New.
3548 (handle_extended_wait): If stopping threads, read the stop pc of
3551 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3552 low target doesn't support retrieving the PC.
3553 (add_lwp): Set last_resume_kind to resume_continue.
3554 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3555 (linux_attach): Don't clear stop_expected. Set the lwp's
3556 last_resume_kind to resume_stop.
3557 (linux_detach_one_lwp): Don't check for removed breakpoints.
3558 (check_removed_breakpoint): Delete.
3559 (status_pending_p): Rename to ...
3560 (status_pending_p_callback): ... this. Don't check for removed
3561 breakpoints. Don't consider threads that are stopped from GDB's
3563 (linux_wait_for_lwp): Always read the stop_pc here.
3564 (cancel_breakpoint): New.
3565 (step_over_bkpt): New global.
3566 (linux_wait_for_event_1): Implement stepping over breakpoints.
3567 (gdb_wants_lwp_stopped): New.
3568 (gdb_wants_all_stopped): New.
3569 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3570 single-step traps here. Store the thread's last reported target
3572 (send_sigstop): Don't clear stop_expected. Always set it,
3574 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3575 (cancel_finished_single_step): New.
3576 (cancel_finished_single_steps): New.
3577 (wait_for_sigstop): Don't cancel finished single-step traps here.
3578 (linux_resume_one_lwp): Don't check for removed breakpoints.
3579 Don't set `step' on non-hardware step archs.
3580 (linux_set_resume_request): Ignore resume_stop requests if already
3581 stopping or stopped. Set the lwp's last_resume_kind.
3582 (resume_status_pending_p): Don't check for removed breakpoints.
3583 (need_step_over_p): New.
3584 (start_step_over): New.
3585 (finish_step_over): New.
3586 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3587 requests. Clear the thread's last reported target waitstatus.
3588 Don't use the `suspended' flag. Don't consider pending breakpoints.
3589 (linux_resume): Start a step-over if necessary.
3590 (proceed_one_lwp): New.
3591 (proceed_all_lwps): New.
3592 (unstop_all_lwps): New.
3593 * linux-low.h (struct lwp_info): Rewrite comment for the
3594 `suspended' flag. Add the `stop_pc' field. Delete the
3595 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3596 Add `'last_resume_kind' and `need_step_over' fields.
3597 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3598 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3599 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3600 (set_raw_breakpoint_at): New.
3601 (set_breakpoint_at): Rewrite to use it.
3602 (reinsert_breakpoint_handler): Delete.
3603 (set_reinsert_breakpoint): New.
3604 (reinsert_breakpoint_by_bp): Delete.
3605 (delete_reinsert_breakpoints): New.
3606 (uninsert_breakpoint): Rewrite.
3607 (uninsert_breakpoints_at): New.
3608 (reinsert_breakpoint): Rewrite.
3609 (reinsert_breakpoints_at): New.
3610 (check_breakpoints): Rewrite.
3611 (breakpoint_here): New.
3612 (breakpoint_inserted_here): New.
3613 (check_mem_read): Adjust.
3614 * mem-break.h (breakpoints_supported, breakpoint_here)
3615 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3616 (reinsert_breakpoint_by_bp): Delete declaration.
3617 (delete_reinsert_breakpoints): Declare.
3618 (reinsert_breakpoint): Delete declaration.
3619 (reinsert_breakpoints_at): Declare.
3620 (uninsert_breakpoint): Delete declaration.
3621 (uninsert_breakpoints_at): Declare.
3622 (check_breakpoints): Adjust prototype.
3623 * server.h: Adjust include order.
3624 (struct thread_info): Declare here. Add a `last_status' field.
3626 2010-03-23 Michael Snyder <msnyder@vmware.com>
3628 * server.c (crc32): New function.
3629 (handle_query): Add handling for 'qCRC:' request.
3631 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3633 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3634 lwp had been stopped by a watchpoint.
3636 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3638 * server.h (internal_error): Declare.
3639 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3640 * utils.c (internal_error): New function.
3642 2010-03-15 Andreas Schwab <schwab@redhat.com>
3644 * configure.srv: Fix typo setting srv_regobj.
3646 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3648 * linux-low.c (fetch_register): Avoid passing a non string literal
3650 (usr_store_inferior_registers): Ditto.
3652 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3654 * linux-low.c (linux_write_memory): Bail out early if peeking
3657 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3659 * linux-low.h (struct lwp_info): New fields
3660 `stopped_by_watchpoint' and `stopped_data_address'.
3661 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3662 here, and cache them in the lwp object.
3663 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3665 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3667 (linux_stopped_by_watchpoint): Rewrite.
3668 (linux_stopped_data_address): Rewrite.
3670 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3672 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3673 switching the current inferior, not before.
3675 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3677 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3678 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3679 i386-linux.c and amd64-linux.c.
3680 (reg-i386.o): Removed.
3681 (reg-i386.c): Likewise.
3682 (reg-i386-linux.o): Likewise.
3683 (reg-i386-linux.c): Likewise.
3684 (reg-x86-64.o): Likewise.
3685 (reg-x86-64.c): Likewise.
3686 (reg-x86-64-linux.o): Likewise.
3687 (reg-x86-64-linux.c): Likewise.
3690 (i386-linux.o): Likewise.
3691 (i386-linux.c): Likewise.
3692 (amd64.o): Likewise.
3693 (amd64.c): Likewise.
3694 (amd64-linux.o): Likewise.
3695 (amd64-linux.c): Likewise.
3697 * configure.srv (srv_i386_regobj): New.
3698 (srv_i386_linux_regobj): Likewise.
3699 (srv_amd64_regobj): Likewise.
3700 (srv_amd64_linux_regobj): Likewise.
3701 (srv_i386_32bit_xmlfiles): Likewise.
3702 (srv_i386_64bit_xmlfiles): Likewise.
3703 (srv_i386_xmlfiles): Likewise.
3704 (srv_amd64_xmlfiles): Likewise.
3705 (srv_i386_linux_xmlfiles): Likewise.
3706 (srv_amd64_linux_xmlfiles): Likewise.
3707 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3708 srv_xmlfiles to $srv_i386_xmlfiles.
3709 (i[34567]86-*-mingw32ce*): Likewise.
3710 (i[34567]86-*-mingw*): Likewise.
3711 (i[34567]86-*-nto*): Likewise.
3712 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3713 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3714 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3715 (x86_64-*-linux*): Likewise.
3717 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3718 (init_registers_amd64_linux): New.
3719 (x86_arch_setup): Replace init_registers_x86_64_linux with
3720 init_registers_amd64_linux.
3722 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3724 * configure.ac: Check for libdl. If it is not available link against
3725 static libthread_db.
3726 * configure: Regenerate.
3728 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3732 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3733 handing a read watchpoint.
3734 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3736 2010-02-12 Doug Evans <dje@google.com>
3738 * linux-low.c (linux_supports_tracefork_flag): Document.
3739 (linux_look_up_symbols): Add comment.
3741 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3743 * regcache.c (supply_register): Clear regcache if buf is NULL.
3745 2010-02-02 Nicolas Roche <roche@sourceware.org>
3746 Joel Brobecker <brobecker@adacore.com>
3748 * inferiors.c (find_inferior): Add function documentation.
3749 (unloaded_dll): Handle the case where the unloaded dll has not
3750 been previously registered in the dll list.
3752 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3754 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3755 (thumb2_breakpoint): New.
3756 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3758 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3760 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3761 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3764 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3766 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3768 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3770 * linux-s390-low.c (s390_collect_ptrace_register)
3771 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3773 2010-01-21 Doug Evans <dje@google.com>
3775 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3776 (PTRACE_ARG4_TYPE): New macro.
3777 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3778 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3779 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3780 (usr_store_inferior_registers): Ditto.
3781 (linux_read_memory, linux_write_memory): Ditto.
3782 (linux_test_for_tracefork): Ditto.
3784 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3785 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3787 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3789 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3792 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3794 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3795 prototype to take a regcache. Adjust.
3797 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3799 * regcache.h (struct thread_info): Forward declare.
3800 (struct regcache): New.
3801 (new_register_cache): Adjust prototype.
3802 (get_thread_regcache): Declare.
3803 (free_register_cache): Adjust prototype.
3804 (registers_to_string, registers_from_string): Ditto.
3805 (supply_register, supply_register_by_name, collect_register)
3806 (collect_register_as_string, collect_register_by_name): Ditto.
3807 * regcache.c (struct inferior_regcache_data): Delete.
3808 (get_regcache): Rename to ...
3809 (get_thread_regcache): ... this. Adjust. Switch inferior before
3811 (regcache_invalidate_one): Adjust.
3812 (regcache_invalidate): Fix prototype.
3813 (new_register_cache): Return the new register cache.
3814 (free_register_cache): Change prototype.
3815 (realloc_register_cache): Adjust.
3816 (registers_to_string): Change prototype to take a regcache. Adjust.
3817 (registers_from_string): Ditto.
3818 (register_data): Ditto.
3819 (supply_register): Ditto.
3820 (supply_register_by_name): Ditto.
3821 (collect_register): Ditto.
3822 (collect_register_as_string): Ditto.
3823 (collect_register_by_name): Ditto.
3824 * server.c (process_serial_event): Adjust.
3825 * linux-low.h (regset_fill_func, regset_store_func): Change
3827 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3829 * linux-low.c (get_stop_pc): Adjust.
3830 (check_removed_breakpoint): Adjust.
3831 (linux_wait_for_event): Adjust.
3832 (linux_resume_one_lwp): Adjust.
3833 (fetch_register): Add regcache parameter. Adjust.
3834 (usr_store_inferior_registers): Ditto.
3835 (regsets_fetch_inferior_registers): Ditto.
3836 (regsets_store_inferior_registers): Ditto.
3837 (linux_fetch_registers, linux_store_registers): Ditto.
3838 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3840 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3841 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3842 prototype to take a regcache.
3843 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3844 * remote-utils.c (convert_ascii_to_int, outreg)
3845 (prepare_resume_reply): Change prototype to take a regcache.
3847 * target.h (struct target_ops) <fetch_registers, store_registers>:
3848 Change prototype to take a regcache.
3849 (fetch_inferior_registers, store_inferior_registers): Change
3850 prototype to take a regcache. Adjust.
3851 * proc-service.c (ps_lgetregs): Adjust.
3852 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3853 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3854 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3855 take a regcache. Adjust.
3856 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3857 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3858 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3859 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3860 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3861 (cris_cannot_fetch_register):
3862 (cris_breakpoint_at): Change prototype to take a regcache.
3864 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3865 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3866 to take a regcache. Adjust.
3867 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3869 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3870 take a regcache. Adjust.
3871 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3872 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3873 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3874 * linux-mips-low.c (mips_get_pc):
3875 (mips_set_pc): Change prototype to take a regcache. Adjust.
3876 (mips_reinsert_addr): Adjust.
3877 (mips_collect_register): Change prototype to take a regcache.
3879 (mips_supply_register):
3880 (mips_collect_register_32bit, mips_supply_register_32bit)
3881 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3882 (mips_store_fpregset): Ditto.
3883 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3885 (parse_spufs_run): Adjust.
3886 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3887 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3888 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3889 take a regcache. Adjust.
3890 * linux-s390-low.c (s390_collect_ptrace_register)
3891 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3892 (s390_set_pc): Change prototype to take a regcache. Adjust.
3893 (s390_arch_setup): Adjust.
3894 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3895 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3896 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3897 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3898 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3900 (sparc_breakpoint_at): Adjust.
3901 * linux-xtensa-low.c (xtensa_fill_gregset):
3902 (xtensa_store_gregset):
3903 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3904 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3905 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3906 prototype to take a regcache. Adjust.
3907 * win32-arm-low.c (arm_fetch_inferior_register)
3908 (arm_store_inferior_register): Change prototype to take a
3910 * win32-i386-low.c (i386_fetch_inferior_register)
3911 (i386_store_inferior_register): Change prototype to take a
3913 * win32-low.c (child_fetch_inferior_registers)
3914 (child_store_inferior_registers): Change prototype to take a
3916 (win32_wait): Adjust.
3917 (win32_fetch_inferior_registers): Change prototype to take a
3919 (win32_store_inferior_registers): Adjust.
3920 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3921 store_inferior_register>: Change prototype to take a regcache.
3923 2010-01-20 Doug Evans <dje@google.com>
3925 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3927 (linux_wait_for_event1, linux_init_signals): Ditto.
3928 (W_STOPCODE): Provide definition if missing.
3930 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3932 * linux-low.c (linux_core_of_thread): New.
3933 (compare_ints, show_process, list_threads): New.
3934 (linux_qxfer_osdata): Report threads and cores.
3935 (linux_target_op): Register linux_core_of_thread.
3936 * remote-utils.c (prepare_resume_reply): Report the core.
3937 (buffer_xml_printf): Support %d specifier.
3938 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3940 (handle_query): Handle qXfer:threads. Announce availability
3942 * target.h (struct target_ops): New field core_of_thread.
3944 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3946 * Makefile.in (clean): Remove new generated files.
3947 (reg-s390.o, reg-s390.c): Remove rules.
3948 (reg-s390x.o, reg-s390x.c): Likewise.
3949 (s390-linux32.o, s390-linux32.c): Add rules.
3950 (s390-linux64.o, s390-linux64.c): Likewise.
3951 (s390x-linux64.o, s390x-linux64.c): Likewise.
3952 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3953 * linux-s390-low.c: Include <elf.h>.
3954 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3955 (init_registers_s390): Remove prototype.
3956 (init_registers_s390x): Likewise.
3957 (init_registers_s390_linux32): Add prototype.
3958 (init_registers_s390_linux64): Likewise.
3959 (init_registers_s390x_linux64): Likewise.
3960 (s390_num_regs_3264): New define.
3961 (s390_regmap_3264): New global variable.
3962 (s390_cannot_fetch_register): Remove obsolete check.
3963 (s390_cannot_store_register): Likewise.
3964 (s390_collect_ptrace_register): Handle upper/lower register halves.
3965 (s390_supply_ptrace_register): Likewise.
3966 (s390_fill_gregset): Update to register number changes.
3967 (s390_get_hwcap): New routine.
3968 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3969 Install appropriate regmap and register set.
3971 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3973 * server.c (gdbserver_version): Update copyright year to 2010.
3974 * gdbreplay.c (gdbreplay_version): Likewise.
3976 2009-12-28 Doug Evans <dje@google.com>
3978 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3979 elf/external.h. Include <elf.h> instead but only if necessary.
3981 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3983 * linux-low.c (linux_remove_process): Remove `detaching'
3984 parameter. Don't release/detach from thread_db here.
3985 (linux_kill): Release/detach from thread_db here, ...
3986 (linux_detach): ... and here, before actually detaching.
3987 (linux_wait_1): ... and here, when a process exits.
3988 * thread-db.c (any_thread_of): New.
3989 (thread_db_free): Switch the current inferior to a thread of the
3992 2009-12-21 Doug Evans <dje@google.com>
3994 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3996 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3997 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3998 warning ifndef __NR_tkill. Move setting of errno there too.
3999 Delete unnecessary resetting of errno after syscall.
4000 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4002 * configure.ac: Check for dladdr.
4003 * config.in: Regenerate.
4004 * configure: Regenerate.
4005 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4006 (try_thread_db_load): Update.
4008 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4010 2009-12-18 Doug Evans <dje@google.com>
4012 * event-loop.c: Include unistd.h if it exists.
4014 * linux-low.c (my_waitpid): Move definition away from being in
4015 between linux_tracefork_child/linux_test_for_tracefork.
4017 * gdb_proc_service.h (psaddr_t): Fix type.
4018 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4019 signature to match glibc.
4021 2009-12-16 Doug Evans <dje@google.com>
4023 * linux-low.c (linux_read_memory): Fix argument to read.
4025 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4027 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4028 events, don't leave current_inferior pointing at null.
4030 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4032 * win32-low.c (LOG): Delete.
4033 (OUTMSG): Output to stderr.
4034 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4035 on compile time LOG macro.
4036 (win32_wait): Fix debug output.
4038 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4040 * win32-low.c (win32_add_one_solib): If the dll name is
4041 "ntdll.dll", prepend the system directory to the dll path.
4043 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4045 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4047 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4048 Vladimir Prus <vladimir@codesourcery.com>
4050 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4051 * configure.ac: Check for __mcoldfire__ and set
4052 gdb_cv_m68k_is_coldfire.
4053 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4054 reg-cf.o and reg-m68k.o.
4055 * configure: Regenerated.
4057 2009-11-16 Pedro Alves <pedro@codesourcery.com>
4059 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4060 Pass it to thread_db_free.
4061 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4062 proper `detaching' argument to linux_remove_process.
4063 * linux-low.h (thread_db_free): Add `detaching' parameter.
4064 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4066 (thread_db_free): Add `detaching' parameter. Only
4067 call td_ta_clear_event if detaching from process.
4069 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4071 * thread-db.c (thread_db_free): Fix typo.
4073 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4076 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4078 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4080 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4081 with an i686 compiler.
4082 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4084 * configure: Rebuilt.
4086 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4090 * server.c (handle_search_memory_1): Correct read_addr initialization
4091 in loop for searching subsequent chunks.
4093 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4095 * configure.ac: New --with-libthread-db option.
4096 * thread-db.c: Allow direct dependence on libthread_db.
4097 (thread_db_free): Adjust.
4098 * config.in: Regenerate.
4099 * configure: Likewise.
4101 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4104 * thread-db.c (attach_thread): New function.
4105 (maybe_attach_thread): Return success/failure.
4106 (find_new_threads_callback): Adjust.
4107 (thread_db_find_new_threads): Loop until no new threads.
4109 2009-10-13 Pedro Alves <pedro@codesourcery.com>
4111 * proc-service.c (ps_lgetregs): Formatting.
4113 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4115 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4116 * configure.ac: Adjust.
4117 * linux-low.h (struct process_info_private): Move members to struct
4119 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4120 * linux-low.c (linux_remove_process): Adjust.
4121 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4122 * server.c (handle_query): Move code ...
4123 (handle_monitor_command): ... here. New function.
4124 * target.h (struct target_ops): New member.
4125 * thread-db.c (struct thread_db): New.
4126 (libthread_db_search_path): New variable.
4127 (thread_db_create_event, thread_db_enable_reporting)
4128 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4129 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4130 (try_thread_db_load_1, dladdr_to_soname): New functions.
4131 (try_thread_db_load, thread_db_load_search): New functions.
4132 (thread_db_init): Search for libthread_db.
4133 (thread_db_free): New function.
4134 (thread_db_handle_monitor_command): Likewise.
4135 * config.in: Regenerate.
4136 * configure: Regenerate.
4138 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4140 * spu-low.c (spu_kill): Wait for inferior to terminate.
4141 Call clear_inferiors.
4142 (spu_detach): Call clear_inferiors.
4144 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4146 * aclocal.m4: Regenerate.
4147 * config.in: Likewise.
4148 * configure: Likewise.
4150 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4152 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4153 (parse_spufs_run): New function.
4154 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4155 (ppc_breakpoint_at): Handle SPU breakpoints.
4157 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4159 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4160 (SPUFS_MAGIC): Define.
4161 (spu_enumerate_spu_ids): New function.
4162 (linux_qxfer_spu): New function.
4163 (linux_target_ops): Install linux_qxfer_spu.
4165 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4167 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4168 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4169 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4170 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4171 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4172 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4173 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4174 (init_registers_powerpc_cell32l): Add prototype.
4175 (init_registers_powerpc_cell64l): Likewise.
4176 (ppc_arch_setup): Detect Cell/B.E. architecture.
4178 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4180 * Makefile.in (datarootdir): New variable.
4182 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4184 * linux-low.c (linux_write_memory): Update debugging output.
4185 * Makefile.in (clean): Add new descriptions.
4186 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4187 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4188 * configure.srv: Add new files for arm*-*-linux*.
4189 * linux-arm-low.c: Add new declarations.
4190 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4191 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4192 (HWCAP_VFPv3D16): New.
4193 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4194 instead of __IWMMXT__.
4195 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4196 (arm_arch_setup): New.
4197 (target_regsets): Remove #ifdef. Add VFP regset.
4198 (the_low_target): Use arm_arch_setup.
4200 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4202 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4203 the main thread again.
4205 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4207 Adding Neutrino gdbserver.
4208 * configure: Regenerated.
4209 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4210 * configure.srv (i[34567]86-*-nto*): New target.
4211 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4212 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4213 (nto_comctrl) [__QNX__]: New function.
4214 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4216 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4218 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4221 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4222 Pedro Alves <pedro@codesourcery.com>
4224 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4225 don't support CONTEXT_EXTENDED_REGISTERS.
4226 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4227 (the_low_target): Install them.
4228 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4229 failing with ERROR_PIPE_NOT_CONNECTED.
4231 2009-06-30 Doug Evans <dje@google.com>
4232 Pierre Muller <muller@ics.u-strasbg.fr>
4234 Add h/w watchpoint support to x86-linux, win32-i386.
4235 * Makefile.in (SFILES): Add i386-low.c
4236 (i386_low_h): Define.
4237 (i386-low.o): Add dependencies.
4238 (linux-x86-low.o): Add i386-low.h dependency.
4239 (win32-i386-low.o): Ditto.
4240 * i386-low.c: New file.
4241 * i386-low.h: New file.
4242 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4243 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4244 * linux-low.c (linux_add_process): Initialize arch_private.
4245 (linux_remove_process): Free arch_private.
4246 (add_lwp): Initialize arch_private.
4247 (delete_lwp): Free arch_private.
4248 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4250 * linux-low.h (process_info_private): New member arch_private.
4251 (lwp_info): New member arch_private.
4252 (linux_target_ops): New members new_process, new_thread,
4254 (ptid_of): New macro.
4255 * linux-x86-low.c: Include stddef.h, i386-low.h.
4256 (arch_process_info): New struct.
4257 (arch_lwp_info): New struct.
4258 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4259 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4260 (i386_dr_low_get_status): New function.
4261 (x86_insert_point, x86_remove_point): New functions.
4262 (x86_stopped_by_watchpoint): New function.
4263 (x86_stopped_data_address): New function.
4264 (x86_linux_new_process, x86_linux_new_thread): New functions.
4265 (x86_linux_prepare_to_resume): New function.
4266 (the_low_target): Add entries for insert_point, remove_point,
4267 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4269 * server.c (debug_hw_points): New global.
4270 (monitor_show_help): Document set debug-hw-points.
4271 (handle_query): Process "set debug-hw-points".
4272 * server.h (debug_hw_points): Declare.
4273 (paddress): Declare.
4274 * utils.c (NUMCELLS, CELLSIZE): New macros.
4275 (get_sell, xsnprintf, paddress): New functions.
4276 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4277 remove_point, stopped_by_watchpoint, stopped_data_address.
4278 * win32-i386-low.c: Include i386-low.h.
4279 (debug_reg_state): Replaces dr.
4280 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4281 (i386_dr_low_get_status): New function.
4282 (i386_insert_point, i386_remove_point): New functions.
4283 (i386_stopped_by_watchpoint): New function.
4284 (i386_stopped_data_address): New function.
4285 (i386_initial_stuff): Update.
4286 (get_thread_context,set_thread_context,i386_thread_added): Update.
4287 (the_low_target): Add entries for insert_point,
4288 remove_point, stopped_by_watchpoint, stopped_data_address.
4289 * win32-low.c (win32_insert_watchpoint): New function.
4290 (win32_remove_watchpoint): New function.
4291 (win32_stopped_by_watchpoint): New function.
4292 (win32_stopped_data_address): New function.
4293 (win32_target_ops): Add entries for insert_watchpoint,
4294 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4295 * win32-low.h (win32_target_ops): New members insert_point,
4296 remove_point, stopped_by_watchpoint, stopped_data_address.
4298 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4300 * server.c (process_serial_event): Re-return unsupported, not
4301 error, if the type isn't recognized. Re-allow supporting only
4302 insert or remove packets. Also call require_running for
4303 breakpoints. Add missing break statement to default case. Tidy.
4304 * target.h (struct target_ops): Rename insert_watchpoint to
4305 insert_point, and remove_watchpoint to remove_point.
4307 * linux-low.h (struct linux_target_ops): Likewise.
4308 * linux-low.c (linux_insert_watchpoint): Rename to ...
4309 (linux_insert_point): ... this. Adjust.
4310 (linux_remove_watchpoint): Rename to ...
4311 (linux_remove_point): ... this. Adjust.
4312 (linux_target_ops): Adjust.
4313 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4314 (cris_insert_point): ... this.
4315 (cris_remove_watchpoint): Rename to ...
4316 (cris_remove_point): ... this.
4317 (the_low_target): Adjust.
4319 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4321 * server.c (handle_v_kill): Pass signal_pid to
4322 kill_inferior if multi_process is zero.
4324 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4326 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4327 * target.h (target_ops): Comment for *_watchpoint to make it clear
4328 the functions can get types '0' and '1'.
4330 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4332 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4333 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4334 * regcache.c (get_regcache): Likewise.
4335 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4336 * win32-low.c (child_fetch_inferior_registers): Remove check for
4339 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4340 Pedro Alves <pedro@codesourcery.com>
4342 * target.h (struct target_ops) <supports_multi_process>: New
4344 (target_supports_multi_process): New.
4345 * server.c (handle_query): Even if GDB reports support, only
4346 enable multi-process if the target also supports it. Report
4347 multi-process support only if the target backend supports it.
4348 * linux-low.c (linux_supports_multi_process): New function.
4349 (linux_target_ops): Install it as target_supports_multi_process
4352 2009-05-24 Doug Evans <dje@google.com>
4354 Global renaming of find_thread_pid to find_thread_ptid.
4355 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4356 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4357 All callers updated.
4359 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4360 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4363 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4364 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4365 (linux_resume_one_lwp): Ditto.
4367 2009-05-23 Doug Evans <dje@google.com>
4369 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4370 from struct inferior_list_entry * to struct lwp_info *.
4371 All callers updated.
4373 2009-05-13 Doug Evans <dje@google.com>
4375 * linux-x86-low.c: Don't include assert.h.
4376 (x86_siginfo_fixup): Use fatal, not assert.
4377 (x86_arch_setup): Fix comment.
4379 2009-05-12 Doug Evans <dje@google.com>
4381 Biarch support for i386/amd64 gdbserver.
4382 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4383 Add linux-x86-low.c.
4384 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4385 (linux-x86-low.o): Add.
4386 * linux-x86-64-low.c: Delete.
4387 * linux-i386-low.c: Delete.
4388 * linux-x86-low.c: New file.
4389 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4391 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4393 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4394 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4395 (linux_child_pid_to_exec_file): New function.
4396 (elf_64_header_p, elf_64_file_p): New functions.
4397 (siginfo_fixup): New function.
4398 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4399 give target a chance to convert layout.
4400 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4401 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4403 2009-05-07 Doug Evans <dje@google.com>
4405 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4406 (regsets_store_inferior_registers): Ditto.
4408 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4412 * linux-low.c (must_set_ptrace_flags): Delete.
4413 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4415 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4416 `lwp->must_set_ptrace_flags' instead.
4417 (linux_wait_for_event_1): Set ptrace options here.
4418 (linux_wait_1): ... not here.
4420 2009-04-30 Doug Evans <dje@google.com>
4422 * inferiors.c (started_inferior_callback): New function.
4423 (attached_inferior_callback): New function.
4424 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4425 * server.c (print_started_pid, print_attached_pid): New functions.
4426 (detach_or_kill_for_exit): New function.
4427 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4428 * server.h (have_started_inferiors_p): Declare.
4429 (have_attached_inferiors_p): Declare.
4431 * inferiors.c (remove_process): Fix memory leak, free process.
4432 * linux-low.c (linux_remove_process): New function.
4433 (linux_kill): Call it instead of remove_process.
4434 (linux_detach, linux_wait_1): Ditto.
4436 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4438 * configure.srv: Add x86 Windows CE target.
4440 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4442 * inferiors.c (get_thread_process): Make global.
4443 * server.h (get_thread_process): Add prototype.
4444 * thread-db.c (find_one_thread): Use get_thread_process
4445 instead of current_process.
4446 (thread_db_get_tls_address): Do not crash if called when
4447 thread layer is not yet initialized.
4449 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4451 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4452 * spu-low.c (current_tid): Rename to ...
4453 (current_ptid): ... this.
4454 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4455 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4456 ptid_get_lwp (current_ptid) instead of current_tid.
4457 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4458 instead of current_tid. Use find_process_pid to verify pid
4459 argument is valid. Pass proper argument to remove_process.
4460 (spu_thread_alive): Compare current_ptid instead of current_tid.
4461 (spu_resume): Likewise.
4463 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4465 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4468 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4470 Implement the multiprocess extensions, and add linux multiprocess
4473 * server.h (ULONGEST): Declare.
4474 (struct ptid, ptid_t): New.
4475 (minus_one_ptid, null_ptid): Declare.
4476 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4477 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4478 (struct inferior_list_entry): Change `id' type from unsigned from
4480 (struct sym_cache, struct breakpoint, struct
4481 process_info_private): Forward declare.
4482 (struct process_info): Declare.
4483 (current_process): Declare.
4484 (all_processes): Declare.
4485 (initialize_inferiors): Declare.
4486 (add_thread): Adjust to use ptid_t.
4487 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4488 (add_process, remove_process, find_thread_pid): Declare.
4489 (find_inferior_id): Adjust to use ptid_t.
4490 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4491 (multi_process): Declare.
4492 (push_event): Adjust to use ptid_t.
4493 (read_ptid, write_ptid): Declare.
4494 (prepare_resume_reply): Adjust to use ptid_t.
4495 (clear_symbol_cache): Declare.
4496 * inferiors.c (all_processes): New.
4497 (null_ptid, minus_one_ptid): New.
4498 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4499 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4500 (add_thread): Change unsigned long to ptid. Remove gdb_id
4502 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4503 (gdb_id_to_thread): Rename to ...
4504 (find_thread_pid): ... this. Change unsigned long to ptid.
4505 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4506 (loaded_dll, pull_pid_from_list): Adjust.
4507 (add_process, remove_process, find_process_pid)
4508 (get_thread_process, current_process, initialize_inferiors): New.
4509 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4510 (struct target_waitstatus) <related_pid>: Ditto.
4511 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4513 (struct target_ops) <join>: Add `pid' argument.
4514 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4515 (struct target_ops) <wait>: Add `ptid' field. Change return type
4517 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4518 (mywait): Add `ptid' argument. Change return type to ptid_t.
4519 (target_pid_to_str): Declare.
4520 * target.c (set_desired_inferior): Adjust to use ptids.
4521 (mywait): Add new `ptid' argument. Adjust.
4522 (target_pid_to_str): New.
4523 * mem-break.h (free_all_breakpoints): Declare.
4524 * mem-break.c (breakpoints): Delelete.
4525 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4526 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4527 to use per-process breakpoint list.
4528 (free_all_breakpoints): New.
4529 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4530 (symbol_cache, all_symbols_looked_up): Delete.
4532 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4534 (prepare_resume_reply): Change ptid argument's type from unsigned
4535 long to ptid_t. Adjust. Implement W;process and X;process.
4536 (free_sym_cache, clear_symbol_cache): New.
4537 (look_up_one_symbol): Adjust to per-process symbol cache. *
4538 * server.c (cont_thread, general_thread, step_thread): Change type
4541 (multi_process): New.
4542 (last_ptid): Change type to ptid_t.
4543 (struct vstop_notif) <ptid>: Change type to ptid_t.
4544 (queue_stop_reply, push_event): Change `ptid' argument's type to
4546 (discard_queued_stop_replies): Add `pid' argument.
4547 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4548 changes. Don't reference the `attached' global.
4549 (attach_inferior): Adjust to mywait interface changes.
4550 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4551 features. Handle and report "multiprocess+". Handle
4553 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4555 (handle_v_kill): New.
4556 (handle_v_stopped): Adjust to use target_pid_to_str.
4557 (handle_v_requests): Allow multiple attaches and runs when
4558 multiprocess extensions are in effect. Handle "vKill".
4559 (myresume): Adjust to use ptids.
4560 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4561 (handle_status): Adjust to discard_queued_stop_replies interface
4563 (first_thread_of, kill_inferior_callback)
4564 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4565 (main): Call initialize_inferiors. Adjust to use ptids, killing
4566 and detaching from all inferiors. Handle multiprocess packet
4568 * linux-low.h: Include gdb_proc_service.h.
4569 (struct process_info_private): New.
4570 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4571 <lwpid_of>: Use ptid_get_lwp.
4572 (get_lwp_thread): Adjust.
4573 (struct lwp_info): Add `dead' member.
4574 (find_lwp_pid): Declare.
4575 * linux-low.c (thread_db_active): Delete.
4576 (new_inferior): Adjust comment.
4577 (inferior_pid): Delete.
4578 (linux_add_process): New.
4579 (handle_extended_wait): Adjust.
4580 (add_lwp): Change unsigned long to ptid.
4581 (linux_create_inferior): Add process to processes table. Adjust
4582 to use ptids. Don't set new_inferior here.
4583 (linux_attach_lwp): Rename to ...
4584 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4585 it. Adjust to use ptids.
4586 (linux_attach_lwp): New.
4587 (linux_attach): Add process to processes table. Don't set
4589 (struct counter): New.
4590 (second_thread_of_pid_p, last_thread_of_process_p): New.
4591 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4593 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4594 processes. Remove process from process table.
4595 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4596 to multiple processes.
4597 (any_thread_of): New.
4598 (linux_detach): Add `pid' argument, and handle it. Remove process
4599 from processes table.
4600 (linux_join): Add `pid' argument. Handle it.
4601 (linux_thread_alive): Change unsighed long argument to ptid_t.
4602 Consider dead lwps as not being alive.
4603 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4604 threads we're not interested in.
4605 (same_lwp, find_lwp_pid): New.
4606 (linux_wait_for_lwp): Change `pid' argument's type from int to
4608 (linux_wait_for_event): Rename to ...
4609 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4610 from int to ptid_t. Adjust.
4611 (linux_wait_for_event): New.
4612 (linux_wait_1): Add `ptid' argument. Change return type to
4613 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4614 that exit from the process table.
4615 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4617 (mark_lwp_dead): New.
4618 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4619 stopping all threads, mark its main lwp as dead.
4620 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4622 (fetch_register, usr_store_inferior_registers)
4623 (regsets_fetch_inferior_registers)
4624 (regsets_store_inferior_registers, linux_read_memory)
4625 (linux_write_memory): Inline `inferior_pid'.
4626 (linux_look_up_symbols): Adjust to use per-process
4628 (linux_request_interrupt): Adjust to use ptids.
4629 (linux_read_auxv): Inline `inferior_pid'.
4630 (initialize_low): Don't reference thread_db_active.
4631 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4632 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4633 (ps_getpid): Return the pid of the current inferior.
4634 * thread-db.c (proc_handle, thread_agent): Delete.
4635 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4637 (find_one_thread): Change argument type to ptid_t. Adjust to
4639 (maybe_attach_thread): Adjust to per-process data and ptids.
4640 (thread_db_find_new_threads): Ditto.
4641 (thread_db_init): Ditto.
4642 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4643 processes table. Adjust to use ptids.
4644 (spu_kill, spu_detach): Adjust interface. Remove process from
4646 (spu_join, spu_thread_alive): Adjust interface.
4647 (spu_wait): Adjust interface. Remove process from processes
4648 table. Adjust to use ptids.
4649 * win32-low.c (current_inferior_tid): Delete.
4650 (current_inferior_ptid): New.
4651 (debug_event_ptid): New.
4652 (thread_rec): Take a ptid. Adjust.
4653 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4654 (child_delete_thread): Ditto.
4655 (do_initial_child_stuff): Add `attached' argument. Add process to
4657 (child_fetch_inferior_registers, child_store_inferior_registers):
4659 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4660 (win32_attach): Pass 1 to do_initial_child_stuff.
4661 (win32_kill): Adjust interface. Remove process from processes
4663 (win32_detach): Ditto.
4664 (win32_join): Adjust interface.
4665 (win32_thread_alive): Take a ptid.
4666 (win32_resume): Adjust to use ptids.
4667 (get_child_debug_event): Ditto.
4668 (win32_wait): Adjust interface. Remove exiting process from
4671 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4673 Non-stop mode support.
4675 * server.h (non_stop): Declare.
4676 (gdb_client_data, handler_func): Declare.
4677 (delete_file_handler, add_file_handler, start_event_loop):
4679 (handle_serial_event, handle_target_event, push_event)
4680 (putpkt_notif): Declare.
4681 * target.h (enum resume_kind): New.
4682 (struct thread_resume): Replace `step' field by `kind' field.
4683 (TARGET_WNOHANG): Define.
4684 (struct target_ops) <wait>: Add `options' argument.
4685 <supports_non_stop, async, start_non_stop>: New fields.
4686 (target_supports_non_stop, target_async): New.
4687 (start_non_stop): Declare.
4688 (mywait): Add `options' argument.
4689 * target.c (mywait): Add `options' argument. Print child exit
4691 (start_non_stop): New.
4692 * server.c (non_stop, own_buf, mem_buf): New globals.
4693 (struct vstop_notif): New.
4694 (notif_queue): New global.
4695 (queue_stop_reply, push_event, discard_queued_stop_replies)
4696 (send_next_stop_reply): New.
4697 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4699 (attach_inferior): In non-stop mode, don't wait for the target
4701 (handle_general_set): Handle QNonStop.
4702 (handle_query): When handling qC, return the current general
4703 thread, instead of the first thread of the list.
4704 (handle_query): If the backend supports non-stop mode, include
4705 QNonStop+ in the qSupported query response.
4706 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4708 (handle_v_attach, handle_v_run): Handle non-stop mode.
4709 (handle_v_stopped): New.
4710 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4711 (myresume): Adjust to use resume_kind. Handle non-stop.
4712 (queue_stop_reply_callback): New.
4713 (handle_status): Handle non-stop mode.
4714 (main): Clear non_stop flag on reconnection. Use the event-loop.
4715 Refactor serial protocol handling from here ...
4716 (process_serial_event): ... to this new function. When GDB
4717 selects any thread, select one here. In non-stop mode, wait until
4718 GDB acks all pending events before exiting.
4719 (handle_serial_event, handle_target_event): New.
4720 * remote-utils.c (remote_open): Install remote_desc in the event
4722 (remote_close): Remove remote_desc from the event loop.
4723 (putpkt_binary): Rename to...
4724 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4725 (putpkt_binary): New as wrapper around putpkt_binary_1.
4726 (putpkt_notif): New.
4727 (prepare_resume_reply): In non-stop mode, don't change the
4729 * event-loop.c: New.
4730 * Makefile.in (OBJ): Add event-loop.o.
4731 (event-loop.o): New rule.
4733 * linux-low.h (pid_of): Moved here.
4735 (get_lwp_thread): Use lwpid_of.
4736 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4737 * linux-low.c (pid_of): Delete.
4738 (inferior_pid): Use lwpid_of.
4739 (linux_event_pipe): New.
4740 (target_is_async_p): New.
4742 (handle_extended_wait): Use lwpid_of.
4743 (add_lwp): Don't set lwpid field.
4744 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4745 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4746 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4747 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4748 first. Adjust to linux_wait_for_event interface changes. Use
4750 (linux_detach): Don't delete the main lwp here.
4751 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4752 (status_pending_p): Don't consider explicitly suspended lwps.
4753 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4754 pointer. Add OPTIONS argument. Change return type to int. Use
4755 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4756 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4757 pointer. Add status pointer argument. Return a pid instead of a
4758 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4759 changes. In non-stop mode, don't switch to a random thread.
4760 (linux_wait): Rename to...
4761 (linux_wait_1): ... this. Add target_options argument, and handle
4762 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4763 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4764 clean exit and signal exit code. Don't stop all threads in
4765 non-stop mode. In all-stop mode, only stop all threads when
4766 reporting a stop to GDB. Handle explicit thread stop requests.
4767 (async_file_flush, async_file_mark): New.
4769 (send_sigstop): Use lwpid_of.
4770 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4771 interface changes. In non-stop mode, don't switch to a random
4773 (linux_resume_one_lwp): Use lwpid_of.
4774 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4775 (linux_resume_one_thread): ... this. Handle resume_stop. In
4776 non-stop mode, don't look for pending flag in all threads.
4777 (resume_status_pending_p): Don't consider explicitly suspended
4779 (my_waitpid): Reimplement. Emulate __WALL.
4780 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4782 (sigchld_handler, linux_supports_non_stop, linux_async)
4783 (linux_start_non_stop): New.
4784 (linux_target_ops): Register linux_supports_non_stop, linux_async
4785 and linux_start_non_stop.
4786 (initialize_low): Install SIGCHLD handler.
4787 * thread-db.c (thread_db_create_event, find_one_thread)
4788 (thread_db_get_tls_address): Use lwpid_of.
4789 * win32-low.c (win32_detach): Adjust to use resume_kind.
4790 (win32_wait): Add `options' argument.
4791 * spu-low.c (spu_resume): Adjust to use resume_kind.
4792 (spu_wait): Add `options' argument.
4794 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4796 Decouple target code from remote protocol.
4798 * target.h (enum target_waitkind): New.
4799 (struct target_waitstatus): New.
4800 (struct target_ops) <wait>: Return an unsigned long. Take a
4801 target_waitstatus pointer instead of a char pointer.
4803 * target.c (mywait): Change prototype to return an unsigned long.
4804 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4805 * server.h (thread_from_wait, old_thread_from_wait): Delete
4807 (prepare_resume_reply): Change prototype to take a
4809 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4810 (last_status, last_ptid): New.
4811 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4812 pid instead of a signal.
4813 (attach_inferior): Remove "status" and "signal" parameters.
4815 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4817 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4818 (handle_v_requests, myresume): Remove "status" and "signal"
4820 (handle_status): New.
4821 (main): Delete local `status'. Adjust.
4822 * remote-utils.c: Include target.h.
4823 (prepare_resume_reply): Change prototype to take a
4824 target_waitstatus. Adjust.
4826 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4828 * spu-low.c (spu_wait): Adjust.
4829 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4831 (win32_wait): Adjust.
4833 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4835 * target.h (struct thread_resume): Delete leave_stopped member.
4836 (struct target_ops): Add a `n' argument to the `resume' callback.
4837 * server.c (start_inferior): Adjust.
4838 (handle_v_cont, myresume): Adjust.
4839 * linux-low.c (check_removed_breakpoint): Adjust to resume
4840 interface change, and to removed leave_stopped field.
4841 (resume_ptr): Delete.
4842 (struct thread_resume_array): New.
4843 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4844 resume interface change.
4845 (linux_continue_one_thread, linux_queue_one_thread)
4846 (resume_status_pending_p): Check if the resume field is NULL
4847 instead of checking the leave_stopped member.
4848 (linux_resume): Adjust to the target resume interface change.
4849 * spu-low.c (spu_resume): Adjust to the target resume interface
4851 * win32-low.c (win32_detach, win32_resume): Ditto.
4853 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4855 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4857 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4859 (linux_continue_one_thread): Only preserve the stepping flag if
4860 there's a pending breakpoint.
4862 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4864 * server.c (main): After the inferior having exited, call
4865 remote_close before exiting gdbserver.
4867 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4869 Fix size of FPSCR in Power 7 processors.
4870 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4871 (PPC_FEATURE_HAS_DFP): New #define.
4872 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4875 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4877 * server.c (handle_query) Whitespace and formatting.
4879 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4881 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4882 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4883 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4884 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4885 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4886 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4887 Makefile.in, configure.ac: Fix whitespace throughout.
4888 * configure: Regenerate.
4890 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4892 * inferiors.c (find_inferior): Make it safe for the callback
4893 function to delete the currently iterated inferior.
4895 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4897 * Makefile.in (linuw_low_h): Move higher.
4898 (thread-db.o): Depend on $(linux_low_h).
4900 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4902 Rename "process" to "lwp" throughout.
4904 * linux-low.c (all_processes): Rename to...
4905 (all_lwps): ... this.
4906 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4907 (add_process): Rename to ...
4908 (add_lwp): ... this. Adjust.
4909 (linux_create_inferior): Adjust.
4910 (linux_attach_lwp): Adjust.
4911 (linux_attach): Adjust.
4912 (linux_kill_one_process): Rename to ...
4913 (linux_kill_one_lwp): ... this. Adjust.
4914 (linux_kill): Adjust.
4915 (linux_detach_one_process): Rename to ...
4916 (linux_detach_one_lwp): ... this. Adjust.
4917 (linux_detach): Adjust.
4918 (check_removed_breakpoint): Adjust.
4919 (status_pending_p): Adjust.
4920 (linux_wait_for_process): Rename to ...
4921 (linux_wait_for_lwp): ... this. Adjust.
4922 (linux_wait_for_event): Adjust.
4923 (send_sigstop): Adjust.
4924 (wait_for_sigstop): Adjust.
4925 (stop_all_processes): Rename to ...
4926 (stop_all_lwps): ... this.
4927 (linux_resume_one_process): Rename to ...
4928 (linux_resume_one_lwp): ... this. Adjust.
4929 (linux_set_resume_request, linux_continue_one_thread)
4930 (linux_queue_one_thread, resume_status_pending_p)
4931 (usr_store_inferior_registers, regsets_store_inferior_registers)
4932 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4934 * linux-low.h (get_process): Rename to ...
4935 (get_lwp): ... this. Adjust.
4936 (get_thread_process): Rename to ...
4937 (get_thread_lwp): ... this. Adjust.
4938 (get_process_thread): Rename to ...
4939 (get_lwp_thread): ... this. Adjust.
4940 (struct process_info): Rename to ...
4941 (struct lwp_info): ... this.
4942 (all_processes): Rename to ...
4943 (all_lwps): ... this.
4944 * proc-service.c (ps_lgetregs): Adjust.
4945 * thread-db.c (thread_db_create_event, find_one_thread)
4946 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4948 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4950 * server.c (handle_query): Handle "qAttached".
4952 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4954 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4955 GPLv3, update license URL.
4957 2009-03-01 Doug Evans <dje@google.com>
4959 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4960 (server_h): Add gdb_signals.h.
4961 (signals.o): Update.
4962 * server.h (target_signal_from_host,target_signal_to_host_p)
4963 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4965 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4967 * remote-utils.c (getpkt): Also generate remote-debug
4968 information if noack_mode is set.
4970 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4972 * server.c (handle_query): Report qXfer:siginfo:read and
4973 qXfer:siginfo:write as supported and handle them.
4974 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4975 * linux-low.c (linux_xfer_siginfo): New.
4976 (linux_target_ops): Set it.
4978 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4980 * server.c (gdbserver_usage): Mention --remote-debug.
4981 (main): Accept '--remote-debug' switch.
4983 2009-01-18 Doug Evans <dje@google.com>
4985 * regcache.c (new_register_cache): No need to check result of xcalloc.
4986 * server.c (handle_search_memory): Back out calls to xmalloc,
4987 result is checked and error is returned to user upon failure.
4988 (handle_query): Ditto. Add more checks for result of malloc.
4989 (handle_v_cont): Check result of malloc, report error back to
4991 (handle_v_run): Ditto. Call freeargv.
4992 * server.h (freeargv): Declare.
4993 * utils.c (freeargv): New fn.
4995 2009-01-15 Doug Evans <dje@google.com>
4997 * gdbreplay.c (perror_with_name): Make arg const char *.
4998 * server.h (target_signal_to_name): Make return type const char *.
4999 * thread-db.c (thread_db_err_str): Make return type const char *.
5000 * utils.c (perror_with_name): Make arg const char *.
5002 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5004 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5005 when handling a EXIT_PROCESS_DEBUG_EVENT.
5007 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5009 * gdbreplay.c (gdbreplay_version): Update copyright year.
5010 * server.c (gdbserver_version): Likewise.
5012 2009-01-05 Doug Evans <dje@google.com>
5014 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5015 (handle_extended_wait): Improve comment.
5017 2008-12-13 Doug Evans <dje@google.com>
5019 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5020 * server.h (ATTR_MALLOC): New macro.
5021 (xmalloc,xcalloc,xstrdup): Declare.
5022 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5023 * inferiors.c: Ditto.
5024 * linux-low.c: Ditto.
5025 * mem-break.c: Ditto.
5026 * regcache.c: Ditto.
5027 * remote-utils.c: Ditto.
5030 * win32-low.c: Ditto.
5032 2008-12-12 Doug Evans <dje@google.com>
5034 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5035 in debugging printf.
5037 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5039 2008-12-09 Doug Evans <dje@google.com>
5041 * linux-low.h (struct process_info): Delete member tid, unused.
5042 * thread-db.c (find_one_thread): Update.
5043 (maybe_attach_thread): Update.
5045 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5047 * target.h (struct target_ops): Add qxfer_osdata member.
5048 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5050 (linux_qxfer_osdata): New functions.
5051 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5053 * server.c (handle_query): Handle "qXfer:osdata:read:".
5054 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5055 (buffer_xml_printf): New functions.
5056 * server.h (struct buffer): New.
5057 (buffer_grow_str, buffer_grow_str0): New macros.
5058 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5059 (buffer_xml_printf): Declare.
5061 2008-11-24 Doug Evans <dje@google.com>
5063 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5065 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5067 * server.c (handle_v_run): Always use the supplied argument list.
5069 2008-11-19 Bob Wilson <bob.wilson@acm.org>
5071 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5072 (xtensa_regmap_table): Add entry for scompare1.
5074 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5076 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5077 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5078 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5079 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5080 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5081 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5082 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5083 XML target descriptions.
5084 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5085 when inferior is running on an ISA 2.05 or later processor. Add
5086 special case to return offset for full 64-bit slot of FPSCR when
5089 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5091 * Makefile.in (SFILES, clean): Added sparc64 files.
5092 (reg-sparc64.o, reg-sparc64.c): New.
5093 * configure.srv (sparc*-*-linux*): New configuration.
5094 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5095 syscall arguments for SPARC.
5096 (regsets_store_inferior_registers): Likewise.
5097 * linux-sparc-low.c: New file.
5099 2008-10-21 Doug Evans <dje@google.com>
5101 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5102 (READLINE_DIR,READLINE_DEP): Delete.
5103 (INTERNAL_CFLAGS): Update.
5104 (LINTFLAGS): Update.
5106 2008-10-10 Pedro Alves <pedro@codesourcery.com>
5108 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5109 whole argv from the last run, not just argv[0].
5111 2008-09-08 Pedro Alves <pedro@codesourcery.com>
5113 * regcache.c (new_register_cache): Return NULL if the register
5114 cache size isn't known yet.
5115 (free_register_cache): Avoid dereferencing a NULL regcache.
5117 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5119 * configure.srv: Merge MIPS and MIPS64.
5121 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5123 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5125 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
5127 * Makefile.in: Add required vsx dependencies.
5129 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5130 Declare init_registers_powerpc_vsx32l.
5131 Declare init_registers_powerpc_vsx64l.
5132 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5133 (ppc_arch_setup): Check for VSX in hwcap.
5134 (ppc_fill_vsxregset): New function.
5135 (ppc_store_vsxregset): New function.
5136 Add new VSX entry in regset_info target_regsets.
5138 * configure.srv: Add new VSX dependencies.
5140 2008-08-12 Pedro Alves <pedro@codesourcery.com>
5142 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5143 (remote_open): Set or clear transport_is_reliable.
5144 (putpkt_binary): Don't expect acks in noack mode.
5145 (getpkt): Don't send ack/nac in noack mode.
5146 * server.c (handle_general_set): Handle QStartNoAckMode.
5147 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5149 (main): Reset noack_mode on every connection.
5150 * server.h (noack_mode): Declare.
5152 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5154 * Makefile.in (GDBREPLAY_OBS): New variable.
5155 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5157 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5158 Daniel Jacobowitz <dan@codesourcery.com>
5160 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5161 (usr_store_inferior_registers): Likewise.
5162 (regsets_store_inferior_registers): Likewise.
5164 2008-07-31 Rolf Jansen <rj@surtec.com>
5165 Pedro Alves <pedro@codesourcery.com>
5167 * configure.ac: Check for memmem declaration.
5168 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5169 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5170 (disable_packet_qfThreadInfo): Unconditionally compile.
5171 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5172 * configure, config.in: Regenerate.
5174 2008-07-28 Doug Kwan <dougkwan@google.com>
5176 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5177 (linux_write_memory): Remove declaration of errno.
5179 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5181 * linux-low.c (handle_extended_wait): Do not use "status"
5182 variable uninitialized.
5184 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5186 * server.c (handle_v_attach): Inhibit reporting dll changes.
5188 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5190 * remote-utils.c (prepare_resume_reply): If requested, don't
5191 output "thread:TID" in the T stop reply.
5193 * server.c (disable_packet_vCont, disable_packet_Tthread)
5194 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5195 (handle_query): If requested, disable support for qC, qfThreadInfo
5197 (handle_v_requests): If requested, disable support for vCont.
5198 (gdbserver_show_disableable): New.
5199 (main): Handle --disable-packet and --disable-packet=LIST.
5201 * server.h (disable_packet_vCont, disable_packet_Tthread)
5202 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5204 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5206 * server.c (gdbserver_usage): Mention --version.
5208 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5210 * Makefile.in (gdbreplay.o): New rule.
5212 2008-06-06 Joseph Myers <joseph@codesourcery.com>
5214 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5215 message, not gdbserver.
5217 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5218 Nathan Sidwell <nathan@codesourcery.com>
5219 Joseph Myers <joseph@codesourcery.com>
5221 * acinclude.m4: Include ../../config/acx.m4.
5222 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5223 * configure, config.in: Regenerate.
5224 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5225 * server.c (gdbserver_version): Print PKGVERSION.
5226 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5227 (main): Adjust gdbserver_usage calls.
5228 * gdbreplay.c (version, host_name): Add declarations.
5229 (gdbreplay_version, gdbreplay_usage): New.
5230 (main): Accept --version and --help options.
5232 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5234 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5235 (arm_breakpoint_at): Handle Thumb.
5236 (the_low_target): Add comment.
5238 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5240 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5242 2008-05-09 Doug Evans <dje@google.com>
5244 * server.h (decode_search_memory_packet): Declare.
5245 * remote-utils.c (decode_search_memory_packet): New fn.
5246 * server.c (handle_search_memory_1): New fn.
5247 (handle_search_memory): New fn.
5248 (handle_query): Process qSearch:memory packets.
5250 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5252 * regcache.c (registers_length): Remove.
5253 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5254 full register packet.
5255 * regcache.h (registers_length): Remove prototype.
5256 * server.h (PBUFSIZ): Define to 16384.
5258 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5260 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5261 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5262 powerpc-64l.o, and powerpc-altivec64l.o.
5263 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5264 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5265 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5266 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5267 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5270 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5271 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5272 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5273 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5274 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5275 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5276 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5277 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5278 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5279 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5282 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5283 (init_registers_powerpc_32l): ... this new prototype.
5284 (init_registers_powerpc_32): Remove, replace by ...
5285 (init_registers_powerpc_altivec32l): ... this new prototype.
5286 (init_registers_powerpc_e500): Remove, replace by ...
5287 (init_registers_powerpc_e500l): ... this new prototype.
5288 (init_registers_ppc64): Remove, replace by ...
5289 (init_registers_powerpc_64l): ... this new prototype.
5290 (init_registers_powerpc_64): Remove, replace by ...
5291 (init_registers_powerpc_altivec64l): ... this new prototype.
5292 (ppc_num_regs): Set to 73.
5293 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5294 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5295 (ppc_cannot_store_register): Handle orig_r3 and trap.
5296 (ppc_arch_setup): Update init_registers_... calls.
5297 (ppc_fill_gregset): Handle orig_r3 and trap.
5299 * inferiors.c (clear_inferiors): Reset current_inferior.
5301 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5303 * acinclude.m4: Add override.m4.
5304 * configure: Regenerate.
5306 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5308 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5309 initial call to init_register_ppc64.
5311 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5313 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
5314 powerpc*-*-linux* case.
5315 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5317 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5319 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5320 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5322 * linux-ppc-low.c: Include <elf.h>.
5323 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5324 (ppc_hwcap): New global variable.
5325 (ppc_regmap): Remove __SPE__ #ifdef sections.
5326 (ppc_regmap_e500): New global variable.
5327 (ppc_cannot_store_register): Update __SPE__ special case.
5328 (ppc_get_hwcap): New function.
5329 (ppc_arch_setup): Use it to determine whether inferior supports
5330 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5331 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5332 Do not access registers if target does not support AltiVec.
5333 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5334 Do not access registers if target does not support SPE.
5335 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5337 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5339 * linux-low.c (disabled_regsets, num_regsets): New.
5340 (use_regsets_p): Delete.
5341 (linux_wait_for_process): Clear disabled_regsets.
5342 (regsets_fetch_inferior_registers): Check and set it.
5343 (regsets_store_inferior_registers): Likewise.
5344 (linux_fetch_registers, linux_store_registers): Do not use
5346 (initialize_low): Allocate disabled_regsets.
5348 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5350 * Makefile.in (LIBOBJS): New.
5352 (memmem.o): New rule.
5353 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5354 * configure: Regenerated.
5356 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5358 * server.c (handle_query): Never return "unsupported" for
5359 qXfer:features:read queries.
5361 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5363 * server.c (get_features_xml): Fix inverted condition.
5364 (handle_query): Always support qXfer:feature:read.
5366 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5368 * server.c (wrapper_argv): New.
5369 (start_inferior): Handle wrapper_argv. If set, expect an extra
5371 (gdbserver_usage): Document --wrapper.
5372 (main): Parse --wrapper.
5374 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5376 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5377 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5378 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5379 (ppc_set_pc): Likewise.
5380 (ppc_arch_setup): New function.
5381 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5382 of collect_register.
5383 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5385 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5387 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5388 instead of linux-ppc64-low.o.
5389 * linux-ppc64-low.c: Remove file.
5390 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5391 (linux-ppc64-low.o): Remove rule.
5393 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5394 (init_registers_powerpc_64): Likewise.
5395 (ppc_regmap): Conditionally define depending on __powerpc64__.
5396 (ppc_cannot_store_register): Do not special-case "fpscr" when
5397 compiled on __powerpc64__.
5398 (ppc_collect_ptrace_register): New function.
5399 (ppc_supply_ptrace_register): New function.
5400 (ppc_breakpoint): Change type to "unsigned int".
5401 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5402 (the_low_target): Conditionally provide initializers for the
5403 arch_setup member depending on __powerpc64__. Install
5404 collect_ptrace_register and supply_ptrace_register members.
5406 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5408 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5409 * server.c (gdbserver_xmltarget): Define.
5410 (get_features_xml): Use it to replace "target.xml" and arch_string.
5412 * configure.srv: Remove srv_xmltarget. Add XML files that were
5413 mentioned there to srv_xmlfiles instead. Remove conditional tests
5414 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5415 srv_xmlfiles and srv_regobj to include all possible choices.
5416 * configure.ac (srv_xmltarget): Remove.
5417 (srv_xmlfiles): Do not add "target.xml".
5418 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5419 checks for supplementary target information.
5420 * configure: Regenerate.
5421 * Makefile.in (XML_TARGET): Remove.
5422 (target.xml): Remove rule.
5423 (clean): Do not clean up target.xml.
5424 (.PRECIOUS): Do not mention target.xml.
5426 * target.h (struct target_ops): Remove arch_string member.
5427 * linux-low.c (linux_arch_string): Remove.
5428 (linux_target_ops): Remove arch_string initializer.
5429 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5430 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5431 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5432 * spu-low.c (spu_arch_string): Remove.
5433 (spu_target_ops): Remove arch_string initializer.
5434 * win32-low.c (win32_arch_string): Remove.
5435 (win32_target_ops): Remove arch_string initializer.
5436 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5437 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5438 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5440 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5442 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5443 by collect_ptrace_register and supply_ptrace_register hooks.
5444 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5445 instead of checking for the_low_target.left_pad_xfer.
5446 (usr_store_inferior_registers): Use collect_ptrace_register callback
5447 instead of checking for the_low_target.left_pad_xfer.
5449 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5450 (s390_supply_ptrace_register): Likewise.
5451 (s390_fill_gregset): Call s390_collect_ptrace_register.
5452 (the_low_target): Update.
5454 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5455 (ppc_supply_ptrace_register): Likewise.
5456 (the_low_target): Update.
5458 * linux-i386-low.c (the_low_target): Update.
5459 * linux-x86-64-low.c (the_low_target): Update.
5461 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5463 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5464 reg-s390.o and reg-s390x.o.
5466 * linux-low.c (new_inferior): New global variable.
5467 (linux_create_inferior, linux_attach): Set it.
5468 (linux_wait_for_process): Call the_low_target.arch_setup after the
5469 target has stopped for the first time.
5470 (initialize_low): Do not call the_low_target.arch_setup.
5472 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5473 (s390_set_pc): Likewise.
5474 (s390_arch_setup): New function.
5475 (the_low_target): Use s390_arch_setup as arch_setup routine.
5477 * regcache.c (realloc_register_cache): New function.
5478 (set_register_cache): Call it for each existing regcache.
5480 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5482 * server.h (init_registers): Remove prototype.
5484 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5485 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5486 instead of init_registers ().
5487 * linux-arm-low.c (init_registers_arm): Add prototype.
5488 (init_registers_arm_with_iwmmxt): Likewise.
5489 (the_low_target): Add initializer for arch_setup field.
5490 * linux-cris-low.c (init_registers_cris): Add prototype.
5491 (the_low_target): Add initializer for arch_setup field.
5492 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5493 (the_low_target): Add initializer for arch_setup field.
5494 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5495 (the_low_target): Add initializer for arch_setup field.
5496 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5497 (the_low_target): Add initializer for arch_setup field.
5498 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5499 (the_low_target): Add initializer for arch_setup field.
5500 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5501 (the_low_target): Add initializer for arch_setup field.
5502 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5503 (init_registers_mips64_linux): Likewise.
5504 (the_low_target): Add initializer for arch_setup field.
5505 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5506 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5507 (the_low_target): Add initializer for arch_setup field.
5508 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5509 (init_registers_powerpc_64): Likewise.
5510 (the_low_target): Add initializer for arch_setup field.
5511 * linux-s390-low.c (init_registers_s390): Add prototype.
5512 (init_registers_s390x): Likewise.
5513 (the_low_target): Add initializer for arch_setup field.
5514 * linux-sh-low.c (init_registers_sh): Add prototype.
5515 (the_low_target): Add initializer for arch_setup field.
5516 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5517 (the_low_target): Add initializer for arch_setup field.
5518 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5519 (the_low_target): Add initializer for arch_setup field.
5521 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5522 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5523 instead of init_registers ().
5524 * win32-arm-low.c (init_registers_arm): Add prototype.
5525 (the_low_target): Add initializer for arch_setup field.
5526 * win32-i386-low.c (init_registers_i386): Add prototype.
5527 (the_low_target): Add initializer for arch_setup field.
5529 * spu-low.c (init_registers_spu): Add prototype.
5530 (initialize_low): Call initialie_registers_spu () instead of
5531 initialize_registers ().
5533 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5535 * server.c (handle_v_requests): When handling the vRun and vAttach
5536 packets, if already debugging a process, don't kill it. Return an
5539 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5541 * server.c (handle_query): Correct length check.
5543 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5545 * win32-low.c (do_initial_child_stuff): Add process handle
5546 parameter. Set current_process_handle and current_process_id from the
5547 parameters. Clear globals.
5548 (win32_create_inferior): Don't set current_process_handle and
5549 current_process_id here. Instead pass them on the call to
5550 do_initial_child_stuff.
5551 (win32_attach): Likewise.
5552 (win32_clear_inferiors): New.
5553 (win32_kill): Don't close the current process handle or the
5554 current thread handle here. Instead call win32_clear_inferiors.
5555 (win32_detach): Don't open a new handle to the process. Call
5556 win32_clear_inferiors.
5557 (win32_join): Don't rely on current_process_handle; open a new
5558 handle using the process id.
5559 (win32_wait): Call win32_clear_inferiors when the inferior process
5562 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5564 * server.c (monitor_show_help): Add "exit".
5566 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5568 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5569 (clean): Add reg-xtensa.c.
5570 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5571 * configure.srv (xtensa*-*-linux*) New target.
5572 * linux-xtensa-low.c: New.
5573 * xtensa-xtregs.c: New.
5575 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5577 * hostio.c: Don't include errno.h.
5578 (errno_to_fileio_errno): Move to hostio-errno.
5579 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5580 error number outputting to the target->hostio_last_error callback.
5581 (hostio_packet_error): Use FILEIO_EINVAL directly.
5582 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5583 calls to hostio_error.
5584 * hostio-errno.c: New.
5585 * server.h (hostio_last_error_from_errno): Declare.
5586 * target.h (target_ops): Add hostio_last_error member.
5587 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5588 as hostio_last_error handler.
5589 * spu-low.c (spu_target_ops): Likewise.
5590 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5591 (wince_hostio_last_error): New functions.
5592 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5593 as hostio_last_error handler.
5594 (win32_target_ops) [!_WIN32_WCE]: Register
5595 hostio_last_error_from_errno as hostio_last_error handler.
5596 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5597 (hostio-errno.o): New rule.
5598 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5599 * configure.srv (srv_hostio_err_objs): New variable. Default to
5601 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5602 * configure: Regenerate.
5604 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5606 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5607 (linux_kill, linux_detach): Clean up the process list.
5608 * remote-utils.c (remote_open): Improve port number parsing.
5609 (putpkt_binary, input_interrupt): Only send interrupts if the target
5611 * server.c (extended_protocol): Make static.
5612 (attached): Define earlier.
5613 (exit_requested, response_needed, program_argv): New variables.
5614 (target_running): New.
5615 (start_inferior): Clear attached here.
5616 (attach_inferior): Set attached here.
5617 (require_running): Define.
5618 (handle_query): Use require_running and target_running. Implement
5620 (handle_v_attach, handle_v_run): New.
5621 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5622 (gdbserver_usage): Update.
5623 (main): Redo argument parsing. Handle --debug and --multi. Handle
5624 --attach along with other options or after the port. Save
5625 program_argv. Support no initial program. Resynchronize
5626 communication with GDB after an error. Handle "monitor exit".
5627 Use require_running and target_running. Always allow the extended
5628 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5629 restart in extended mode.
5630 * README: Refer to the GDB manual. Update --attach usage.
5632 2007-12-20 Andreas Schwab <schwab@suse.de>
5634 * linux-low.c (STACK_SIZE): Define.
5635 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5636 (linux_test_for_tracefork): Likewise.
5638 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5640 * linux-low.c (linux_wait_for_event): Update messages. Do not
5641 reinsert auto-delete breakpoints.
5642 * mem-break.c (struct breakpoint): Change return type of handler to
5644 (set_breakpoint_at): Update handler type.
5645 (reinsert_breakpoint_handler): Return 1 instead of calling
5647 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5649 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5650 * mem-break.h (set_breakpoint_at): Update handler type.
5651 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5652 * win32-low.c (auto_delete_breakpoint): New.
5653 (get_child_debug_event): Use it.
5655 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5657 * configure.ac: Check for pread and pwrite.
5658 * hostio.c (handle_pread): Fall back to lseek and read.
5659 (handle_pwrite): Fall back to lseek and write.
5660 * config.in, configure: Regenerated.
5662 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5664 * server.c (myresume): Add own_buf argument.
5665 (main): Update calls.
5667 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5669 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5670 * remote-utils.c (remote_open): Do not call disable_async_io.
5671 (block_async_io): Delete.
5672 (unblock_async_io): Make static.
5673 (initialize_async_io): New.
5674 * server.c (handle_v_cont): Handle async I/O here.
5675 (myresume): Likewise. Move other common resume tasks here...
5676 (main): ... from here. Call initialize_async_io. Disable async
5677 I/O before the main loop.
5678 * server.h (initialize_async_io): Declare.
5679 (block_async_io, unblock_async_io): Delete prototypes.
5680 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5682 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5684 * remote-utils.c (readchar): Allow binary data in received messages.
5686 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5688 * win32-low.c (attaching): New global.
5689 (win32_create_inferior): Clear the `attaching' global.
5690 (win32_attach): Set the `attaching' global.
5691 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5692 attaching. Only set a breakpoint at the entry point if not
5695 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5697 * server.c (main): Don't report dll events on the initial
5698 connection on attaches.
5700 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5702 * server.c (main): Relax numerical bases supported for the pid of
5703 the --attach command line argument.
5705 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5707 * win32-low.c (win32_attach): Call OpenProcess before
5708 DebugActiveProcess, not after. Add last error output to error
5711 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5713 * win32-low.c (win32_get_thread_context)
5714 (win32_set_thread_context): New functions.
5715 (thread_rec): Use win32_get_thread_context.
5716 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5717 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5720 2007-12-03 Leo Zayas
5721 Pedro Alves <pedro_alves@portugalmail.pt>
5723 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5725 (child_add_thread): Minor cleanup.
5726 (child_continue): Resume artificially suspended threads before
5727 calling ContinueDebugEvent.
5728 (suspend_one_thread): New.
5729 (fake_breakpoint_event): New.
5730 (get_child_debug_event): Change return type to int. Check here if
5731 gdb sent an interrupt request. If a soft interrupt was requested,
5732 fake a breakpoint event. Return 0 if there is no event to handle,
5734 (win32_wait): Don't check here if gdb sent an interrupt request.
5735 Ensure there is a valid event to handle.
5736 (win32_request_interrupt): Add soft interruption method as last
5739 2007-12-03 Leo Zayas
5740 Pedro Alves <pedro_alves@portugalmail.pt>
5742 * win32-low.h (win32_thread_info): Add descriptions to the
5743 structure members. Replace `suspend_count' counter by a
5745 * win32-low.c (thread_rec): Update condition of when to get the
5746 context from the inferior. Rely on ContextFlags being set if it
5747 has already been retrieved. Only suspend the inferior thread if
5748 we haven't already. Warn if that fails.
5749 (continue_one_thread): s/suspend_count/suspended/. Only call
5750 ResumeThread once. Warn if that fails.
5752 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5754 * win32-low.c (win32_wait): Don't read from the inferior when it
5757 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5759 * Makefile.in (win32_low_h): New variable.
5760 (win32-low.o): Add dependency on $(win32_low_h).
5761 (win32-arm-low.o, win32-i386-low.o): New rules.
5763 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5765 * hostio.c: Correct copyright year.
5767 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5769 * Makefile.in (OBS): Add hostio.o.
5770 (hostio.o): New rule.
5771 * server.h (handle_vFile): Declare.
5772 * hostio.c: New file.
5773 * server.c (handle_v_requests): Take packet_len and new_packet_len
5774 for binary packets. Call handle_vFile.
5775 (main): Update call to handle_v_requests.
5777 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5779 * linux-low.c: Include <sched.h>.
5781 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5783 * linux-low.c (linux_tracefork_grandchild): New.
5784 (linux_tracefork_child): Use clone.
5785 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5787 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5789 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5791 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5793 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5795 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5797 * inferiors.c (change_inferior_id): Delete.
5798 (add_pid_to_list, pull_pid_from_list): New.
5799 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5800 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5801 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5802 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5803 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5804 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5805 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5806 (using_threads): Always set to 1.
5807 (handle_extended_wait): New.
5808 (add_process): Do not set TID.
5809 (linux_create_inferior): Set must_set_ptrace_flags.
5810 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5811 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5812 (linux_thread_alive): Rename TID argument to LWPID.
5813 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5814 (linux_wait_for_event): Do not use TID or check using_threads. Update
5815 call to dead_thread_notify. Call handle_extended_wait.
5816 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5817 (send_sigstop): Delete sigstop_sent.
5818 (wait_for_sigstop): Avoid TID.
5819 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5820 (linux_test_for_tracefork): New.
5821 (linux_lookup_signals): Use thread_db_active and
5822 linux_supports_tracefork_flag.
5823 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5824 * linux-low.h (get_process_thread): Avoid TID.
5825 (struct process_ifo): Move thread_known and tid to the end. Remove
5827 (linux_attach_lwp, thread_db_init): Update prototypes.
5828 * server.h (change_inferior_id): Delete prototype.
5829 (add_pid_to_list, pull_pid_from_list): New prototypes.
5830 * thread-db.c (thread_db_use_events): New.
5831 (find_first_thread): Rename to...
5832 (find_one_thread): ...this. Update callers and messages. Do not
5833 call fatal. Check thread_db_use_events. Do not call
5834 change_inferior_id or new_thread_notify.
5835 (maybe_attach_thread): Update. Do not call new_thread_notify.
5836 (thread_db_init): Set thread_db_use_events. Check use_events.
5837 * utils.c (fatal, warning): Correct message prefix.
5839 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5841 * Makefile.in (clean): Remove new files.
5842 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5843 (powerpc-64.o, powerpc-64.c): New rules.
5844 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5845 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5847 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5849 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5850 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5851 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5852 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5853 (target_regsets): Add AltiVec and SPE register sets.
5854 * configure.ac: Check for AltiVec and SPE.
5855 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5856 (ppc_fill_vrregset, ppc_store_vrregset): New.
5857 (target_regsets): Add AltiVec register set.
5858 * configure: Regenerated.
5860 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5862 * linux-low.c (O_LARGEFILE): Define.
5863 (linux_read_memory): Use /proc/PID/mem.
5864 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5865 * configure, config.in: Regenerated.
5867 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5869 * linux-low.c (linux_wait_for_event): Do not pass signals while
5872 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5874 * win32-low.c (create_process): New.
5875 (win32_create_inferior): Use create_process instead of
5876 CreateProcess. If create_process failed retry appending an ".exe"
5877 suffix. Store the GetLastError result immediatelly after
5878 create_process calls and use it on the call to error.
5880 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5882 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5884 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5886 * configure.ac: Switch license to GPLv3.
5888 2007-08-01 Michael Snyder <msnyder@access-company.com>
5890 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5892 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5894 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5896 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5897 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5898 CloseToolhelp32Snapshot.
5899 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5900 CloseToolhelp32Snapshot.
5902 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5904 * server.c (main): Check for inferior exit before main loop.
5906 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5908 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5909 instead of on tmp_desc.
5911 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5912 Daniel Jacobowitz <dan@codesourcery.com>
5914 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5915 (add_thread): Minor cleanups.
5916 (clear_inferiors): Move lower in the file. Clear the DLL
5918 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5919 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5920 (xml_escape_text): New.
5921 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5923 (handle_v_cont): Report errors.
5924 (gdbserver_version): Update.
5925 (main): Correct size of own_buf. Do not report initial DLL events.
5926 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5927 (unloaded_dll, xml_escape_text): New.
5928 * win32-low.c (enum target_waitkind): Update comments.
5929 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5930 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5931 (win32_EnumProcessModules, win32_GetModuleInformation)
5932 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5933 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5934 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5935 (win32_Module32First, win32_Module32Next, load_toolhelp)
5936 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5937 (get_child_debug_event): Handle DLL events.
5938 (win32_wait): Likewise.
5940 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5942 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5943 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5945 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5947 * win32-low.c (handle_output_debug_string): Ignore event if not
5950 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5952 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5954 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5956 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5958 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5960 * inferiors.c (change_inferior_id): Add comment.
5961 * linux-low.c (check_removed_breakpoint): Add an early
5962 prototype. Improve debug output.
5963 (linux_attach): Doc update.
5964 (linux_detach_one_process, linux_detach): Clean up before releasing
5966 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5967 * linux-low.h (struct process_info): Doc improvement.
5968 * mem-break.c (delete_all_breakpoints): New.
5969 * mem-break.h (delete_all_breakpoints): New prototype.
5970 * thread-db.c (find_first_thread): New.
5971 (thread_db_create_event): Call it instead of
5972 thread_db_find_new_threads. Clean up unused variables.
5973 (maybe_attach_thread): Remove first thread handling.
5974 (thread_db_find_new_threads): Use find_first_thread.
5975 (thread_db_get_tls_address): Likewise.
5977 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5979 * thread-db.c (thread_db_find_new_threads): Add prototype.
5980 (thread_db_create_event): Check for the main thread before adding
5982 (maybe_attach_thread): Only enable event reporting if TID == 0.
5983 (thread_db_get_tls_address): Check for new threads.
5985 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5987 * linux-low.c (linux_create_inferior): Try execv before execvp.
5988 * spu-low.c (spu_create_inferior): Likewise.
5990 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5992 * linux-low.c (linux_create_inferior): Change execv to execvp.
5993 * spu-low.c (spu_create_inferior): Likewies.
5995 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5997 * Makefile.in (clean): Clean new files instead of deleted ones.
5998 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5999 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6001 * configure.srv: Specify XML files and new regformats for MIPS and
6003 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6004 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6005 an entry for the restart register.
6006 (mips_cannot_fetch_register, mips_cannot_store_register)
6007 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6008 register names to match the XML descriptions.
6009 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6010 restart register instead of $0.
6012 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6013 Markus Deuling <deuling@de.ibm.com>
6015 * remote-utils.c (decode_xfer_write): New function.
6016 * server.h (decode_xfer_write): Add prototype.
6017 * server.c (handle_query): Add PACKET_LEN argument. Support
6018 qXfer:spu:read and qXfer:spu:write packets.
6019 (main): Pass packet_len to handle_query.
6020 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6021 * target.h (target_ops): Add qxfer_spu.
6023 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6025 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6026 accessing non-seekable spufs files.
6028 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6030 * server.c (handle_query): Add reply for qC packet.
6032 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6033 Leo Zayas <lerele@champenstudios@com>
6035 * server.h (check_remote_input_interrupt_request): New function.
6036 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6037 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6038 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6039 (check_remote_input_interrupt_request): New function.
6040 * server.h (check_remote_input_interrupt_request): Declare.
6041 * win32-low.c (winapi_DebugBreakProcess,
6042 winapi_GenerateConsoleCtrlEvent): New typedefs.
6043 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6045 (win32_wait): Check for remote interrupt request
6046 with check_remote_input_interrupt_request.
6047 (win32_request_interrupt): New function.
6048 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6050 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6052 * win32-low.c (debug_registers_changed,
6053 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6054 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6055 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6056 (thread_rec): Get context using the low target.
6057 (child_add_thread): Call thread_added on the low target,
6058 which does the same thing.
6060 (do_initial_child_stuff): Remove debug registers references.
6061 Set context using the low target. Resume threads after
6062 setting the contexts.
6063 (child_continue): Remove dead variable. Remove debug
6064 registers references.
6065 (child_fetch_inferior_registers): Go through the low target.
6066 (do_child_store_inferior_registers): Remove.
6067 (child_store_inferior_registers): Go through the low target.
6068 (win32_resume): Remove debug registers references.
6069 Set context using the low target.
6070 (handle_exception): Change return type to void. Don't record
6071 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6072 first chance exception.
6073 (get_child_debug_event): Change return type to void. Remove
6074 goto loop. Always return after waiting for debug event.
6075 (win32_wait): Convert to switch statement. Handle spurious
6078 * win32-i386-low.c (debug_registers_changed,
6079 debug_registers_used): New.
6080 (initial_stuff): Rename to ...
6081 (i386_initial_stuff): ... this. Clear debug registers
6083 (store_debug_registers): Delete.
6084 (i386_get_thread_context): New.
6085 (load_debug_registers): Delete.
6086 (i386_set_thread_context): New.
6087 (i386_thread_added): New.
6088 (single_step): Rename to ...
6089 (i386_single_step): ... this.
6090 (do_fetch_inferior_registers): Rename to ...
6091 (i386_fetch_inferior_register): ... this.
6092 (i386_store_inferior_register): New.
6093 (the_low_target): Adapt to new interface.
6095 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6096 (arm_get_thread_context): New.
6097 (arm_set_thread_context): New.
6099 (do_fetch_inferior_registers): Rename to ...
6100 (arm_fetch_inferior_register): ... this.
6101 (arm_store_inferior_register): New.
6102 (arm_wince_breakpoint): Reimplement as unsigned long.
6103 (arm_wince_breakpoint_len): Define.
6104 (the_low_target): Adapt to new interface.
6106 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6107 load_debug_registers. Add get_thread_context, set_thread_context,
6108 thread_added and store_inferior_register. Rename
6109 fetch_inferior_registers to fetch_inferior_register.
6110 (regptr): Remove declaration.
6112 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6114 * linux-low.c (linux_detach): Change return type to int. Return 0.
6115 * spu-low.c (spu_detach): Likewise.
6117 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6119 * target.h (target_ops): Change return type of detach to int.
6121 (join_inferior): New.
6122 * server.c (main): Don't skip detach support on mingw32.
6123 If the inferior doesn't support detaching return error.
6124 Call join_inferior instead of using waitpid.
6125 * linux-low.c (linux_join): New.
6126 (linux_target_op): Add linux_join.
6127 * spu-low.c (spu_join): New.
6128 (spu_target_ops): Add spu_join.
6129 * win32-low.c (win32_detach): Adapt to new interface.
6130 Reopen current_process_handle before detaching. Issue a child
6131 resume before detaching.
6133 (win32_target_op): Add win32_join.
6135 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6137 * win32-low.c (win32-attach): Fix return value.
6138 * target.h (target_ops): Describe ATTACH return values.
6140 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6142 * win32-low.c (GETPROCADDRESS): Define.
6143 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6144 (winapi_DebugSetProcessKillOnExit): Likewise.
6145 (win32_create_inferior): Force usage of ansi CreateProcessA.
6146 (win32_attach): Use GETPROCADDRESS.
6147 (win32_detach): Likewise.
6149 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6151 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6153 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6155 * win32-low.c: Commit leftover changes from 2007-03-29.
6157 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6159 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6160 fields short instead of int. Add explicit padding.
6161 (i387_cache_to_fsave): Remove unnecessary casts.
6162 (i387_fsave_to_cache): Doc fix.
6163 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6165 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6167 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6168 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6170 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6172 * configure.srv (arm*-*-mingw32ce*): Move near the other
6175 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6177 * configure.ac: Add errno checking.
6178 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6179 sys/file.h and malloc.h.
6180 (AC_CHECK_DECLS): Add perror.
6181 (srv_mingwce): Handle.
6182 * configure.srv (i[34567]86-*-cygwin*): Add
6183 win32-i386-low.o to srv_tgtobj.
6184 (i[34567]86-*-mingw*): Likewise.
6185 (arm*-*-mingw32ce*): Add case.
6186 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6187 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6188 [__MINGW32CE__] (strerror): New function.
6189 [__MINGW32CE__] (errno): Define to GetLastError.
6190 [__MINGW32CE__] (COUNTOF): New macro.
6191 (remote_open): Remove extra close call.
6192 * mem-break.c (delete_breakpoint_at): New function.
6193 * mem-break.h (delete_breakpoint_at): Declare.
6194 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6195 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6196 [USE_WIN32API] (read, write): Add char* casts.
6197 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6198 * server.h: Include wincecompat.h on Windows CE.
6199 [HAVE_ERRNO_H]: Check.
6200 (perror): Declare if not declared.
6201 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6202 (perror_with_name): Remove errno declaration.
6203 * wincecompat.h: New.
6204 * wincecompat.c: New.
6206 * win32-arm-low.c: New.
6207 * win32-i386-low.c: New.
6208 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6209 (OUTMSG2): Make it safe.
6211 (COUNTOF): New macro.
6212 (NUM_REGS): Get it from the low target.
6213 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6214 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6215 (thread_rec): Let low target handle debug registers.
6216 (child_add_thread): Likewise.
6217 (child_init_thread_list): Likewise.
6218 (continue_one_thread): Likewise.
6220 (do_child_fetch_inferior_registers): Move to ...
6221 * win32-i386-low.c: ... here, and rename to ...
6222 (do_fetch_inferior_registers): ... this.
6223 * win32-low.c (child_fetch_inferior_registers):
6224 Go through the low target.
6225 (do_child_store_inferior_registers): Use regptr.
6226 (strwinerror): New function.
6227 (win32_create_inferior): Handle Windows CE.
6228 Use strwinerror instead of strerror on Windows error
6229 codes. Add program to the error output.
6230 Don't close the main thread handle on Windows CE.
6231 (win32_attach): Use coredll.dll on Windows CE.
6232 (win32_kill): Close current process and current
6234 (win32_detach): Use coredll.dll on Windows CE.
6235 (win32_resume): Let low target handle debug registers, and
6237 (handle_exception): Add/Remove initial breakpoint. Avoid
6238 non-existant WSTOPSIG on Windows CE.
6239 (win32_read_inferior_memory): Cast to remove warning.
6240 (win32_arch_string): Go through the low target.
6241 (initialize_low): Call set_breakpoint_data with the low
6242 target's breakpoint.
6243 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6244 FOP_REGNUM, mappings): Move to ...
6245 * win32-i386-low.c: ... here.
6246 * win32-low.c (win32_thread_info): Move to ...
6247 * win32-low.h: ... here.
6248 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6249 win32-arm-low.c and wincecompat.c.
6250 (all:): Add $EXEEXT.
6251 (install-only:): Likewise.
6252 (gdbserver:): Likewise.
6253 (gdbreplay:): Likewise.
6254 * config.in: Regenerate.
6255 * configure: Regenerate.
6257 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6259 * win32-low.c: Rename typedef thread_info to
6260 win32_thread_info throughout.
6262 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6264 * win32-i386-low.c: Rename to ...
6265 * win32-low.c: ... this.
6266 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6267 * Makefile.in: Likewise.
6269 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6271 * remote-utils.c (monitor_output): Constify msg parameter.
6272 * server.h (monitor_output): Likewise.
6273 * win32-i386-low.c (handle_output_debug_string): New.
6274 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6275 handle_output_debug_string.
6276 (get_child_debug_event): Likewise.
6278 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6280 * server.c (main): Correct strtoul check.
6282 2007-03-27 Jon Ringle <jon@ringle.org>
6284 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6286 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6288 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6290 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6292 * terminal.h: Check HAVE_SGTTY_H.
6294 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6296 * remote-utils.c (remote_open): Print out the assigned port number.
6298 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6300 * remote-utils.c (monitor_output): New function.
6301 * server.c (debug_threads): Define here.
6302 (monitor_show_help): New function.
6303 (handle_query): Handle qRcmd.
6304 (main): Do not handle 'd' packet.
6305 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6306 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6309 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6311 * Makefile.in (EXEEXT): New.
6312 (clean): Use $(EXEEXT).
6314 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6316 * target.h (target_ops): Rename send_signal to request_interrupt,
6317 and remove enum target_signal parameter.
6318 * linux-low.c (linux_request_interrupt): Rename from
6319 linux_send_signal, and always send SIGINT.
6320 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6321 and always send SIGINT.
6322 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6324 (input_interrupt): Likewise.
6326 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6328 * server.c (get_features_xml): Check if target implemented
6330 * win32-i386-low.c (win32_arch_string): New.
6331 (win32_target_ops): Add win32_arch_string as arch_string member.
6333 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6335 * spu-low.c (spu_arch_string): New.
6336 (spu_target_ops): Add spu_arch_string.
6338 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6340 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6341 * configure.ac: Do not check for terminal.h.
6342 * configure, config.in: Regenerated.
6344 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6346 * Makefile.in (OBS): Add $(XML_BUILTIN).
6347 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6349 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6350 (arm-with-iwmmxt.c): New.
6351 * config.in, configure: Regenerate.
6352 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6353 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6354 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6355 (arm*-*-linux*): Add iWMMXt and regset support.
6356 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6357 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6358 (arm_store_wmmxregset, target_regsets): New.
6359 * server.c (get_features_xml): Take annex argument. Check builtin
6361 (handle_query): Handle multiple annexes.
6363 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6365 * remote-utils.c [USE_WIN32API] (read, write): Define.
6366 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6369 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6371 * linux-i386-low.c (the_low_target): Set arch_string.
6372 * linux-x86-64-low.c (the_low_target): Likewise.
6373 * linux-low.c (linux_arch_string): New.
6374 (linux_target_ops): Add it.
6375 * linux-low.h (struct linux_target_ops): Add arch_string.
6376 * server.c (write_qxfer_response): Use const void * for DATA.
6377 (get_features_xml): New.
6378 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6379 * target.h (struct target_ops): Add arch_string method.
6381 2007-01-03 Denis Pilat <denis.pilat@st.com>
6382 Daniel Jacobowitz <dan@codesourcery.com>
6384 * linux-low.c (linux_kill): Handle being called with no threads.
6385 * win32-i386-low.c (win32_kill): Likewise.
6386 (get_child_debug_event): Clear current_process_handle.
6388 2006-12-30 Denis PILAT <denis.pilat@st.com>
6389 Daniel Jacobowitz <dan@codesourcery.com>
6391 * remote-utils.c (remote_open): Check the type of specified
6392 serial port devices before opening them.
6393 * server.c (main): Kill the inferior if an error occurs during
6394 the first remote_open.
6396 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6398 * README: Update supported targets.
6400 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6402 * Makefile.in (clean): Remove reg-mips64.c.
6403 (reg-mips64.c, reg-mips64.o): New rules.
6404 * configure.srv: Handle mips64. Include regset support for mips.
6405 * linux-mips-low.c (union mips_register): New.
6406 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6407 (mips_breakpoint, mips_breakpoint_at): Use int.
6408 (mips_collect_register, mips_supply_register)
6409 (mips_collect_register_32bit, mips_supply_register_32bit)
6410 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6411 (mips_store_fpregset, target_regsets): New.
6412 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6414 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6416 * configure.srv: Add target "spu*-*-*".
6417 * Makefile.in (clean): Remove reg-spu.c.
6418 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6419 * spu-low.c: New file.
6421 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6423 * configure.ac: Correct td_thr_tls_get_addr test.
6424 * configure: Regenerated.
6426 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6428 * linux-low.c (linux_wait_for_event): Reformat. Use the
6430 * remote-utils.c (decode_address_to_semicolon): New.
6431 * server.c (pass_signals, handle_general_set): New.
6432 (handle_query): Mention QPassSignals for qSupported.
6433 (main): Call handle_general_set.
6434 * server.h (pass_signals, decode_address_to_semicolon): New.
6436 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6438 * server.c (handle_query): Correct error handling for read_auxv.
6440 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6442 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6443 and srv_linux_thread_db to yes.
6444 * linux-s390-low.c (s390_fill_gregset): New function.
6445 (target_regsets): Define data structure.
6447 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6449 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6450 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6451 * config.in, configure: Regenerated.
6452 * inferiors.c (gdb_id_to_thread): New function.
6453 (gdb_id_to_thread_id): Use it.
6454 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6455 * linux-low.h (struct process_info): Add th member.
6456 (thread_db_get_tls_address): New prototype.
6457 * remote-utils.c (decode_address): Make non-static.
6458 * server.c (handle_query): Handle qGetTLSAddr.
6459 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6460 * target.h (struct target_ops): Add get_tls_address.
6461 * thread-db.c (maybe_attach_thread): Save the thread handle.
6462 (thread_db_get_tls_address): New.
6464 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6466 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6467 (linux_resume_one_process): Take a siginfo_t *. Update all
6468 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6469 (struct pending_signals): Add a siginfo_t.
6470 (linux_wait_for_process): Always set last_status.
6471 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6472 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6473 * linux-low.h (struct process_info): Add last_status.
6475 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6477 * remote-utils.c (try_rle): New function.
6478 (putpkt_binary): Use it.
6480 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6482 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6483 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6484 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6485 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6486 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6489 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6491 * server.c (terminal_fd): New variable.
6492 (old_foreground_pgrp): Likewise.
6493 (restore_old_foreground_pgrp): New function.
6494 (start_inferior): Record the terminal file descriptor in terminal_fd
6495 and its original foreground group in old_foreground_pgrp. Register
6496 restore_old_foreground_pgrp with atexit().
6498 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6500 * server.c (handle_query): Correct qPart to qXfer.
6502 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6504 * configure.ac: Check for more headers which are missing on
6505 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6506 * configure.srv: Add Cygwin and mingw32.
6507 * remote-utils.c: Don't include headers unconditionally which
6508 are missing on mingw32. Include <winsock.h> for mingw32.
6509 (remote_open): Adjust for mingw32 support. Flush
6510 standard error after writing to it.
6511 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6512 (unblock_async_io, enable_async_io, disable_async_io)
6513 (readchar, getpkt): Update for Winsock support.
6514 (prepare_resume_reply): Expect a protocol signal number.
6515 * server.c: Disable <sys/wait.h> on mingw32.
6516 (start_inferior): Adjust for mingw32 support. Flush
6517 standard error after writing to it.
6518 (attach_inferior): Likewise. Use protocol signal
6520 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6522 * win32-i386-low.c: New file.
6523 * Makefile.in (XM_CLIBS): Set.
6524 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6525 (win32-i386-low.o): New dependency rule.
6526 * linux-low.c (linux_wait): Use target signal numbers.
6527 * target.h (struct target_ops): Doc fix.
6528 * server.h (target_signal_to_name): New prototype.
6529 * gdbreplay.c: Don't include headers unconditionally which
6530 are missing on mingw32. Include <winsock.h> for mingw32.
6531 (remote_close, remote_open): Adjust for Winsock support.
6532 * configure, config.in: Regenerated.
6534 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6536 * server.c (decode_xfer_read, write_qxfer_response): New.
6537 (handle_query): Take a packet length argument. Handle
6538 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6539 the qSupported response.
6540 (main): Update call to handle_query.
6542 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6544 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6545 (putpkt_binary): Renamed from putpkt and adjusted for binary
6547 (putpkt): New wrapper for putpkt_binary.
6548 (readchar): Don't mask off the high bit.
6549 (decode_X_packet): New function.
6550 * server.c (main): Call putpkt_binary if a handler sets the packet
6551 length. Save the length of the incoming packet. Handle 'X'.
6552 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6554 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6556 * server.c (handle_query): Handle qSupported.
6558 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6560 * remote-utils.c (all_symbols_looked_up): New variable.
6561 (look_up_one_symbol): Check it.
6562 * server.h (look_up_one_symbol): New declaration.
6563 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6565 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6567 * Makefile.in (linux-arm-low.o): Update dependencies.
6568 * linux-arm-low.c: Include "gdb_proc_service.h".
6569 (PTRACE_GET_THREAD_AREA): Define.
6570 (ps_get_thread_area): New function.
6572 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6574 * configure.srv (m68k*-*-uclinux*): New target.
6575 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6576 (linux_resume_one_process): Remove extraneous cast.
6577 (linux_read_offsets): New.
6578 (linux_target_op): Add linux_read_offsets on mmuless systems.
6579 * server.c (handle_query): Add qOffsets logic.
6580 * target.h (struct target_ops): Add read_offsets.
6582 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6584 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6585 (PTRACE_GET_THREAD_AREA): Define.
6586 (ps_get_thread_area): New function.
6587 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6588 (linux-x86-64-low.o): Update.
6590 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6592 * configure.ac: Remove checks for prfpregset_t.
6593 * gdb_proc_service.h: New file.
6594 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6595 new "gdb_proc_service.h".
6596 * proc-service.c: Likewise.
6597 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6598 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6599 * Makefile.in (gdb_proc_service_h): Updated.
6600 * configure, config.in: Regenerated.
6602 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6604 * remote-utils.c (prepare_resume_reply): Move declaration
6605 of gdb_id_from_wait to the top of the block.
6607 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6609 * linux-low.c (regsets_store_inferior_registers): Read the regset
6610 from the target before filling it.
6612 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6614 * server.c (attach_inferior): Return SIGTRAP for a successful
6617 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6619 * Makefile.in (OBS): Add version.o.
6620 (STAGESTUFF): Delete.
6621 (version.o): Add dependencies.
6622 (version.c): Replace rule.
6623 (clean): Remove version.c.
6624 * server.c (gdbserver_version): New.
6625 (gdbserver_usage): Use printf.
6626 (main): Handle --version and --help.
6627 * server.h (version, host_name): Add declarations.
6629 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6641 * linux-x86-64-low.c:
6644 * linux-ppc64-low.c:
6653 * linux-crisv32-low.c:
6665 * gdbserver.1: Add (C) after Copyright. Update the FSF
6668 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6670 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6671 (arm_breakpoint_at): Recognize both breakpoints.
6672 (the_low_target): Use the correct breakpoint instruction.
6674 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6676 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6677 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6678 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6679 (the_low_target): Update.
6681 2005-10-25 Andreas Schwab <schwab@suse.de>
6683 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6685 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6686 (ia64_num_regs): Reduce to 462.
6688 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6690 * acinclude.m4: Correct quoting.
6691 * aclocal.m4: Regenerated.
6693 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6694 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6695 (thread_db_init): Call thread_db_err_str.
6696 * configure.ac: Check for TD_VERSION.
6697 * config.in, configure: Regenerated.
6699 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6701 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6703 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6705 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6706 is not available. Define HAVE_PTRACE_GETREGS if it is.
6707 * config.in, configure: Regenerated.
6708 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6709 * linux-i386-low.c, linux-m68k-low.c: Update to use
6710 HAVE_PTRACE_GETREGS.
6711 * linux-low.c (regsets_fetch_inferior_registers)
6712 (regsets_store_inferior_registers): Only return 0 if we processed
6714 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6715 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6717 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6719 * inferiors.c (struct thread_info): Add gdb_id.
6720 (add_thread): Add gdb_id argument.
6721 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6722 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6723 calls to add_thread.
6724 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6725 * server.c (handle_query): Use thread_to_gdb_id.
6726 (handle_v_cont, main): Use gdb_id_to_thread_id.
6727 * server.h (add_thread): Update prototype.
6728 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6731 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6733 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6734 left-padded registers.
6735 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6736 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6738 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6740 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6741 * configure: Regenerate.
6742 * config.in: Regenerate.
6743 * server.h (NEED_DECLARATION_STRERROR):
6744 Replace with !HAVE_DECL_STRERROR.
6746 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6748 * linux-low.c (linux_wait, linux_send_signal): Don't test
6749 an unsigned long variable for > 0 if it could be MAX_ULONG.
6750 * server.c (myresume): Likewise.
6751 * target.c (set_desired_inferior): Likewise.
6753 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6755 * configure.ac: Simplify and improve check for socklen_t.
6756 * configure, config.in: Regenerate.
6758 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6760 * acconfig.h: Remove.
6761 * configure.ac: Add a test for socklen_t. Use three-argument
6762 AC_DEFINE throughout.
6763 * config.in: Regenerated using autoheader 2.59.
6764 * configure: Regenerated.
6766 * gdbreplay.c (socklen_t): Provide a default.
6767 (remote_open): Use socklen_t.
6768 * remote-utils.c (socklen_t): Provide a default.
6769 (remote_open): Use socklen_t.
6770 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6773 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6775 * linux-low.c (linux_read_memory, linux_write_memory)
6776 (linux_read_auxv): Likewise.
6777 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6778 (check_mem_write): Likewise.
6779 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6781 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6782 (registers_from_string, register_data): Likewise.
6783 * server.c (handle_query, main): Likewise.
6784 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6785 (decode_M_packet): Likewise.
6786 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6787 * target.h (struct target_ops): Update read_memory, write_memory,
6789 (read_inferior_memory, write_inferior_memory): Update.
6790 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6792 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6793 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6794 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6795 linux-s390-low.c, linux-sh-low.c: Update for changes in
6796 read_inferior_memory and the_low_target->breakpoint.
6798 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6800 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6801 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6802 * configure.srv: Add powerpc64-*-linux*.
6803 * linux-ppc64-low.c: New file.
6805 2005-05-23 Orjan Friberg <orjanf@axis.com>
6807 * linux-cris-low.c: New file with support for CRIS.
6808 * linux-crisv32-low.c: Ditto for CRISv32.
6809 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6810 (clean): Add reg-cris.c and reg-crisv32.c.
6811 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6812 reg-crisv32.o, and reg-crisv32.c to make rules.
6813 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6816 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6818 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6819 of sizeof (PTRACE_XFER_TYPE).
6820 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6822 2005-05-12 Orjan Friberg <orjanf@axis.com>
6824 * target.h (struct target_ops): Add insert_watchpoint,
6825 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6826 pointers for hardware watchpoint support.
6827 * linux-low.h (struct linux_target_ops): Ditto.
6828 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6829 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6830 to linux_target_ops.
6831 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6833 * server.c (main): Recognize 'Z' and 'z' packets.
6835 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6837 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6838 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6839 (the_low_target): Add new members.
6841 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6843 * proc-service.c (ps_lgetregs): Search all_processes instead of
6846 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6848 * server.c (start_inferior): Change return type to int.
6849 (attach_inferior): Change sigptr to int *.
6850 (handle_v_cont, handle_v_requests): Change signal to int *.
6851 (main): Change signal to int.
6853 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6855 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6856 * configure.srv: Add m32r*-*-linux*.
6857 * linux-m32r-low.c: New file.
6859 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6861 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6863 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6865 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6866 Take unsigned long arguments for PIDs.
6867 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6868 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6869 (wait_for_sigstop, linux_resume_one_process)
6870 (regsets_fetch_inferior_registers, linux_send_signal)
6871 (linux_read_auxv): Likewise. Update the types of variables holding
6872 PIDs. Update format string specifiers.
6873 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6874 * remote-utils.c (prepare_resume_reply): Likewise.
6875 * server.c (cont_thread, general_thread, step_thread)
6876 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6878 (handle_query): Update format specifiers.
6879 (handle_v_cont, main): Use strtoul for thread IDs.
6880 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6881 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6882 (general_thread, step_thread, thread_from_wait)
6883 (old_thread_from_wait): Update.
6884 * target.h (struct thread_resume): Use unsigned long for THREAD.
6885 (struct target_ops): Use unsigned long for arguments to attach and
6888 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6890 * acinclude.m4: Include bfd/bfd.m4 directly.
6891 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6892 <agriffis@toolchain.org>.
6893 * aclocal.m4, configure: Regenerated.
6895 2005-01-07 Andrew Cagney <cagney@gnu.org>
6897 * configure.ac: Rename configure.in, require autoconf 2.59.
6898 * configure: Re-generate.
6900 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6902 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6904 * aclocal.m4: Regenerated.
6905 * configure: Regenerated.
6907 2004-11-21 Andreas Schwab <schwab@suse.de>
6909 * linux-m68k-low.c (m68k_num_gregs): Define.
6910 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6911 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6912 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6913 (m68k_breakpoint_at): New. Add to the_low_target.
6915 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6916 srv_linux_thread_db to yes.
6918 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6920 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6921 (ARCH_SET_FS): Likewise.
6922 (ARCH_GET_FS): Likewise.
6923 (ARCH_GET_GS): Likewise.
6925 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6927 * linux-i386-low.c (ps_get_thread_area): New.
6928 * linux-x86-64-low.c (ps_get_thread_area): New.
6929 * linux-low.c: Include <sys/syscall.h>.
6930 (linux_kill_one_process): Don't kill the first thread here.
6931 (linux_kill): Kill the first thread here.
6932 (kill_lwp): New function.
6933 (send_sigstop, linux_send_signal): Use it.
6934 * proc-service.c: Clean up #ifdefs.
6935 (fpregset_info): Delete.
6936 (ps_lgetregs): Update and enable implementation.
6937 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6939 * remote-utils.c (struct sym_cache, symbol_cache): New.
6940 (input_interrupt): Print a clearer message.
6941 (async_io_enabled): New variable.
6942 (enable_async_io, disable_async_io): Use it. Update comments.
6943 (look_up_one_symbol): Use the symbol cache.
6944 * thread-db.c (thread_db_look_up_symbols): New function.
6945 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6947 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6949 * configure.in: Test for -rdynamic.
6950 * configure: Regenerated.
6951 * Makefile (INTERNAL_LDFLAGS): New.
6952 (gdbserver, gdbreplay): Use it.
6954 2004-09-02 Andrew Cagney <cagney@gnu.org>
6956 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6958 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6960 * linux-low.c (linux_wait): Clear all_processes list also.
6962 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6964 * linux-low.c: Include <errno.h>. Remove extern declaration of
6967 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6969 * gdbreplay.c, server.h, utils.c: Update copyright years.
6971 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6973 * server.c (main): Print child status or termination signal from
6974 variable 'signal', not 'sig'.
6976 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6978 * linux-low.c (linux_read_memory): Change return type to
6979 int. Check for and return error from ptrace().
6980 * target.c (read_inferior_memory): Change return type to int. Pass
6981 back return status from the_target->read_memory().
6982 * target.h (struct target_ops): Adapt *read_memory() prototype.
6984 (read_inferior_memory): Adapt prototype.
6985 * server.c (main): Return an error packet if
6986 read_inferior_memory() returns an error.
6988 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6990 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6991 Unify with other clean targets.
6993 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6995 * server.c (handle_v_cont): Call set_desired_inferior.
6997 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6999 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7001 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7003 * linux-low.c (linux_wait): Unblock async I/O.
7004 (linux_resume): Block and enable async I/O.
7005 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7006 * server.h (block_async_io, unblock_async_io): Add prototypes.
7008 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7010 * remote-utils.c (remote_open): Print a status notice after
7012 * server.c (attach_inferior): Print a status notice after
7015 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7017 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7019 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7021 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7023 * server.c, target.h: Update copyright years.
7025 2004-02-25 Roland McGrath <roland@redhat.com>
7027 * target.h (struct target_ops): New member `read_auxv'.
7028 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7029 * linux-low.c (linux_read_auxv): New function.
7030 (linux_target_ops): Initialize `read_auxv' member to that.
7032 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7034 Committed by Jim Blandy <jimb@redhat.com>.
7036 * linux-s390-low.c (s390_num_regs): Update.
7037 (s390_regmap): Remove control registers. Use __s390x__ predefine
7038 instead of GPR_SIZE to distiguish s390 and s390x targets.
7040 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7042 * linux-low.c: Update copyright year.
7043 (check_removed_breakpoint): Clear pending_is_breakpoint.
7044 (linux_set_resume_request, linux_queue_one_thread)
7045 (resume_status_pending_p): New functions.
7046 (linux_continue_one_thread): Use process->resume.
7047 (linux_resume): Only resume threads if there are no pending events.
7048 * linux-low.h (struct process_info): Add resume request
7051 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7053 * regcache.c (new_register_cache): Clear the allocated register
7054 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7056 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
7058 * linux-low.c (linux_resume): Take a struct thread_resume *
7060 (linux_wait): Update call.
7061 (resume_ptr): New static variable.
7062 (linux_continue_one_thread): Renamed from
7063 linux_continue_one_process. Use resume_ptr.
7064 (linux_resume): Use linux_continue_one_thread.
7065 * server.c (handle_v_cont, handle_v_requests): New functions.
7066 (myresume): New function.
7067 (main): Handle 'v' case.
7068 * target.h (struct thread_resume): New type.
7069 (struct target_ops): Change argument of "resume" to struct
7071 (myresume): Delete macro.
7073 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7075 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7076 (uninstall): Support DESTDIR.
7078 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7080 * configure.srv: Add xscale*linux copy of arm*linux entry.
7082 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
7084 * linux-arm-low.c (arm_reinsert_addr): New function.
7085 (the_low_target): Add arm_reinsert_addr.
7087 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7089 * mem-break.c: Remove whitespace at end of file.
7091 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7093 * configure.in: Check whether we need to prototype strerror.
7094 * server.h: Optionally prototype strerror.
7095 * gdbreplay.c (perror_with_name): Use strerror.
7096 * linux-low.c (linux_attach_lwp): Use strerror.
7097 * utils.c (perror_with_name): Use strerror.
7098 * config.in, configure: Regenerated.
7100 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
7102 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7103 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7105 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
7107 * Makefile.in (SFILES): Update.
7108 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7109 low-sun3.c: Remove files.
7111 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
7113 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7114 (linux_detach_one_process, linux_detach): New functions.
7115 (linux_target_ops): Add linux_detach.
7116 * server.c (main): Handle 'D' packet.
7117 * target.h (struct target_ops): Add "detach" member.
7118 (detach_inferior): Define.
7120 2003-06-13 Mark Kettenis <kettenis@gnu.org>
7122 From Kelley Cook <kelleycook@wideopenwest.com>:
7123 * configure.srv: Accept i[34567]86 variants.
7125 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
7127 * linux-low.c (linux_wait_for_event): Correct comment typos.
7128 (linux_resume_one_process): Call check_removed_breakpoint.
7129 (linux_send_signal): New function.
7130 (linux_target_ops): Add linux_send_signal.
7131 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7133 * target.h (struct target_ops): Add send_signal.
7135 2003-05-29 Jim Blandy <jimb@redhat.com>
7137 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7138 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7139 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7140 away part of the register's value.
7142 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
7144 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7145 (linux_wait_for_event, linux_init_signals): Likewise.
7147 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
7149 * configure.in: Check for stdlib.h.
7150 * configure: Regenerated.
7151 * config.in: Regenerated.
7153 2003-01-04 Andreas Schwab <schwab@suse.de>
7155 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7157 2003-01-02 Andrew Cagney <ac131313@redhat.com>
7159 * Makefile.in: Remove obsolete code.
7161 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
7163 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7164 defined(PT_FPR0_HI).
7166 2002-11-17 Stuart Hughes <seh@zee2.com>
7168 * linux-arm-low.c (arm_num_regs): Increase.
7169 (arm_regmap): Include status register.
7171 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
7173 * linux-low.c (register_addr): Remove incorrect -1 check.
7175 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
7177 * linux-low.c (linux_create_inferior): Call setpgid. Return
7179 (unstopped_p, linux_signal_pid): Remove.
7180 (linux_target_ops): Remove linux_signal_pid.
7181 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7182 global instead of target method.
7183 * target.h (struct target_ops): Remove signal_pid. Update comment
7184 for create_inferior.
7185 * server.c (signal_pid): New variable.
7186 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7187 gdbserver. Set the child to be the foreground process group.
7188 (attach_inferior): Set signal_pid.
7190 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
7192 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7194 2002-08-20 Jim Blandy <jimb@redhat.com>
7196 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7199 2002-08-01 Andrew Cagney <cagney@redhat.com>
7201 * Makefile.in: Make chill references obsolete.
7203 2002-07-24 Kevin Buettner <kevinb@redhat.com>
7205 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7206 * configure: Regenerate.
7207 * config.in: Regenerate.
7209 2002-07-09 David O'Brien <obrien@FreeBSD.org>
7211 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7212 (perror_with_name, remote_close, remote_open, expect, play): Static.
7214 2002-07-04 Michal Ludvig <mludvig@suse.cz>
7216 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7217 byte offsets instead of an array of indexes.
7218 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7220 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
7222 * regcache.c: Add comment.
7224 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
7226 * thread-db.c: New file.
7227 * proc-service.c: New file.
7228 * acinclude.m4: New file.
7229 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7230 proc-service.o, and thread-db.o.
7231 (linux-low.o): Add USE_THREAD_DB.
7232 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7233 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7234 * aclocal.m4: Regenerated.
7235 * config.in: Regenerated.
7236 * configure: Regenerated.
7237 * configure.in: Check for proc_service.h, sys/procfs.h,
7238 thread_db.h, and linux/elf.h headrs.
7239 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7240 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7241 Check for -lthread_db and thread support.
7242 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7243 PowerPC, and SuperH.
7244 * i387-fp.c: Constify arguments.
7245 * i387-fp.h: Likewise.
7246 * inferiors.c: (struct thread_info): Renamed from
7247 `struct inferior_info'. Remove PID member. Use generic inferior
7248 list header. All uses updated.
7249 (inferiors, signal_pid): Removed.
7250 (all_threads): New variable.
7251 (get_thread): Define.
7252 (add_inferior_to_list): New function.
7253 (for_each_inferior): New function.
7254 (change_inferior_id): New function.
7255 (add_inferior): Removed.
7256 (remove_inferior): New function.
7257 (add_thread): New function.
7258 (free_one_thread): New function.
7259 (remove_thread): New function.
7260 (clear_inferiors): Use for_each_inferior and free_one_thread.
7261 (find_inferior): New function.
7262 (find_inferior_id): New function.
7263 (inferior_target_data): Update argument type.
7264 (set_inferior_target_data): Likewise.
7265 (inferior_regcache_data): Likewise.
7266 (set_inferior_regcache_data): Likewise.
7267 * linux-low.c (linux_bp_reinsert): Remove.
7268 (all_processes, stopping_threads, using_thrads)
7269 (struct pending_signals, debug_threads, pid_of): New.
7270 (inferior_pid): Replace with macro.
7271 (struct inferior_linux_data): Remove.
7272 (get_stop_pc, add_process): New functions.
7273 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7274 Use add_process and add_thread.
7275 (linux_attach_lwp): New function, based on old linux_attach. Use
7276 add_process and add_thread. Set stop_expected for new threads.
7277 (linux_attach): New function.
7278 (linux_kill_one_process): New function.
7279 (linux_kill): Kill all LWPs.
7280 (linux_thread_alive): Use find_inferior_id.
7281 (check_removed_breakpoints, status_pending_p): New functions.
7282 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7283 Update. Use WNOHANG. Wait for cloned processes also. Update process
7284 struct for the found process.
7285 (linux_wait_for_event): New function.
7286 (linux_wait): Use it. Support LWPs.
7287 (send_sigstop, wait_for_sigstop, stop_all_processes)
7288 (linux_resume_one_process, linux_continue_one_process): New functions.
7289 (linux_resume): Support LWPs.
7290 (REGISTER_RAW_SIZE): Remove.
7291 (fetch_register): Use register_size instead. Call supply_register.
7292 (usr_store_inferior_registers): Likewise. Call collect_register.
7294 (regsets_fetch_inferior_registers): Improve error message.
7295 (regsets_store_inferior_registers): Add debugging.
7296 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7297 (unstopped_p, linux_signal_pid): New functions.
7298 (linux_target_ops): Add linux_signal_pid.
7299 (linux_init_signals): New function.
7300 (initialize_low): Call it. Initialize using_threads.
7301 * regcache.c (inferior_regcache_data): Add valid
7303 (get_regcache): Fetch registers lazily. Add fetch argument
7304 and update all callers.
7305 (regcache_invalidate_one, regcache_invalidate): New
7307 (new_register_cache): Renamed from create_register_cache.
7308 Return the new regcache.
7309 (free_register_cache): Change argument to a void *.
7310 (registers_to_string, registers_from_string): Call get_regcache
7311 with fetch flag set.
7312 (register_data): Make static. Pass fetch flag to get_regcache.
7313 (supply_register): Call get_regcache with fetch flag clear.
7314 (collect_register): Call get_regcache with fetch flag set.
7315 (collect_register_as_string): New function.
7316 * regcache.h: Update.
7317 * remote-utils.c (putpkt): Flush after debug output and use
7319 Handle input interrupts while waiting for an ACK.
7320 (input_interrupt): Use signal_pid method.
7321 (getpkt): Flush after debug output and use stderr.
7322 (outreg): Use collect_register_as_string.
7323 (new_thread_notify, dead_thread_notify): New functions.
7324 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7326 (look_up_one_symbol): Flush after debug output.
7327 * server.c (step_thread, server_waiting): New variables.
7328 (start_inferior): Don't use signal_pid. Update call to mywait.
7329 (attach_inferior): Update call to mywait.
7330 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7331 (main): Don't fetch/store registers explicitly. Use
7332 set_desired_inferior. Support proposed ``Hs'' packet. Update
7335 (struct inferior_list, struct_inferior_list_entry): New.
7336 * target.c (set_desired_inferior): New.
7337 (write_inferior_memory): Constify.
7338 (mywait): New function.
7340 (struct target_ops): New signal_pid method.
7341 (mywait): Removed macro, added prototype.
7343 * linux-low.h (regset_func): Removed.
7344 (regset_fill_func, regset_store_func): New.
7345 (enum regset_type): New.
7346 (struct regset_info): Add type field. Use new operation types.
7347 (struct linux_target_ops): stop_pc renamed to get_pc.
7348 Add decr_pc_after_break and breakpoint_at.
7349 (get_process, get_thread_proess, get_process_thread)
7350 (strut process_info, all_processes, linux_attach_lwp)
7351 (thread_db_init): New.
7353 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7354 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7355 (the_low_target): Add new members.
7356 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7357 (i386_store_fpxregset): Constify.
7358 (target_regsets): Add new kind identifier.
7359 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7360 (i386_set_pc): Add debugging.
7361 (i386_breakpoint_at): New function.
7362 (the_low_target): Add new members.
7363 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7364 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7365 (mips_breakpoint_at): New.
7366 (the_low_target): Add new members.
7367 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7368 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7369 (the_low_target): Add new members.
7370 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7371 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7372 (the_low_target): Add new members.
7373 * linux-x86-64-low.c (target_regsets): Add new kind
7376 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7378 From Martin Pool <mbp@samba.org>:
7379 * server.c (gdbserver_usage): New function.
7382 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7384 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7387 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7389 * Makefile.in: Remove obsolete code.
7391 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7393 * linux-low.c (regsets_fetch_inferior_registers),
7394 (regsets_store_inferior_registers): Removed cast to int from
7396 * regcache.h: Added declaration of struct inferior_info.
7398 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7400 * inferiors.c (struct inferior_info): Add regcache_data.
7401 (add_inferior): Call create_register_cache.
7402 (clear_inferiors): Call free_register_cache.
7403 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7404 * regcache.c (struct inferior_regcache_data): New.
7405 (registers): Remove.
7406 (get_regcache): New function.
7407 (create_register_cache, free_register_cache): New functions.
7408 (set_register_cache): Don't initialize the register cache here.
7409 (registers_to_string, registers_from_string, register_data): Call
7411 * regcache.h: Add prototypes.
7412 * server.h: Likewise.
7414 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7416 * mem-break.c: New file.
7417 * mem-break.h: New file.
7418 * Makefile.in: Add mem-break.o rule; update server.h
7420 * inferiors.c (struct inferior_info): Add target_data
7422 (clear_inferiors): Free target_data member if set.
7423 (inferior_target_data, set_inferior_target_data): New functions.
7424 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7425 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7426 * linux-low.c (linux_bp_reinsert): New variable.
7427 (struct inferior_linux_data): New.
7428 (linux_create_inferior): Use set_inferior_target_data.
7429 (linux_attach): Likewise. Call add_inferior.
7430 (linux_wait_for_one_inferior): New function.
7431 (linux_wait): Call it.
7432 (linux_write_memory): Add const.
7433 (initialize_low): Call set_breakpoint_data.
7434 * linux-low.h (struct linux_target_ops): Add breakpoint
7436 * server.c (attach_inferior): Remove extra add_inferior
7438 * server.h: Include mem-break.h. Update inferior.c
7440 * target.c (read_inferior_memory)
7441 (write_inferior_memory): New functions.
7442 * target.h (read_inferior_memory)
7443 (write_inferior_memory): Change macros to prototypes.
7444 (struct target_ops): Update comments. Add const to write_memory
7447 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7449 * linux-low.c (usr_store_inferior_registers): Support
7450 registers which are allowed to fail to store.
7451 * linux-low.h (linux_target_ops): Likewise.
7452 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7453 (ppc_cannot_store_register): FPSCR may not be storable.
7455 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7457 * server.h: Include <string.h> if HAVE_STRING_H.
7458 * ChangeLog: Correct paths in last ChangeLog entry.
7460 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7462 * linux-low.h: Remove obsolete prototypes.
7463 (struct linux_target_ops): New.
7464 (extern the_low_target): New.
7465 * linux-low.c (num_regs, regmap): Remove declarations.
7466 (register_addr): Use the_low_target explicitly.
7467 (fetch_register): Likewise.
7468 (usr_fetch_inferior_registers): Likewise.
7469 (usr_store_inferior_registers): Likewise.
7470 * linux-arm-low.c (num_regs): Remove.
7471 (arm_num_regs): Define.
7472 (arm_regmap): Renamed from regmap, made static.
7473 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7475 (arm_cannot_store_register): Renamed from cannot_store_register,
7477 (the_low_target): New.
7478 * linux-i386-low.c (num_regs): Remove.
7479 (i386_num_regs): Define.
7480 (i386_regmap): Renamed from regmap, made static.
7481 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7483 (i386_cannot_store_register): Renamed from cannot_store_register,
7485 (the_low_target): New.
7486 * linux-ia64-low.c (num_regs): Remove.
7487 (ia64_num_regs): Define.
7488 (ia64_regmap): Renamed from regmap, made static.
7489 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7491 (ia64_cannot_store_register): Renamed from cannot_store_register,
7493 (the_low_target): New.
7494 * linux-m68k-low.c (num_regs): Remove.
7495 (m68k_num_regs): Define.
7496 (m68k_regmap): Renamed from regmap, made static.
7497 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7499 (m68k_cannot_store_register): Renamed from cannot_store_register,
7501 (the_low_target): New.
7502 * linux-mips-low.c (num_regs): Remove.
7503 (mips_num_regs): Define.
7504 (mips_regmap): Renamed from regmap, made static.
7505 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7507 (mips_cannot_store_register): Renamed from cannot_store_register,
7509 (the_low_target): New.
7510 * linux-ppc-low.c (num_regs): Remove.
7511 (ppc_num_regs): Define.
7512 (ppc_regmap): Renamed from regmap, made static.
7513 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7515 (ppc_cannot_store_register): Renamed from cannot_store_register,
7517 (the_low_target): New.
7518 * linux-s390-low.c (num_regs): Remove.
7519 (s390_num_regs): Define.
7520 (s390_regmap): Renamed from regmap, made static.
7521 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7523 (s390_cannot_store_register): Renamed from cannot_store_register,
7525 (the_low_target): New.
7526 * linux-sh-low.c (num_regs): Remove.
7527 (sh_num_regs): Define.
7528 (sh_regmap): Renamed from regmap, made static.
7529 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7531 (sh_cannot_store_register): Renamed from cannot_store_register,
7533 (the_low_target): New.
7534 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7535 (the_low_target): New.
7537 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7539 * Makefile.in: Add stamp-h target.
7540 * configure.in: Create stamp-h.
7541 * configure: Regenerated.
7543 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7545 * inferiors.c: New file.
7546 * target.c: New file.
7547 * target.h: New file.
7548 * Makefile.in: Add target.o and inferiors.o. Update
7550 * linux-low.c (inferior_pid): New static variable,
7551 moved from server.c.
7552 (linux_create_inferior): Renamed from create_inferior.
7553 Call add_inferior. Return 0 on success instead of a PID.
7554 (linux_attach): Renamed from myattach.
7555 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7556 (linux_thread_alive): Renamed from mythread_alive.
7557 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7559 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7560 (regsets_store_inferior_registers): Correct error message.
7561 Add missing ``return 0''.
7562 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7563 (linux_store_registers): Renamed from store_inferior_registers.
7564 (linux_read_memory): Renamed from read_inferior_memory.
7565 (linux_write_memory): Renamed from write_inferior_memory.
7566 (linux_target_ops): New structure.
7567 (initialize_low): Call set_target_ops ().
7568 * remote-utils.c (unhexify): New function.
7569 (hexify): New function.
7570 (input_interrupt): Send signals to ``signal_pid''.
7571 * server.c (inferior_pid): Remove.
7572 (start_inferior): Update create_inferior call.
7573 (attach_inferior): Call add_inferior.
7574 (handle_query): New function.
7575 (main): Call handle_query for `q' packets.
7576 * server.h: Include "target.h". Remove obsolete prototypes.
7577 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7579 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7581 * Makefile.in: Add WARN_CFLAGS. Update configury
7583 * configure.in: Check for <string.h>
7584 * configure: Regenerate.
7585 * config.in: Regenerate.
7586 * gdbreplay.c: Include needed system headers.
7587 (remote_open): Remove strchr prototype.
7588 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7589 * regcache.c (supply_register): Change buf argument to const void *.
7590 (supply_register_by_name): Likewise.
7591 (collect_register): Change buf argument to void *.
7592 (collect_register_by_name): Likewise.
7593 * regcache.h: Add missing prototypes.
7594 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7595 * server.c (handle_query): New function.
7596 (attached): New static variable, moved out of main.
7597 (main): Quiet longjmp clobber warnings.
7598 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7599 * utils.c (error): Remove NORETURN.