2004-10-29 Andrew Cagney <cagney@gnu.org>

* frame.h (get_selected_frame): Add message parameter.
	* frame.c (get_selected_frame): Add and use message parameter.
	* stack.c (current_frame_command, return_command, locals_info)
	(catch_info, args_info, up_silently_base, down_silently_base): Use
	get_selected_frame with an explicit message.
	* thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update.
	* remote-rdp.c, remote-mips.c, remote-e7000.c: Update.
	* ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update.
	* infrun.c, inflow.c, infcmd.c, frame.c: Update.
	* findvar.c, eval.c, corelow.c, bsd-kvm.c: Update.
	* breakpoint.c: Update.
This commit is contained in:
Andrew Cagney
2004-10-29 20:23:17 +00:00
parent 00b25ff323
commit b04f3ab417
21 changed files with 70 additions and 66 deletions

View File

@@ -822,13 +822,19 @@ struct frame_info *deprecated_selected_frame;
thrown. */
struct frame_info *
get_selected_frame (void)
get_selected_frame (const char *message)
{
if (deprecated_selected_frame == NULL)
/* Hey! Don't trust this. It should really be re-finding the
last selected frame of the currently selected thread. This,
though, is better than nothing. */
select_frame (get_current_frame ());
{
if (message != NULL && (!target_has_registers
|| !target_has_stack
|| !target_has_memory))
error ("%s", message);
/* Hey! Don't trust this. It should really be re-finding the
last selected frame of the currently selected thread. This,
though, is better than nothing. */
select_frame (get_current_frame ());
}
/* There is always a frame. */
gdb_assert (deprecated_selected_frame != NULL);
return deprecated_selected_frame;
@@ -843,7 +849,7 @@ deprecated_safe_get_selected_frame (void)
{
if (!target_has_registers || !target_has_stack || !target_has_memory)
return NULL;
return get_selected_frame ();
return get_selected_frame (NULL);
}
/* Select frame FI (or NULL - to invalidate the current frame). */