+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (selected_frame, select_frame): Move from here ...
+ * frame.c (selected_frame, select_frame): ... to here. Include
+ "language.h".
+ * Makefile.in (frame.o): Update dependencies.
+ * frame.c (get_selected_frame): New function.
+ * frame.h (get_selected_frame): Declare.
+ (deprecated_selected_frame): Rename selected_frame.
+ * ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
+ * eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
+ * h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
+ * inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
+ * mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
+ * remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
+ * stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
+ * z8k-tdep.c, cli/cli-cmds.c: Update.
+
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* frame.h (get_selected_block): Add comments.
$(terminal_h) $(gdbthread_h) $(command_h)
# OBSOLETE fr30-tdep.o: fr30-tdep.c
frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h) $(gdb_obstack_h) $(dummy_frame_h) \
- $(gdbcore_h) $(annotate_h)
+ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(builtin_regs_h) \
+ $(gdb_obstack_h) $(dummy_frame_h) $(gdbcore_h) $(annotate_h) \
+ $(language_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
-(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
}
- frame = selected_frame;
+ frame = deprecated_selected_frame;
while (frame != NULL && ndefns == 0)
{
struct block *block;
STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
continue;
#endif
- selected_frame = fi;
+ deprecated_selected_frame = fi;
break;
}
}
{
/* FIXME: find_printable_frame should be defined in frame.h, and
implemented in ada-lang.c */
- /* find_printable_frame (selected_frame, frame_relative_level (selected_frame)); */
+ /* find_printable_frame (deprecated_selected_frame, frame_relative_level (deprecated_selected_frame)); */
printf_filtered ("[Switching to task %d]\n", num);
- print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
else
printf_filtered ("Unable to switch to task %d\n", num);
/* Save the current frame and level so we can restore it after
evaluating the watchpoint expression on its own frame. */
- saved_frame = selected_frame;
- saved_level = frame_relative_level (selected_frame);
+ saved_frame = deprecated_selected_frame;
+ saved_level = frame_relative_level (deprecated_selected_frame);
/* Determine if the watchpoint is within scope. */
if (b->exp_valid_block == NULL)
}
/* Restore the frame and level. */
- if ((saved_frame != selected_frame) ||
- (saved_level != frame_relative_level (selected_frame)))
+ if ((saved_frame != deprecated_selected_frame) ||
+ (saved_level != frame_relative_level (deprecated_selected_frame)))
select_frame (saved_frame);
if (val)
if (default_breakpoint_valid)
{
- if (selected_frame)
+ if (deprecated_selected_frame)
{
- selected_pc = selected_frame->pc;
+ selected_pc = deprecated_selected_frame->pc;
if (arg)
if_arg = 1;
}
{
if (default_breakpoint_valid)
{
- if (selected_frame)
+ if (deprecated_selected_frame)
{
addr_string = (char *) xmalloc (15);
- sprintf (addr_string, "*0x%s", paddr_nz (selected_frame->pc));
+ sprintf (addr_string, "*0x%s", paddr_nz (deprecated_selected_frame->pc));
if (arg)
if_arg = 1;
}
{
struct symtabs_and_lines sals;
struct symtab_and_line sal;
- struct frame_info *prev_frame = get_prev_frame (selected_frame);
+ struct frame_info *prev_frame = get_prev_frame (deprecated_selected_frame);
struct breakpoint *breakpoint;
struct cleanup *old_chain;
struct continuation_arg *arg1;
resolve_sal_pc (&sal);
- breakpoint = set_momentary_breakpoint (sal, selected_frame, bp_until);
+ breakpoint = set_momentary_breakpoint (sal, deprecated_selected_frame, bp_until);
if (!event_loop_p || !target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
/* Not sure whether an error message is always the correct response,
but it's better than a core dump. */
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
- block = get_frame_block (selected_frame, 0);
- pc = selected_frame->pc;
+ block = get_frame_block (deprecated_selected_frame, 0);
+ pc = deprecated_selected_frame->pc;
sals.nelts = 0;
sals.sals = NULL;
return;
}
- save_selected_frame = selected_frame;
- save_selected_frame_level = frame_relative_level (selected_frame);
+ save_selected_frame = deprecated_selected_frame;
+ save_selected_frame_level = frame_relative_level (deprecated_selected_frame);
select_frame (fr);
}
name = NULL;
if (!arg)
{
- if (!selected_frame)
+ if (!deprecated_selected_frame)
error ("No frame selected.\n");
- pc = get_frame_pc (selected_frame);
+ pc = get_frame_pc (deprecated_selected_frame);
if (find_pc_partial_function (pc, &name, &low, &high) == 0)
error ("No function contains program counter for selected frame.\n");
#if defined(TUI)
/* Now, set up the frame cache, and print the top of stack. */
flush_cached_frames ();
select_frame (get_current_frame ());
- print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
else
{
case OP_REGISTER:
{
int regno = longest_to_int (exp->elts[pc + 1].longconst);
- struct value *val = value_of_register (regno, selected_frame);
+ struct value *val = value_of_register (regno, deprecated_selected_frame);
(*pos) += 2;
if (val == NULL)
error ("Value of register %s not available.",
switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
{
case BOUND_BY_VALUE_ON_STACK:
- current_frame_addr = selected_frame->frame;
+ current_frame_addr = deprecated_selected_frame->frame;
if (current_frame_addr > 0)
{
*lower_bound =
break;
case BOUND_BY_REF_ON_STACK:
- current_frame_addr = selected_frame->frame;
+ current_frame_addr = deprecated_selected_frame->frame;
if (current_frame_addr > 0)
{
ptr_to_lower_bound =
switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
{
case BOUND_BY_VALUE_ON_STACK:
- current_frame_addr = selected_frame->frame;
+ current_frame_addr = deprecated_selected_frame->frame;
if (current_frame_addr > 0)
{
*upper_bound =
break;
case BOUND_BY_REF_ON_STACK:
- current_frame_addr = selected_frame->frame;
+ current_frame_addr = deprecated_selected_frame->frame;
if (current_frame_addr > 0)
{
ptr_to_upper_bound =
first make sure that it is visible and if so, let
us display its contents */
- fi = selected_frame;
+ fi = deprecated_selected_frame;
if (fi == NULL)
error ("No frame selected");
if (comname == NULL)
error ("Cannot deal with NULL common name!");
- fi = selected_frame;
+ fi = deprecated_selected_frame;
if (fi == NULL)
error ("No frame selected");
/* Builtin registers lie completly outside of the range of normal
registers. Catch them early so that the target never sees them. */
if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
- return value_of_builtin_reg (regnum, selected_frame);
+ return value_of_builtin_reg (regnum, deprecated_selected_frame);
get_saved_register (raw_buffer, &optim, &addr,
frame, regnum, &lval);
and a stack frame id, read the value of the variable
and return a (pointer to a) struct value containing the value.
If the variable cannot be found, return a zero pointer.
- If FRAME is NULL, use the selected_frame. */
+ If FRAME is NULL, use the deprecated_selected_frame. */
struct value *
read_var_value (register struct symbol *var, struct frame_info *frame)
len = TYPE_LENGTH (type);
if (frame == NULL)
- frame = selected_frame;
+ frame = deprecated_selected_frame;
switch (SYMBOL_CLASS (var))
{
#include "dummy-frame.h"
#include "gdbcore.h"
#include "annotate.h"
+#include "language.h"
/* Return a frame uniq ID that can be used to, later re-find the
frame. */
current_frame = frame;
}
+/* The "selected" stack frame is used by default for local and arg
+ access. May be zero, for no selected frame. */
+
+struct frame_info *deprecated_selected_frame;
+
+/* Return the selected frame. Always non-null (unless there isn't an
+ inferior sufficient for creating a frame) in which case an error is
+ thrown. */
+
+struct frame_info *
+get_selected_frame (void)
+{
+ 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 ());
+ /* There is always a frame. */
+ gdb_assert (deprecated_selected_frame != NULL);
+ return deprecated_selected_frame;
+}
+
+/* Select frame FI (or NULL - to invalidate the current frame). */
+
+void
+select_frame (struct frame_info *fi)
+{
+ register struct symtab *s;
+
+ deprecated_selected_frame = fi;
+ /* NOTE: cagney/2002-05-04: FI can be NULL. This occures when the
+ frame is being invalidated. */
+ if (selected_frame_level_changed_hook)
+ selected_frame_level_changed_hook (frame_relative_level (fi));
+
+ /* FIXME: kseitz/2002-08-28: It would be nice to call
+ selected_frame_level_changed_event right here, but due to limitations
+ in the current interfaces, we would end up flooding UIs with events
+ because select_frame is used extensively internally.
+
+ Once we have frame-parameterized frame (and frame-related) commands,
+ the event notification can be moved here, since this function will only
+ be called when the users selected frame is being changed. */
+
+ /* Ensure that symbols for this frame are read in. Also, determine the
+ source language of this frame, and switch to it if desired. */
+ if (fi)
+ {
+ s = find_pc_symtab (fi->pc);
+ if (s
+ && s->language != current_language->la_language
+ && s->language != language_unknown
+ && language_mode == language_mode_auto)
+ {
+ set_language (s->language);
+ }
+ }
+}
+
/* Return the register saved in the simplistic ``saved_regs'' cache.
If the value isn't here AND a value is needed, try the next inner
most frame. */
flush_cached_frames() and reinit_frame_cache() is that the latter
explicitly sets the selected frame back to the current frame there
isn't any real difference (except that one delays the selection of
- a new frame). There should instead be a get_selected_frame()
- method that reinit's the frame cache on-demand. As for
- invalidating the cache, there should be two methods one that
- reverts the thread's selected frame back to current frame (for when
- the inferior resumes) and one that does not (for when the user
- modifies the target invalidating the frame cache). */
+ a new frame). Code can instead simply rely on get_selected_frame()
+ to reinit's the selected frame as needed. As for invalidating the
+ cache, there should be two methods one that reverts the thread's
+ selected frame back to current frame (for when the inferior
+ resumes) and one that does not (for when the user modifies the
+ target invalidating the frame cache). */
extern void flush_cached_frames (void);
extern void reinit_frame_cache (void);
+/* On demand, create the selected frame and then return it. If the
+ selected frame can not be created, this function throws an error. */
+/* FIXME: cagney/2002-11-28: At present, when there is no selected
+ frame, this function always returns the current (inner most) frame.
+ It should instead, when a thread has previously had its frame
+ selected (but not resumed) and the frame cache invalidated, find
+ and then return that thread's previously selected frame. */
+extern struct frame_info *get_selected_frame (void);
+
/* Select a specific frame. NULL, apparently implies re-select the
inner most frame. */
extern void select_frame (struct frame_info *);
The relevant code needs to be audited to determine if it is
possible (or pratical) to instead pass the applicable frame in as a
parameter. For instance, DEPRECATED_DO_REGISTERS_INFO() relied on
- the selected_frame global, but its replacement,
+ the deprecated_selected_frame global, while its replacement,
PRINT_REGISTERS_INFO(), is parameterized with the selected frame.
The only real exceptions occure at the edge (in the CLI code) where
user commands need to pick up the selected frame before proceeding.
This is important. GDB is trying to stamp out the hack:
- saved_frame = selected_frame;
- selected_frame = ...;
+ saved_frame = deprecated_selected_frame;
+ deprecated_selected_frame = ...;
hack_using_global_selected_frame ();
- selected_frame = saved_frame;
+ deprecated_selected_frame = saved_frame;
Take care! */
-extern struct frame_info *selected_frame;
+extern struct frame_info *deprecated_selected_frame;
/* NOTE: cagney/2002-11-28:
int C, Z, N, V;
unsigned char b[h8300h_reg_size];
unsigned char l;
- frame_register_read (selected_frame, regno, b);
+ frame_register_read (deprecated_selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_CCR_REGNUM) - 1];
fprintf_filtered (file, "\t");
fprintf_filtered (file, "I-%d ", (l & 0x80) != 0);
/* EXR register */
unsigned char b[h8300h_reg_size];
unsigned char l;
- frame_register_read (selected_frame, regno, b);
+ frame_register_read (deprecated_selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_EXR_REGNUM) - 1];
fprintf_filtered (file, "\t");
fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0);
unsigned char b[2];
unsigned char l;
- frame_register_read (selected_frame, regno, b);
+ frame_register_read (deprecated_selected_frame, regno, b);
l = b[1];
printf_unfiltered ("\t");
printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
void
h8500_do_registers_info (int regnum, int all)
{
- h8500_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ h8500_print_registers_info (current_gdbarch, gdb_stdout, deprecated_selected_frame,
regnum, all);
}
break;
}
- get_saved_register (regbuf, NULL, NULL, selected_frame, page_regnum, NULL);
+ get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, page_regnum, NULL);
regval = regbuf[0] << 16;
- get_saved_register (regbuf, NULL, NULL, selected_frame, regnum, NULL);
+ get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, regnum, NULL);
regval |= regbuf[0] << 8 | regbuf[1]; /* XXX host/target byte order */
xfree (var->value); /* Free up old value */
/* Make a copy of gdb's save area (may cause actual
reads from the target). */
for (i = 0; i < NUM_REGS; i++)
- frame_register_read (selected_frame, i, raw_regs + REGISTER_BYTE (i));
+ frame_register_read (deprecated_selected_frame, i, raw_regs + REGISTER_BYTE (i));
if (regnum == -1)
pa_print_registers (raw_regs, regnum, fpregs);
/* Make a copy of gdb's save area (may cause actual
reads from the target). */
for (i = 0; i < NUM_REGS; i++)
- frame_register_read (selected_frame, i, raw_regs + REGISTER_BYTE (i));
+ frame_register_read (deprecated_selected_frame, i, raw_regs + REGISTER_BYTE (i));
if (regnum == -1)
pa_strcat_registers (raw_regs, regnum, fpregs, stream);
char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
/* Get 32bits of data. */
- frame_register_read (selected_frame, i, raw_buffer);
+ frame_register_read (deprecated_selected_frame, i, raw_buffer);
/* Put it in the buffer. No conversions are ever necessary. */
memcpy (virtual_buffer, raw_buffer, REGISTER_RAW_SIZE (i));
if ((i % 2) == 0)
{
/* Get the data in raw format for the 2nd half. */
- frame_register_read (selected_frame, i + 1, raw_buffer);
+ frame_register_read (deprecated_selected_frame, i + 1, raw_buffer);
/* Copy it into the appropriate part of the virtual buffer. */
memcpy (virtual_buffer + REGISTER_RAW_SIZE (i), raw_buffer,
print_spaces_filtered (8 - strlen (REGISTER_NAME (i)), stream);
/* Get 32bits of data. */
- frame_register_read (selected_frame, i, raw_buffer);
+ frame_register_read (deprecated_selected_frame, i, raw_buffer);
/* Put it in the buffer. No conversions are ever necessary. */
memcpy (virtual_buffer, raw_buffer, REGISTER_RAW_SIZE (i));
char raw_buf[MAX_REGISTER_RAW_SIZE];
/* Get the data in raw format for the 2nd half. */
- frame_register_read (selected_frame, i + 1, raw_buf);
+ frame_register_read (deprecated_selected_frame, i + 1, raw_buf);
/* Copy it into the appropriate part of the virtual buffer. */
memcpy (virtual_buffer + REGISTER_RAW_SIZE (i), raw_buf, REGISTER_RAW_SIZE (i));
error ("The \"finish\" command does not take any arguments.");
if (!target_has_execution)
error ("The program is not running.");
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
- frame = get_prev_frame (selected_frame);
+ frame = get_prev_frame (deprecated_selected_frame);
if (frame == 0)
error ("\"finish\" not meaningful in the outermost frame.");
/* Find the function we will return from. */
- function = find_pc_function (selected_frame->pc);
+ function = find_pc_function (deprecated_selected_frame->pc);
/* Print info on the selected frame, including level number
but not source. */
if (from_tty)
{
printf_filtered ("Run till exit from ");
- print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 0);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 0);
}
/* If running asynchronously and the target support asynchronous
if (!target_has_registers)
error ("The program has no registers now.");
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
if (!addr_exp)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
- selected_frame, -1, fpregs);
+ deprecated_selected_frame, -1, fpregs);
return;
}
if (regnum >= 0)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
- selected_frame, regnum, fpregs);
+ deprecated_selected_frame, regnum, fpregs);
continue;
}
}
&& regnum < NUM_REGS + NUM_PSEUDO_REGS)
{
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
- selected_frame, regnum, fpregs);
+ deprecated_selected_frame, regnum, fpregs);
continue;
}
}
if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
(*group)))
gdbarch_print_registers_info (current_gdbarch,
- gdb_stdout, selected_frame,
+ gdb_stdout, deprecated_selected_frame,
regnum, fpregs);
}
continue;
{
if (!target_has_registers)
error ("The program has no registers now.");
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
if (gdbarch_print_vector_info_p (gdbarch))
static void
vector_info (char *args, int from_tty)
{
- print_vector_info (current_gdbarch, gdb_stdout, selected_frame, args);
+ print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
}
\f
{
if (!target_has_registers)
error ("The program has no registers now.");
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
if (gdbarch_print_float_info_p (gdbarch))
static void
float_info (char *args, int from_tty)
{
- print_float_info (current_gdbarch, gdb_stdout, selected_frame, args);
+ print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
}
\f
/* ARGSUSED */
if (target_has_stack)
{
printf_filtered ("In %s,\n", target_longname);
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
fputs_filtered ("No selected stack frame.\n", gdb_stdout);
else
- print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
}
\f
bpstat_print() contains the logic deciding in detail
what to print, based on the event(s) that just occurred. */
- if (stop_print_frame && selected_frame)
+ if (stop_print_frame && deprecated_selected_frame)
{
int bpstat_ret;
int source_flag;
LOCATION: Print only location
SRC_AND_LOC: Print location and source line */
if (do_frame_printing)
- show_and_print_stack_frame (selected_frame, -1, source_flag);
+ show_and_print_stack_frame (deprecated_selected_frame, -1, source_flag);
/* Display the auto-display expressions. */
do_displays ();
inf_status->registers = regcache_dup (current_regcache);
- get_frame_id (selected_frame, &inf_status->selected_frame_id);
+ get_frame_id (deprecated_selected_frame, &inf_status->selected_frame_id);
return inf_status;
}
struct macro_scope *ms;
/* If there's a selected frame, use its PC. */
- if (selected_frame)
- sal = find_pc_line (selected_frame->pc, 0);
+ if (deprecated_selected_frame)
+ sal = find_pc_line (deprecated_selected_frame->pc, 0);
/* If the target has any registers at all, then use its PC. Why we
would have registers but no stack, I'm not sure. */
+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
+ deprecated_selected_frame.
+
2002-11-13 Andrew Cagney <ac131313@redhat.com>
* mi-main.c (mi_cmd_data_write_register_values): Use
if (argc != 1)
error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES");
- list_args_or_locals (1, atoi (argv[0]), selected_frame);
+ list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame);
return MI_CMD_DONE;
}
/* Because we have called return_command with from_tty = 0, we need
to print the frame here. */
- show_and_print_stack_frame (selected_frame,
- frame_relative_level (selected_frame),
+ show_and_print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame),
LOC_AND_ADDRESS);
return MI_CMD_DONE;
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
- if (! frame_register_read (selected_frame, regnum, raw_buffer))
+ if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
return -1;
if (memcmp (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
if (format == 'N')
format = 0;
- get_saved_register (raw_buffer, &optim, (CORE_ADDR *) NULL, selected_frame,
+ get_saved_register (raw_buffer, &optim, (CORE_ADDR *) NULL,
+ deprecated_selected_frame,
regnum, (enum lval_type *) NULL);
if (optim)
{
int raw_size = REGISTER_RAW_SIZE (regno);
char *raw_buffer = alloca (raw_size);
- if (!frame_register_read (selected_frame, regno, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regno, raw_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
if (raw_size == 8)
{
{
/* We have a 64-bit value for this register, and we should use
all 64 bits. */
- if (!frame_register_read (selected_frame, regno, rare_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regno, rare_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
}
else
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
/* Get the data in raw format. */
- if (!frame_register_read (selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
{
printf_filtered ("%s: [Invalid]", REGISTER_NAME (regnum));
return;
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
break; /* end row: reached FP register */
/* OK: get the data in raw format. */
- if (!frame_register_read (selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++)
printf_filtered ("%s: ", name);
/* Get the data */
- if (!frame_register_read (selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
{
printf_filtered ("[invalid]");
return;
stop_pc = read_pc ();
set_current_frame (create_new_frame (read_fp (), stop_pc));
select_frame (get_current_frame ());
- print_stack_frame (selected_frame, -1, 1);
+ print_stack_frame (deprecated_selected_frame, -1, 1);
buf[0] = OCD_LOG_FILE;
buf[1] = 3; /* close existing WIGGLERS.LOG */
simple substitution is required when updating the code. The
change, as far as practical, should avoid adding references to
global variables (e.g., current_regcache, current_frame,
- current_gdbarch or selected_frame) and instead refer to the FRAME
- or REGCACHE that has been passed into the containing function as
- parameters. Consequently, the change typically involves modifying
- the containing function so that it takes a FRAME or REGCACHE
- parameter. In the case of an architecture vector method, there
- should already be a non-deprecated variant that is parameterized
- with FRAME or REGCACHE. */
+ current_gdbarch or deprecated_selected_frame) and instead refer to
+ the FRAME or REGCACHE that has been passed into the containing
+ function as parameters. Consequently, the change typically
+ involves modifying the containing function so that it takes a FRAME
+ or REGCACHE parameter. In the case of an architecture vector
+ method, there should already be a non-deprecated variant that is
+ parameterized with FRAME or REGCACHE. */
extern char *deprecated_grub_regcache_for_registers (struct regcache *);
extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
stop_pc = read_pc ();
set_current_frame (create_new_frame (read_fp (), stop_pc));
select_frame (get_current_frame ());
- print_stack_frame (selected_frame, -1, 1);
+ print_stack_frame (deprecated_selected_frame, -1, 1);
return 1;
}
stop_pc = read_pc ();
set_current_frame (create_new_frame (read_fp (), stop_pc));
select_frame (get_current_frame ());
- print_stack_frame (selected_frame, -1, 1);
+ print_stack_frame (deprecated_selected_frame, -1, 1);
xfree (serial_port_name);
}
stop_pc = read_pc ();
set_current_frame (create_new_frame (read_fp (), stop_pc));
select_frame (get_current_frame ());
- print_stack_frame (selected_frame, -1, 1);
+ print_stack_frame (deprecated_selected_frame, -1, 1);
}
static void
sh64_show_regs (void)
{
- if (pc_is_isa32 (selected_frame->pc))
+ if (pc_is_isa32 (deprecated_selected_frame->pc))
sh64_show_media_regs ();
else
sh64_show_compact_regs ();
raw_buffer = (char *) alloca (REGISTER_RAW_SIZE (FP0_REGNUM));
/* Get the data in raw format. */
- if (!frame_register_read (selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* Get the register as a number */
print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
/* Get the data in raw format. */
- if (!frame_register_read (selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
printf_filtered ("*value not available*\n");
val_print (REGISTER_VIRTUAL_TYPE (regnum), raw_buffer, 0, 0,
void
sh64_do_registers_info (int regnum, int fpregs)
{
- if (pc_is_isa32 (selected_frame->pc))
+ if (pc_is_isa32 (deprecated_selected_frame->pc))
sh_do_registers_info (regnum, fpregs);
else
sh_compact_do_registers_info (regnum, fpregs);
/* error ("No selected frame."); */
if (!target_has_registers)
error ("The program has no registers now.");
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
/* Try to use selected frame */
- frame = get_prev_frame (selected_frame);
+ frame = get_prev_frame (deprecated_selected_frame);
if (frame == 0)
error ("Cmd not meaningful in the outermost frame.");
}
{
char value[16];
- if (frame_register_read (selected_frame, regno, value)
- && frame_register_read (selected_frame, regno + 1, value + 4))
+ if (frame_register_read (deprecated_selected_frame, regno, value)
+ && frame_register_read (deprecated_selected_frame, regno + 1, value + 4))
{
printf_unfiltered ("\t");
print_floating (value, builtin_type_double, gdb_stdout);
#if 0 /* FIXME: gdb doesn't handle long doubles */
if ((regno & 3) == 0)
{
- if (frame_register_read (selected_frame, regno + 2, value + 8)
- && frame_register_read (selected_frame, regno + 3, value + 12))
+ if (frame_register_read (deprecated_selected_frame, regno + 2, value + 8)
+ && frame_register_read (deprecated_selected_frame, regno + 3, value + 12))
{
printf_unfiltered ("\t");
print_floating (value, builtin_type_long_double, gdb_stdout);
{
char value[16];
- if (frame_register_read (selected_frame, regno, value)
- && frame_register_read (selected_frame, regno + 1, value + 8))
+ if (frame_register_read (deprecated_selected_frame, regno, value)
+ && frame_register_read (deprecated_selected_frame, regno + 1, value + 8))
{
printf_unfiltered ("\t");
print_floating (value, builtin_type_long_double, gdb_stdout);
void
sparc_do_registers_info (int regnum, int all)
{
- sparc_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ sparc_print_registers_info (current_gdbarch, gdb_stdout, deprecated_selected_frame,
regnum, all);
}
void
sparclet_do_registers_info (int regnum, int all)
{
- sparclet_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
- regnum, all);
+ sparclet_print_registers_info (current_gdbarch, gdb_stdout,
+ deprecated_selected_frame, regnum, all);
}
\f
extern int addressprint; /* Print addresses, or stay symbolic only? */
-/* The "selected" stack frame is used by default for local and arg access.
- May be zero, for no selected frame. */
-
-struct frame_info *selected_frame;
-
/* Zero means do things normally; we are interacting directly with the
user. One means print the full filename and linenumber when a
frame is printed, and do so in a format emacs18/emacs19.22 can
switch (numargs)
{
case 0:
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
- return selected_frame;
+ return deprecated_selected_frame;
/* NOTREACHED */
case 1:
{
}
calling_frame_info = get_prev_frame (fi);
- if (!addr_exp && frame_relative_level (selected_frame) >= 0)
+ if (!addr_exp && frame_relative_level (deprecated_selected_frame) >= 0)
{
printf_filtered ("Stack level %d, frame at ",
- frame_relative_level (selected_frame));
+ frame_relative_level (deprecated_selected_frame));
print_address_numeric (fi->frame, 1, gdb_stdout);
printf_filtered (":\n");
}
void
locals_info (char *args, int from_tty)
{
- if (!selected_frame)
+ if (!deprecated_selected_frame)
error ("No frame selected.");
- print_frame_local_vars (selected_frame, 0, gdb_stdout);
+ print_frame_local_vars (deprecated_selected_frame, 0, gdb_stdout);
}
static void
system to find the list of active handlers, etc. */
fprintf_filtered (gdb_stdout, "Info catch not supported with this target/compiler combination.\n");
#if 0
- if (!selected_frame)
+ if (!deprecated_selected_frame)
error ("No frame selected.");
#endif
}
else
{
/* Assume g++ compiled code -- old v 4.16 behaviour */
- if (!selected_frame)
+ if (!deprecated_selected_frame)
error ("No frame selected.");
- print_frame_label_vars (selected_frame, 0, gdb_stdout);
+ print_frame_label_vars (deprecated_selected_frame, 0, gdb_stdout);
}
}
void
args_info (char *ignore, int from_tty)
{
- if (!selected_frame)
+ if (!deprecated_selected_frame)
error ("No frame selected.");
- print_frame_arg_vars (selected_frame, gdb_stdout);
+ print_frame_arg_vars (deprecated_selected_frame, gdb_stdout);
}
}
\f
-/* Select frame FI (or NULL - to invalidate the current frame). */
-
-void
-select_frame (struct frame_info *fi)
-{
- register struct symtab *s;
-
- selected_frame = fi;
- /* NOTE: cagney/2002-05-04: FI can be NULL. This occures when the
- frame is being invalidated. */
- if (selected_frame_level_changed_hook)
- selected_frame_level_changed_hook (frame_relative_level (fi));
-
- /* FIXME: kseitz/2002-08-28: It would be nice to call
- selected_frame_level_changed_event right here, but due to limitations
- in the current interfaces, we would end up flooding UIs with events
- because select_frame is used extensively internally.
-
- Once we have frame-parameterized frame (and frame-related) commands,
- the event notification can be moved here, since this function will only
- be called when the users selected frame is being changed. */
-
- /* Ensure that symbols for this frame are read in. Also, determine the
- source language of this frame, and switch to it if desired. */
- if (fi)
- {
- s = find_pc_symtab (fi->pc);
- if (s
- && s->language != current_language->la_language
- && s->language != language_unknown
- && language_mode == language_mode_auto)
- {
- set_language (s->language);
- }
- }
-}
-\f
-
/* Select frame FI. Also print the stack frame and show the source if
this is the tui version. */
static void
past but is no longer the case. A mindless look at all the
callers tends to support this theory. I think we should be able
to assume that there is always a selcted frame. */
- /* gdb_assert (selected_frame != NULL); So, do you feel lucky? */
- if (!selected_frame)
+ /* gdb_assert (deprecated_selected_frame != NULL); So, do you feel
+ lucky? */
+ if (!deprecated_selected_frame)
{
CORE_ADDR pc = read_pc ();
if (addr_in_block != NULL)
*addr_in_block = pc;
return block_for_pc (pc);
}
- return get_frame_block (selected_frame, addr_in_block);
+ return get_frame_block (deprecated_selected_frame, addr_in_block);
}
/* Find a frame a certain number of levels away from FRAME.
select_frame_command (char *level_exp, int from_tty)
{
struct frame_info *frame;
- int level = frame_relative_level (selected_frame);
+ int level = frame_relative_level (deprecated_selected_frame);
if (!target_has_stack)
error ("No stack.");
frame = parse_frame_specification (level_exp);
select_frame (frame);
- if (level != frame_relative_level (selected_frame))
- selected_frame_level_changed_event (frame_relative_level (selected_frame));
+ if (level != frame_relative_level (deprecated_selected_frame))
+ selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
/* The "frame" command. With no arg, print selected frame briefly.
frame_command (char *level_exp, int from_tty)
{
select_frame_command (level_exp, from_tty);
- show_and_print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ show_and_print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
/* The XDB Compatibility command to print the current frame. */
static void
current_frame_command (char *level_exp, int from_tty)
{
- if (target_has_stack == 0 || selected_frame == 0)
+ if (target_has_stack == 0 || deprecated_selected_frame == 0)
error ("No stack.");
- print_only_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ print_only_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
/* Select the frame up one or COUNT stack levels
count = parse_and_eval_long (count_exp);
count1 = count;
- if (target_has_stack == 0 || selected_frame == 0)
+ if (target_has_stack == 0 || deprecated_selected_frame == 0)
error ("No stack.");
- fi = find_relative_frame (selected_frame, &count1);
+ fi = find_relative_frame (deprecated_selected_frame, &count1);
if (count1 != 0 && count_exp == 0)
error ("Initial frame selected; you cannot go up.");
select_frame (fi);
- selected_frame_level_changed_event (frame_relative_level (selected_frame));
+ selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
static void
up_command (char *count_exp, int from_tty)
{
up_silently_base (count_exp);
- show_and_print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ show_and_print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
/* Select the frame down one or COUNT stack levels
count = -parse_and_eval_long (count_exp);
count1 = count;
- if (target_has_stack == 0 || selected_frame == 0)
+ if (target_has_stack == 0 || deprecated_selected_frame == 0)
error ("No stack.");
- frame = find_relative_frame (selected_frame, &count1);
+ frame = find_relative_frame (deprecated_selected_frame, &count1);
if (count1 != 0 && count_exp == 0)
{
}
select_frame (frame);
- selected_frame_level_changed_event (frame_relative_level (selected_frame));
+ selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
/* ARGSUSED */
down_command (char *count_exp, int from_tty)
{
down_silently_base (count_exp);
- show_and_print_stack_frame (selected_frame,
- frame_relative_level (selected_frame), 1);
+ show_and_print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
\f
void
struct frame_info *frame;
struct value *return_value = NULL;
- if (selected_frame == NULL)
+ if (deprecated_selected_frame == NULL)
error ("No selected frame.");
- thisfun = get_frame_function (selected_frame);
- selected_frame_addr = get_frame_base (selected_frame);
- selected_frame_pc = selected_frame->pc;
+ thisfun = get_frame_function (deprecated_selected_frame);
+ selected_frame_addr = get_frame_base (deprecated_selected_frame);
+ selected_frame_pc = deprecated_selected_frame->pc;
/* Compute the return value (if any -- possibly getting errors here). */
}
/* Do the real work. Pop until the specified frame is current. We
- use this method because the selected_frame is not valid after
+ use this method because the deprecated_selected_frame is not valid after
a POP_FRAME. The pc comparison makes this work even if the
selected frame shares its fp with another frame. */
if (!found)
printf_filtered ("'%s' not within current stack frame.\n", arg);
- else if (fp != selected_frame)
+ else if (fp != deprecated_selected_frame)
select_and_print_frame (fp);
}
register struct symtab *s;
enum language flang; /* The language of the current frame */
- if (selected_frame)
+ if (deprecated_selected_frame)
{
- s = find_pc_symtab (selected_frame->pc);
+ s = find_pc_symtab (deprecated_selected_frame->pc);
if (s)
flang = s->language;
else
struct thread_info *tp;
ptid_t current_ptid;
struct frame_info *cur_frame;
- int saved_frame_level = frame_relative_level (selected_frame);
+ int saved_frame_level = frame_relative_level (deprecated_selected_frame);
int counter;
char *extra_info;
/* Avoid coredumps which would happen if we tried to access a NULL
- selected_frame. */
+ deprecated_selected_frame. */
if (!target_has_stack)
error ("No stack.");
puts_filtered (" ");
switch_to_thread (tp->ptid);
- if (selected_frame)
- print_only_stack_frame (selected_frame, -1, 0);
+ if (deprecated_selected_frame)
+ print_only_stack_frame (deprecated_selected_frame, -1, 0);
else
printf_filtered ("[No stack.]\n");
}
* of the stack (leaf frame).
*/
counter = saved_frame_level;
- cur_frame = find_relative_frame (selected_frame, &counter);
+ cur_frame = find_relative_frame (deprecated_selected_frame, &counter);
if (counter != 0)
{
/* Ooops, can't restore, tell user where we are. */
warning ("Couldn't restore frame in current thread, at frame 0");
- print_stack_frame (selected_frame, -1, 0);
+ print_stack_frame (deprecated_selected_frame, -1, 0);
}
else
{
#endif
ui_out_text (uiout, ")]");
- print_stack_frame (selected_frame, frame_relative_level (selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
return GDB_RC_OK;
}
else
source_only = 1;
- print_stack_frame (selected_frame, frame_relative_level (selected_frame),
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame),
source_only);
do_displays ();
}
+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * tui/tui-hooks.c: Update to use deprecated_selected_frame.
+ * tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
+ * tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
+
2002-11-28 Andrew Cagney <ac131313@redhat.com>
* tuiStack.c (tuiShowFrameInfo): Use find_frame_sal instead of
{
struct frame_info *fi;
- fi = selected_frame;
+ fi = deprecated_selected_frame;
if (fi && tui_refreshing_registers == 0)
{
tui_refreshing_registers = 1;
{
struct frame_info *fi;
- fi = selected_frame;
+ fi = deprecated_selected_frame;
if (fi && tui_refreshing_registers == 0)
{
tui_refreshing_registers = 1;
{
struct frame_info *fi;
- fi = selected_frame;
+ fi = deprecated_selected_frame;
/* Ensure that symbols for this frame are read in. Also, determine the
source language of this frame, and switch to it if desired. */
if (fi)
int stopline, int noerror)
{
select_source_symtab (s);
- tuiShowFrameInfo (selected_frame);
+ tuiShowFrameInfo (deprecated_selected_frame);
}
/* Called when the target process died or is detached.
tui_version = 1;
tui_active = 1;
- if (selected_frame)
- tuiShowFrameInfo (selected_frame);
+ if (deprecated_selected_frame)
+ tuiShowFrameInfo (deprecated_selected_frame);
/* Restore TUI keymap. */
tui_set_key_mode (tui_current_key_mode);
content = (TuiWinContent) disassemWin->generic.content;
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
+ s = find_pc_symtab (deprecated_selected_frame->pc);
else
s = cursal.symtab;
stream = tui_sfileopen (bufLen);
gdb_stdout = stream;
cleanups = make_cleanup (tui_restore_gdbout, (void*) old_stdout);
- gdbarch_print_registers_info (current_gdbarch, stream, selected_frame,
+ gdbarch_print_registers_info (current_gdbarch, stream, deprecated_selected_frame,
regNum, 1);
/* Save formatted output in the buffer. */
{
return (_tuiSetRegsContent (0,
NUM_GENERAL_REGS - 1,
- selected_frame,
+ deprecated_selected_frame,
TUI_GENERAL_REGS,
refreshValuesOnly));
endRegNum = FP0_REGNUM - 1;
ret = _tuiSetRegsContent (START_SPECIAL_REGS,
endRegNum,
- selected_frame,
+ deprecated_selected_frame,
TUI_SPECIAL_REGS,
refreshValuesOnly);
endRegNum = FP0_REGNUM - 1;
ret = _tuiSetRegsContent (
- 0, endRegNum, selected_frame, TUI_SPECIAL_REGS, refreshValuesOnly);
+ 0, endRegNum, deprecated_selected_frame, TUI_SPECIAL_REGS, refreshValuesOnly);
return ret;
} /* _tuiSetGeneralAndSpecialRegsContent */
startRegNum = FP0_REGNUM;
ret = _tuiSetRegsContent (startRegNum,
NUM_REGS - 1,
- selected_frame,
+ deprecated_selected_frame,
dpyType,
refreshValuesOnly);
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
+ s = find_pc_symtab (deprecated_selected_frame->pc);
else
s = cursal.symtab;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
+ s = find_pc_symtab (deprecated_selected_frame->pc);
else
s = cursal.symtab;
tuiUpdateSourceWindow (winInfo,
cursal.symtab, lineOrAddr, TRUE);
}
- else if (selected_frame != (struct frame_info *) NULL)
+ else if (deprecated_selected_frame != (struct frame_info *) NULL)
{
TuiLineOrAddress line;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
- s = find_pc_symtab (selected_frame->pc);
+ s = find_pc_symtab (deprecated_selected_frame->pc);
if (winInfo->generic.type == SRC_WIN)
line.lineNo = cursal.line;
else
/* Since modifying a register can trash the frame chain, we
save the old frame and then restore the new frame
afterwards. */
- get_frame_id (selected_frame, &old_frame);
+ get_frame_id (deprecated_selected_frame, &old_frame);
/* Figure out which frame this is in currently. */
if (VALUE_LVAL (toval) == lval_register)
int i;
struct value * ret;
- if (selected_frame == 0)
+ if (deprecated_selected_frame == 0)
{
if (complain)
error ("no frame selected");
return 0;
}
- func = get_frame_function (selected_frame);
+ func = get_frame_function (deprecated_selected_frame);
if (!func)
{
if (complain)
return NULL;
}
- ret = read_var_value (sym, selected_frame);
+ ret = read_var_value (sym, deprecated_selected_frame);
if (ret == 0 && complain)
error ("`%s' argument unreadable", name);
return ret;
/* Allow creator to specify context of variable */
if ((type == USE_CURRENT_FRAME) || (type == USE_SELECTED_FRAME))
- fi = selected_frame;
+ fi = deprecated_selected_frame;
else
/* FIXME: cagney/2002-11-23: This code should be doing a
lookup using the frame ID and not just the frame's
if (fi != NULL)
{
get_frame_id (fi, &var->root->frame);
- old_fi = selected_frame;
+ old_fi = deprecated_selected_frame;
select_frame (fi);
}
/* Save the selected stack frame, since we will need to change it
in order to evaluate expressions. */
- get_frame_id (selected_frame, &old_fid);
+ get_frame_id (deprecated_selected_frame, &old_fid);
/* Update the root variable. value_of_root can return NULL
if the variable is no longer around, i.e. we stepped out of
{
unsigned char l[4];
- frame_register_read (selected_frame, regno, l + 0);
- frame_register_read (selected_frame, regno + 1, l + 2);
+ frame_register_read (deprecated_selected_frame, regno, l + 0);
+ frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
printf_unfiltered ("\t");
printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
}
{
unsigned char l[8];
- frame_register_read (selected_frame, regno, l + 0);
- frame_register_read (selected_frame, regno + 1, l + 2);
- frame_register_read (selected_frame, regno + 2, l + 4);
- frame_register_read (selected_frame, regno + 3, l + 6);
+ frame_register_read (deprecated_selected_frame, regno, l + 0);
+ frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
+ frame_register_read (deprecated_selected_frame, regno + 2, l + 4);
+ frame_register_read (deprecated_selected_frame, regno + 3, l + 6);
printf_unfiltered ("\t");
printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
unsigned short rval;
int i;
- frame_register_read (selected_frame, regno, (char *) (&rval));
+ frame_register_read (deprecated_selected_frame, regno, (char *) (&rval));
printf_unfiltered ("\n");
for (i = 0; i < 10; i += 2)
void
z8k_do_registers_info (int regnum, int all)
{
- z8k_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
- regnum, all);
+ z8k_print_registers_info (current_gdbarch, gdb_stdout,
+ deprecated_selected_frame, regnum, all);
}
void