When isn't there a selected frame?

Andrew Cagney
2002-04-15T02:04:57Z

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