When isn't there a selected frame?

Andrew Cagney ac131313@cygnus.com
Sun Apr 14 19:04:00 GMT 2002


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



More information about the Gdb mailing list