From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20325 invoked by alias); 17 Oct 2003 17:59:08 -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 20314 invoked from network); 17 Oct 2003 17:59:07 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.0.121) by sources.redhat.com with SMTP; 17 Oct 2003 17:59:07 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 774D22B89; Fri, 17 Oct 2003 13:59:06 -0400 (EDT) Message-ID: <3F902DEA.3060100@redhat.com> Date: Fri, 17 Oct 2003 17:59:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: Should push_target pop all targets? References: <3F8DCD32.4070009@redhat.com> <20031015230525.GA23956@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00215.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. On GNU/Linux, attach breaks (yet the exact same test passes on BSD ...) Andrew