args.print_what = ui_out_is_mi_like_p (uiout) ? LOC_AND_ADDRESS : print_what;
args.print_args = 1;
- catch_errors (print_stack_frame_stub, &args, "", RETURN_MASK_ALL);
+ catch_errors (print_stack_frame_stub, &args, "", RETURN_MASK_ERROR);
}
struct print_args_args
/* 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
args.func = func;
args.stream = gdb_stdout;
args_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "args");
- catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
+ catch_errors (print_args_stub, &args, "", RETURN_MASK_ERROR);
/* FIXME: ARGS must be a list. If one argument is a string it
will have " that will not be properly escaped. */
/* Invoke ui_out_tuple_end. */
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;
}
}
is discarded, side effects such as "return i++" still
occur. */
return_value = NULL;
- else if (using_struct_return (return_type))
+ else if (using_struct_return (SYMBOL_TYPE (thisfun), return_type))
{
query_prefix = "\
The location at which to store the function's return value is unknown.\n\
{
struct type *return_type = value_type (return_value);
struct gdbarch *gdbarch = get_regcache_arch (get_current_regcache ());
- gdb_assert (gdbarch_return_value (gdbarch, return_type, NULL, NULL, NULL)
+ gdb_assert (gdbarch_return_value (gdbarch, SYMBOL_TYPE (thisfun),
+ return_type, NULL, NULL, NULL)
== RETURN_VALUE_REGISTER_CONVENTION);
- gdbarch_return_value (gdbarch, return_type,
+ gdbarch_return_value (gdbarch, SYMBOL_TYPE (thisfun), return_type,
get_current_regcache (), NULL /*read*/,
value_contents (return_value) /*write*/);
}