GNU Binutils with patches for OS216
Révision | 1cb991a7f12833158244c94edd62a4565fc1c5ad (tree) |
---|---|
l'heure | 2006-09-17 21:28:19 |
Auteur | Nick Roberts <nickrob@snap...> |
Commiter | Nick Roberts |
(linux_nat_resume): Call to_resume method later.
@@ -1254,10 +1254,13 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo) | ||
1254 | 1254 | if (resume_all) |
1255 | 1255 | iterate_over_lwps (resume_callback, NULL); |
1256 | 1256 | |
1257 | - linux_ops->to_resume (ptid, step, signo); | |
1258 | - | |
1259 | 1257 | if (target_can_async_p ()) |
1260 | 1258 | { |
1259 | + /* Check for pending events. If we find any, then we won't really | |
1260 | + resume, but rather we will extract the first event from the pending events | |
1261 | + queue, and post it to the gdb event queue, and then "pretend" that we have | |
1262 | + in fact resumed. */ | |
1263 | + | |
1261 | 1264 | status.kind = TARGET_WAITKIND_SPURIOUS; |
1262 | 1265 | gdb_process_events (gdb_status, &status, 0, 0); |
1263 | 1266 |
@@ -1268,9 +1271,12 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo) | ||
1268 | 1271 | target_executing = 1; |
1269 | 1272 | return; |
1270 | 1273 | } |
1274 | + } | |
1275 | + | |
1276 | + linux_ops->to_resume (ptid, step, signo); | |
1271 | 1277 | |
1278 | + if (target_can_async_p ()) | |
1272 | 1279 | target_async (inferior_event_handler, 0); |
1273 | - } | |
1274 | 1280 | |
1275 | 1281 | if (target_is_async_p ()) |
1276 | 1282 | target_executing = 1; |
@@ -1917,7 +1923,9 @@ linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus, | ||
1917 | 1923 | |
1918 | 1924 | if ((ourstatus->kind == TARGET_WAITKIND_EXITED) |
1919 | 1925 | || (ourstatus->kind == TARGET_WAITKIND_SIGNALLED)) |
1920 | - return null_ptid; | |
1926 | + { | |
1927 | + return null_ptid; | |
1928 | + } | |
1921 | 1929 | |
1922 | 1930 | return BUILD_LWP (gdb_status->pid, gdb_status->pid); |
1923 | 1931 | } |