aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-05-27 19:44:53 +0000
committerPedro Alves <palves@redhat.com>2009-05-27 19:44:53 +0000
commita75724bceb9e90bfb5ee80916cfcd8f2b87041f4 (patch)
tree900cf9ca60689dc336743c5d75e80f5a9b2f78b0 /gdb/infrun.c
parent05056a8d5b72672948f507978c7ce1e2897d30be (diff)
downloadfsf-binutils-gdb-a75724bceb9e90bfb5ee80916cfcd8f2b87041f4.zip
fsf-binutils-gdb-a75724bceb9e90bfb5ee80916cfcd8f2b87041f4.tar.gz
fsf-binutils-gdb-a75724bceb9e90bfb5ee80916cfcd8f2b87041f4.tar.bz2
gdb/
* infrun.c (follow_exec): Clear the stop_requested flag. * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>: Add debug output. gdb/testsuite/ * gdb.mi/nsthrexec.c, gdb.mi/mi-nsthrexec.exp: New.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 7d870eb..381d208 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -494,6 +494,14 @@ follow_exec (ptid_t pid, char *execd_pathname)
th->step_range_start = 0;
th->step_range_end = 0;
+ /* The target reports the exec event to the main thread, even if
+ some other thread does the exec, and even if the main thread was
+ already stopped --- if debugging in non-stop mode, it's possible
+ the user had the main thread held stopped in the previous image
+ --- release it now. This is the same behavior as step-over-exec
+ with scheduler-locking on in all-stop mode. */
+ th->stop_requested = 0;
+
/* What is this a.out's name? */
printf_unfiltered (_("Executing new program: %s\n"), execd_pathname);