aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-10-09 01:57:12 +0000
committerPedro Alves <palves@redhat.com>2009-10-09 01:57:12 +0000
commit287369626f415a12f53989914dc0499b6c96d1aa (patch)
treefa8288f856b36c63ad94c80b6fc86ba848c2a428 /gdb/linux-nat.c
parent651c8d2d6c30c4d2178988e5c48fdad2116982ed (diff)
downloadgdb-287369626f415a12f53989914dc0499b6c96d1aa.zip
gdb-287369626f415a12f53989914dc0499b6c96d1aa.tar.gz
gdb-287369626f415a12f53989914dc0499b6c96d1aa.tar.bz2
* linux-nat.c (linux_nat_wait_1): Bail out, if TARGET_WNOHANG and
we found no event while waiting for a specific LWP. * infrun.c (handle_inferior_event): Handle TARGET_WAITKIND_IGNORE before anything else.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index f4f843b..bde7311 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -3255,6 +3255,17 @@ retry:
sigsuspend (&suspend_mask);
}
}
+ else if (target_options & TARGET_WNOHANG)
+ {
+ /* No interesting event for PID yet. */
+ ourstatus->kind = TARGET_WAITKIND_IGNORE;
+
+ if (debug_linux_nat_async)
+ fprintf_unfiltered (gdb_stdlog, "LLW: exit (ignore)\n");
+
+ restore_child_signals_mask (&prev_mask);
+ return minus_one_ptid;
+ }
/* We shouldn't end up here unless we want to try again. */
gdb_assert (lp == NULL);