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."));
/* 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. */
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;
}
/* 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;
}
}
&& regnum < NUM_REGS + NUM_PSEUDO_REGS)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
- deprecated_selected_frame, regnum, fpregs);
+ frame, regnum, fpregs);
continue;
}
}
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;
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
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);
}
\f
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
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);
}
\f
static void