/* Keep track of the highest stack argument offset seen, and
skip over any kinds of symbols we don't care about. */
+ if (!SYMBOL_IS_ARGUMENT (sym))
+ continue;
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
/* We care about types of symbols, but don't need to
keep track of stack offsets in them. */
- case LOC_REGPARM:
+ case LOC_REGISTER:
case LOC_REGPARM_ADDR:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- break;
-
- /* Other types of symbols we just skip over. */
+ case LOC_COMPUTED:
+ case LOC_OPTIMIZED_OUT:
default:
- continue;
+ break;
}
/* We have to look up the symbol because arguments can have
{
struct symbol *nsym;
nsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
- b, VAR_DOMAIN, NULL, NULL);
+ b, VAR_DOMAIN, NULL);
gdb_assert (nsym != NULL);
- if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
+ if (SYMBOL_CLASS (nsym) == LOC_REGISTER
+ && !SYMBOL_IS_ARGUMENT (nsym))
{
/* There is a LOC_ARG/LOC_REGISTER pair. This means
that it was passed on the stack and loaded into a
if (val)
{
+ const struct language_defn *language;
+
+ /* Use the appropriate language to display our symbol,
+ unless the user forced the language to a specific
+ language. */
+ if (language_mode == language_mode_auto)
+ language = language_def (SYMBOL_LANGUAGE (sym));
+ else
+ language = current_language;
+
common_val_print (val, stb->stream, 0, 0, 2,
- Val_no_prettyprint);
+ Val_no_prettyprint, language);
ui_out_field_stream (uiout, "value", stb);
}
else
do_cleanups (old_chain);
}
\f
-/* Show the frame info. If this is the tui, it will be shown in the
- source display otherwise, nothing is done. */
-
-void
-show_stack_frame (struct frame_info *frame)
-{
-}
-\f
/* Read a frame specification in whatever the appropriate format is
from FRAME_EXP. Call error(), printing MESSAGE, if the
case LOC_LOCAL:
case LOC_REGISTER:
case LOC_STATIC:
- case LOC_BASEREG:
case LOC_COMPUTED:
+ if (SYMBOL_IS_ARGUMENT (sym))
+ break;
values_printed = 1;
for (j = 0; j < num_tabs; j++)
fputs_filtered ("\t", stream);
b = SYMBOL_BLOCK_VALUE (func);
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- switch (SYMBOL_CLASS (sym))
+ /* Don't worry about things which aren't arguments. */
+ if (SYMBOL_IS_ARGUMENT (sym))
{
- case LOC_ARG:
- case LOC_LOCAL_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
values_printed = 1;
fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
fputs_filtered (" = ", stream);
are not combined in symbol-reading. */
sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
- b, VAR_DOMAIN, NULL, NULL);
+ b, VAR_DOMAIN, NULL);
print_variable_value (sym2, frame, stream);
fprintf_filtered (stream, "\n");
- break;
-
- default:
- /* Don't worry about things which aren't arguments. */
- break;
}
}