summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-03-23 21:14:24 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-03-23 21:14:24 +0000
commit3535becf990dbe8646e49958f7f992f71ec32c07 (patch)
treec823a398c8c842967f6e1073bb655bc14705eca3 /gdb/gdbserver
parent401682baeb9652acc592c7d6858c5f35557ea4c9 (diff)
downloadgdb-3535becf990dbe8646e49958f7f992f71ec32c07.tar.gz
* linux-low.c (linux_wait): Clear all_processes list also.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/linux-low.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index e718fa65e61..3168606c938 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-23 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c (linux_wait): Clear all_processes list also.
+
2004-03-12 Daniel Jacobowitz <drow@mvista.com>
* linux-low.c: Include <errno.h>. Remove extern declaration of
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index a3d6a54d9cf..5733180e997 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -685,13 +685,17 @@ retry:
fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
*status = 'W';
clear_inferiors ();
+ free (all_processes.head);
+ all_processes.head = all_processes.tail = NULL;
return ((unsigned char) WEXITSTATUS (w));
}
else if (!WIFSTOPPED (w))
{
fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- clear_inferiors ();
*status = 'X';
+ clear_inferiors ();
+ free (all_processes.head);
+ all_processes.head = all_processes.tail = NULL;
return ((unsigned char) WTERMSIG (w));
}
}