This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
When isn't there a selected frame?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb at sources dot redhat dot com
- Date: Sun, 14 Apr 2002 22:04:51 -0400
- Subject: When isn't there a selected frame?
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)?
I think the next step on the cache per thread frames is to replace
selected_frame with:
get_selected_frame ()
if (selected_frame)
return selected_frame;
else
return get_current_frame ()
so that selected frame is created on demand.
Andrew