When isn't there a selected frame?
Elena Zannoni
ezannoni@redhat.com
Sun Apr 14 20:08:00 GMT 2002
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
More information about the Gdb
mailing list