From: Daniel Jacobowitz Date: Tue, 23 Mar 2004 21:14:24 +0000 (+0000) Subject: * linux-low.c (linux_wait): Clear all_processes list also. X-Git-Tag: gprof-pre-ansify-2004-05-26~737 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=075b3282ba3c3dcfa12aab9af37537111dd66393;p=platform%2Fupstream%2Fbinutils.git * linux-low.c (linux_wait): Clear all_processes list also. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index e718fa6..3168606 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2004-03-23 Daniel Jacobowitz + + * linux-low.c (linux_wait): Clear all_processes list also. + 2004-03-12 Daniel Jacobowitz * linux-low.c: Include . Remove extern declaration of diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index a3d6a54..5733180 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)); } }