aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-07-20 12:33:30 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-07-20 12:33:30 +0000
commit33355866db612467bab9fa405008ff9f3cdccf4f (patch)
treea3dc20b11923f2248f4dfc480e572ce322e88034 /gdb/linux-nat.c
parent8c05cf89c7973299835fb66828a4387765ab786c (diff)
downloadgdb-33355866db612467bab9fa405008ff9f3cdccf4f.zip
gdb-33355866db612467bab9fa405008ff9f3cdccf4f.tar.gz
gdb-33355866db612467bab9fa405008ff9f3cdccf4f.tar.bz2
gdb/
Code cleanup. * linux-nat.c (linux_nat_wait_1): Reset STATUS after calling linux_nat_wait_1. Use always LP->STATUS afterwards.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index a659afa..b894d84 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -3367,6 +3367,9 @@ retry:
lp = linux_nat_filter_event (lwpid, status, options);
+ /* STATUS is now no longer valid, use LP->STATUS instead. */
+ status = 0;
+
if (lp
&& ptid_is_pid (ptid)
&& ptid_get_pid (lp->ptid) != ptid_get_pid (ptid))
@@ -3375,7 +3378,7 @@ retry:
if (debug_linux_nat)
fprintf (stderr, "LWP %ld got an event %06x, leaving pending.\n",
- ptid_get_lwp (lp->ptid), status);
+ ptid_get_lwp (lp->ptid), lp->status);
if (WIFSTOPPED (lp->status))
{
@@ -3412,7 +3415,7 @@ retry:
lp->signalled = 0;
}
}
- else if (WIFEXITED (status) || WIFSIGNALED (status))
+ else if (WIFEXITED (lp->status) || WIFSIGNALED (lp->status))
{
if (debug_linux_nat)
fprintf (stderr, "Process %ld exited while stopping LWPs\n",