This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: When isn't there a selected frame?
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>, cagney at redhat dot com
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 14 Apr 2002 23:07:56 -0400
- Subject: Re: When isn't there a selected frame?
- References: <3CBA3543.4010601@cygnus.com><20020414221403.A26166@nevyn.them.org>
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