* frame.c (deprecated_selected_frame): Rename to...

(selected_frame): ...this.  Make static.
	(get_selected_frame, select_frame): Update.
	* frame.h (deprected_select_frame): Delete.
	(deprecated_safe_get_selected_frame): Update comments.

	* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
	infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
	tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
	parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
	tui/tui.c: Replace references to deprecated_selected_frame.
This commit is contained in:
Daniel Jacobowitz
2007-02-27 19:46:04 +00:00
parent e1c9b6f16a
commit 206415a3ea
23 changed files with 106 additions and 130 deletions

View File

@@ -1295,10 +1295,8 @@ finish_command (char *arg, int from_tty)
error (_("The \"finish\" command does not take any arguments."));
if (!target_has_execution)
error (_("The program is not running."));
if (deprecated_selected_frame == NULL)
error (_("No selected frame."));
frame = get_prev_frame (deprecated_selected_frame);
frame = get_prev_frame (get_selected_frame (_("No selected frame.")));
if (frame == 0)
error (_("\"finish\" not meaningful in the outermost frame."));
@@ -1316,7 +1314,7 @@ finish_command (char *arg, int from_tty)
/* Find the function we will return from. */
function = find_pc_function (get_frame_pc (deprecated_selected_frame));
function = find_pc_function (get_frame_pc (get_selected_frame (NULL)));
/* Print info on the selected frame, including level number but not
source. */
@@ -1677,18 +1675,18 @@ default_print_registers_info (struct gdbarch *gdbarch,
void
registers_info (char *addr_exp, int fpregs)
{
struct frame_info *frame;
int regnum, numregs;
char *end;
if (!target_has_registers)
error (_("The program has no registers now."));
if (deprecated_selected_frame == NULL)
error (_("No selected frame."));
frame = get_selected_frame (NULL);
if (!addr_exp)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
deprecated_selected_frame, -1, fpregs);
frame, -1, fpregs);
return;
}
@@ -1721,12 +1719,12 @@ registers_info (char *addr_exp, int fpregs)
/* A register name? */
{
int regnum = frame_map_name_to_regnum (deprecated_selected_frame,
int regnum = frame_map_name_to_regnum (frame,
start, end - start);
if (regnum >= 0)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
deprecated_selected_frame, regnum, fpregs);
frame, regnum, fpregs);
continue;
}
}
@@ -1740,7 +1738,7 @@ registers_info (char *addr_exp, int fpregs)
&& regnum < NUM_REGS + NUM_PSEUDO_REGS)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
deprecated_selected_frame, regnum, fpregs);
frame, regnum, fpregs);
continue;
}
}
@@ -1766,7 +1764,7 @@ registers_info (char *addr_exp, int fpregs)
if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
group))
gdbarch_print_registers_info (current_gdbarch,
gdb_stdout, deprecated_selected_frame,
gdb_stdout, frame,
regnum, fpregs);
}
continue;
@@ -1794,11 +1792,6 @@ static void
print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
if (!target_has_registers)
error (_("The program has no registers now."));
if (deprecated_selected_frame == NULL)
error (_("No selected frame."));
if (gdbarch_print_vector_info_p (gdbarch))
gdbarch_print_vector_info (gdbarch, file, frame, args);
else
@@ -1822,7 +1815,11 @@ print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
static void
vector_info (char *args, int from_tty)
{
print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
if (!target_has_registers)
error (_("The program has no registers now."));
print_vector_info (current_gdbarch, gdb_stdout,
get_selected_frame (NULL), args);
}
@@ -2012,11 +2009,6 @@ static void
print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
if (!target_has_registers)
error (_("The program has no registers now."));
if (deprecated_selected_frame == NULL)
error (_("No selected frame."));
if (gdbarch_print_float_info_p (gdbarch))
gdbarch_print_float_info (gdbarch, file, frame, args);
else
@@ -2041,8 +2033,11 @@ No floating-point info available for this processor.\n");
static void
float_info (char *args, int from_tty)
{
if (!target_has_registers)
error (_("The program has no registers now."));
print_float_info (current_gdbarch, gdb_stdout,
deprecated_selected_frame, args);
get_selected_frame (NULL), args);
}
static void