This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix crash on "quit" + TUI + remote + async
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 14 Aug 2008 13:51:54 -0400
- Subject: Re: Fix crash on "quit" + TUI + remote + async
- References: <200807281633.41104.pedro@codesourcery.com>
On Mon, Jul 28, 2008 at 04:33:40PM +0100, Pedro Alves wrote:
> Index: src/gdb/top.c
> ===================================================================
> --- src.orig/gdb/top.c 2008-07-28 16:24:06.000000000 +0100
> +++ src/gdb/top.c 2008-07-28 16:30:48.000000000 +0100
> @@ -1229,8 +1229,9 @@ quit_target (void *arg)
> target_kill ();
> }
>
> - /* UDI wants this, to kill the TIP. */
> - target_close (¤t_target, 1);
> + /* Give all pushed targets a chance to do minimal cleanup, and pop
> + them all out. */
> + pop_all_targets (1);
>
> /* Save the history information if it is appropriate to do so. */
> if (write_history_p && history_filename)
This patch is OK. I'm just wondering, though, if you really want to
pop all the way down to exec_stratum; isn't that useless? It depends
where else you want pop_all_targets, probably.
--
Daniel Jacobowitz
CodeSourcery