From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21651 invoked by alias); 15 Apr 2002 03:08:22 -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 21643 invoked from network); 15 Apr 2002 03:08:19 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 15 Apr 2002 03:08:19 -0000 Received: from localhost.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id UAA11538; Sun, 14 Apr 2002 20:08:16 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 49AB411436; Sun, 14 Apr 2002 23:07:56 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15546.17420.23479.131133@localhost.redhat.com> Date: Sun, 14 Apr 2002 20:08:00 -0000 To: Daniel Jacobowitz , cagney@redhat.com Cc: gdb@sources.redhat.com Subject: Re: When isn't there a selected frame? In-Reply-To: <20020414221403.A26166@nevyn.them.org> References: <3CBA3543.4010601@cygnus.com> <20020414221403.A26166@nevyn.them.org> X-SW-Source: 2002-04/txt/msg00249.txt.bz2 Daniel Jacobowitz writes: > On Sun, Apr 14, 2002 at 10:04:51PM -0400, Andrew Cagney wrote: > > Hello, > > > > Random bits of GDB contain code snipits like: > > > > if (selected_frame) > > .. > > else > > error ("No selected frame"); > > > > Is there any time when it doesn't make sense to have a selected frame > > (except, say when current_frame() is also NULL)? > > Perhaps to handle when the target is not running? I am pretty sure > I've reached a couple of those messages. > Yes, so it seems. What about connecting to a remote target? Do you get a frame selected right away? How about attach? detach? Hmm, I just tried with a sim and a native attach, and current_frame and selected_frame seem to be in sync, i.e, not null at the same time. BTW, I always got a bit confused by the 'No stack' vs. 'No selected frame' message. I know that No stack has to do with the capabilities of the target as opposed at what your inferior program is doing right now, but as a *user* I find it a bit confusing. And don't forget the variations on the theme: "No frame selected" "No selected stack frame" "no frame selected" Should we stick with just one message? Elena > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer