This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix crash on "quit" + TUI + remote + async


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 (&current_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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]