summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-07-11 17:46:40 +0000
committerPedro Alves <pedro@codesourcery.com>2008-07-11 17:46:40 +0000
commit901d034309bb91e76696aa52942e13429593d9cc (patch)
tree69e89d49b248ecebc38a1c9524119b104d1931d4 /gdb/infrun.c
parent8968e8efcfc6eb81f73c04d0d29be5b91bf0191e (diff)
downloadgdb-901d034309bb91e76696aa52942e13429593d9cc.tar.gz
* infrun.c (handle_inferior_event): Also ignore a
TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 44e67900e32..d99a40ebbe4 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2543,13 +2543,20 @@ targets should add new threads to the thread list themselves in non-stop mode.")
}
/* This originates from attach_command(). We need to overwrite
- the stop_signal here, because some kernels don't ignore a
- SIGSTOP in a subsequent ptrace(PTRACE_CONT,SIGSTOP) call.
- See more comments in inferior.h. On the other hand, if we
+ the stop_signal here, because some kernels don't ignore a
+ SIGSTOP in a subsequent ptrace(PTRACE_CONT,SIGSTOP) call.
+ See more comments in inferior.h. On the other hand, if we
get a non-SIGSTOP, report it to the user - assume the backend
- will handle the SIGSTOP if it should show up later. */
+ will handle the SIGSTOP if it should show up later.
+
+ Also consider that the attach is complete when we see a
+ 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. */
if (stop_soon == STOP_QUIETLY_NO_SIGSTOP
- && stop_signal == TARGET_SIGNAL_STOP)
+ && (stop_signal == TARGET_SIGNAL_STOP
+ || stop_signal == TARGET_SIGNAL_TRAP))
{
stop_stepping (ecs);
stop_signal = TARGET_SIGNAL_0;