aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-07-18 21:21:53 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-07-18 21:21:53 +0000
commit78768c4ae49a57dcd7c79d0bbac450a8efce7623 (patch)
tree0c5ce2a3a550eb364f2128ac7ddaf9beb9e84418
parent1d14850fc0117b88bf9d648d0e1b16e95310185a (diff)
downloadgdb-78768c4ae49a57dcd7c79d0bbac450a8efce7623.zip
gdb-78768c4ae49a57dcd7c79d0bbac450a8efce7623.tar.gz
gdb-78768c4ae49a57dcd7c79d0bbac450a8efce7623.tar.bz2
gdb/
* linux-nat.c (linux_handle_extended_wait): Move variable new_lp into a more inner block. Remove its unused declaration initializer.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/linux-nat.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5472aa9..f93e6ba 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * linux-nat.c (linux_handle_extended_wait): Move variable new_lp into
+ a more inner block. Remove its unused declaration initializer.
+
2010-07-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
* NEWS: Mention support for the new ptrace interface and hardware
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 93adfcd..a659afa 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2149,7 +2149,6 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
{
int pid = GET_LWP (lp->ptid);
struct target_waitstatus *ourstatus = &lp->waitstatus;
- struct lwp_info *new_lp = NULL;
int event = status >> 16;
if (event == PTRACE_EVENT_FORK || event == PTRACE_EVENT_VFORK
@@ -2213,7 +2212,10 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
ourstatus->kind = TARGET_WAITKIND_VFORKED;
else
{
+ struct lwp_info *new_lp;
+
ourstatus->kind = TARGET_WAITKIND_IGNORE;
+
new_lp = add_lwp (BUILD_LWP (new_pid, GET_PID (lp->ptid)));
new_lp->cloned = 1;
new_lp->stopped = 1;