diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2006-09-17 12:28:19 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2006-09-17 12:28:19 +0000 |
commit | 1cb991a7f12833158244c94edd62a4565fc1c5ad (patch) | |
tree | 000989d7e875c0c52bbacf414544606ba57e34c6 | |
parent | b273f15bb8433827947c6eb2dc8f1fddf932181b (diff) | |
download | fsf-binutils-gdb-1cb991a7f12833158244c94edd62a4565fc1c5ad.zip fsf-binutils-gdb-1cb991a7f12833158244c94edd62a4565fc1c5ad.tar.gz fsf-binutils-gdb-1cb991a7f12833158244c94edd62a4565fc1c5ad.tar.bz2 |
(linux_nat_resume): Call to_resume method later.
-rw-r--r-- | gdb/linux-nat.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 4efe165..a177fb1 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1254,10 +1254,13 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo) if (resume_all) iterate_over_lwps (resume_callback, NULL); - linux_ops->to_resume (ptid, step, signo); - if (target_can_async_p ()) { + /* Check for pending events. If we find any, then we won't really + resume, but rather we will extract the first event from the pending events + queue, and post it to the gdb event queue, and then "pretend" that we have + in fact resumed. */ + status.kind = TARGET_WAITKIND_SPURIOUS; gdb_process_events (gdb_status, &status, 0, 0); @@ -1268,9 +1271,12 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo) target_executing = 1; return; } + } + + linux_ops->to_resume (ptid, step, signo); + if (target_can_async_p ()) target_async (inferior_event_handler, 0); - } if (target_is_async_p ()) target_executing = 1; @@ -1917,7 +1923,9 @@ linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus, if ((ourstatus->kind == TARGET_WAITKIND_EXITED) || (ourstatus->kind == TARGET_WAITKIND_SIGNALLED)) - return null_ptid; + { + return null_ptid; + } return BUILD_LWP (gdb_status->pid, gdb_status->pid); } |