From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4611 invoked by alias); 15 Oct 2003 23:05:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4604 invoked from network); 15 Oct 2003 23:05:26 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 15 Oct 2003 23:05:26 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1A9uhp-0006e7-W2 for ; Wed, 15 Oct 2003 19:05:25 -0400 Date: Wed, 15 Oct 2003 23:05:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Should push_target pop all targets? Message-ID: <20031015230525.GA23956@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <3F8DCD32.4070009@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F8DCD32.4070009@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00207.txt.bz2 On Wed, Oct 15, 2003 at 06:41:54PM -0400, Andrew Cagney wrote: > Hello, > > The current push_target code: > > > /* Find the proper stratum to install this target in. */ > > > > for (prev = NULL, cur = target_stack; cur; prev = cur, cur = cur->next) > > { > > if ((int) (t->to_stratum) >= (int) (cur->target_ops->to_stratum)) > > break; > > } > > > > /* If there's already targets at this stratum, remove them. */ > > only pops targets at the stratum level being pushed. Doing this - > changing the target underneath ones feet - just scares me. > > I think this should be changed so that all targets above that one get > poped. If they are still needed, they can be re-pushed. > > I suspect this will affect core-file and thread targets ... This definitely makes sense to me. I suspect a lot of the uses of push/pop target will need some examining, though, based on my last wander through that code. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer