aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-11-05 20:23:07 +0000
committerPedro Alves <palves@redhat.com>2008-11-05 20:23:07 +0000
commite0ba674611b77dce4d02d6b08e90b10255ec3e2d (patch)
tree2e6dd7afb17800c925cd5c543347e28b03416cf0 /gdb/infrun.c
parent6dc6b6558bf7ede38de5f7b9356d8d98e5960c33 (diff)
downloadgdb-e0ba674611b77dce4d02d6b08e90b10255ec3e2d.zip
gdb-e0ba674611b77dce4d02d6b08e90b10255ec3e2d.tar.gz
gdb-e0ba674611b77dce4d02d6b08e90b10255ec3e2d.tar.bz2
* defs.h (add_inferior_continuation)
(do_all_inferior_continuations) (discard_all_inferior_continuations): Declare. * utils.c (add_inferior_continuation) (do_all_inferior_continuations) (discard_all_inferior_continuations): New. * inferior.h (struct inferior) <continuations>: New field. * inferior.c (free_inferior): Discard all the inferior continuations. * inf-loop.c (inferior_event_handler): Do all current inferior continuations. * infcmd.c (attach_command): Register an inferior continuation instead of a thread continuation. * infrun.c (handle_inferior_event): If stop_soon is STOP_QUIETLY_NO_SIGSTOP, also expect a TARGET_SIGNAL_0.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 30d914d..1a95466 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2834,10 +2834,19 @@ targets should add new threads to the thread list themselves in non-stop mode.")
SIGTRAP. Some systems (e.g. Windows), and stubs supporting
target extended-remote report it instead of a SIGSTOP
(e.g. gdbserver). We already rely on SIGTRAP being our
- signal, so this is no exception. */
+ signal, so this is no exception.
+
+ Also consider that the attach is complete when we see a
+ TARGET_SIGNAL_0. In non-stop mode, GDB will explicitly tell
+ the target to stop all threads of the inferior, in case the
+ low level attach operation doesn't stop them implicitly. If
+ they weren't stopped implicitly, then the stub will report a
+ TARGET_SIGNAL_0, meaning: stopped for no particular reason
+ other than GDB's request. */
if (stop_soon == STOP_QUIETLY_NO_SIGSTOP
&& (ecs->event_thread->stop_signal == TARGET_SIGNAL_STOP
- || ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP))
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_0))
{
stop_stepping (ecs);
ecs->event_thread->stop_signal = TARGET_SIGNAL_0;