aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-07-11 17:46:40 +0000
committerPedro Alves <palves@redhat.com>2008-07-11 17:46:40 +0000
commita0d21d280839472b02a86175045b7482ae301fb9 (patch)
tree75fa321281e64a3eca93016b06eee58a25fdf2af /gdb
parent851b0ff7c6dbfc792aeb32a0953d4445d7e5f964 (diff)
downloadgdb-a0d21d280839472b02a86175045b7482ae301fb9.zip
gdb-a0d21d280839472b02a86175045b7482ae301fb9.tar.gz
gdb-a0d21d280839472b02a86175045b7482ae301fb9.tar.bz2
* infrun.c (handle_inferior_event): Also ignore a
TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c17
2 files changed, 17 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e5c54e6..d7a95ab 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-11 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (handle_inferior_event): Also ignore a
+ TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
+
2008-07-11 Tom Tromey <tromey@redhat.com>
* completer.c (complete_line_internal): New function, from
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 44e6790..d99a40e 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;