struct ui_out *uiout = current_uiout;
volatile struct gdb_exception except;
struct cleanup *old_chain;
- struct ui_stream *stb;
+ struct ui_file *stb;
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
+ stb = mem_fileopen ();
+ old_chain = make_cleanup_ui_file_delete (stb);
gdb_assert (!arg->val || !arg->error);
gdb_assert (arg->entry_kind == print_entry_values_no
annotate_arg_begin ();
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (arg->sym),
+ fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (arg->sym),
SYMBOL_LANGUAGE (arg->sym), DMGL_PARAMS | DMGL_ANSI);
if (arg->entry_kind == print_entry_values_compact)
{
/* It is OK to provide invalid MI-like stream as with
PRINT_ENTRY_VALUE_COMPACT we never use MI. */
- fputs_filtered ("=", stb->stream);
+ fputs_filtered ("=", stb);
- fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (arg->sym),
+ fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (arg->sym),
SYMBOL_LANGUAGE (arg->sym),
DMGL_PARAMS | DMGL_ANSI);
}
if (arg->entry_kind == print_entry_values_only
|| arg->entry_kind == print_entry_values_compact)
- fputs_filtered ("@entry", stb->stream);
+ fputs_filtered ("@entry", stb);
ui_out_field_stream (uiout, "name", stb);
annotate_arg_name_end ();
ui_out_text (uiout, "=");
/* True in "summary" mode, false otherwise. */
opts.summary = !strcmp (print_frame_arguments, "scalars");
- common_val_print (arg->val, stb->stream, 2, &opts, language);
+ common_val_print (arg->val, stb, 2, &opts, language);
}
}
if (except.message)
- fprintf_filtered (stb->stream, _("<error reading variable: %s>"),
+ fprintf_filtered (stb, _("<error reading variable: %s>"),
except.message);
}
ui_out_field_stream (uiout, "value", stb);
- /* Aleo invoke ui_out_tuple_end. */
+ /* Also invoke ui_out_tuple_end. */
do_cleanups (old_chain);
annotate_arg_end ();
long highest_offset = -1;
/* Number of ints of arguments that we have printed so far. */
int args_printed = 0;
- struct cleanup *old_chain, *list_chain;
- struct ui_stream *stb;
+ struct cleanup *old_chain;
+ struct ui_file *stb;
/* True if we should print arguments, false otherwise. */
int print_args = strcmp (print_frame_arguments, "none");
/* True in "summary" mode, false otherwise. */
int summary = !strcmp (print_frame_arguments, "scalars");
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
+ stb = mem_fileopen ();
+ old_chain = make_cleanup_ui_file_delete (stb);
if (func)
{
struct block *b = SYMBOL_BLOCK_VALUE (func);
- struct dict_iterator iter;
+ struct block_iterator iter;
struct symbol *sym;
ALL_BLOCK_SYMBOLS (b, iter, sym)
last_displayed_addr = addr;
last_displayed_symtab = symtab;
last_displayed_line = line;
+ if (valid && pspace == NULL)
+ {
+ clear_last_displayed_sal ();
+ internal_error (__FILE__, __LINE__,
+ _("Trying to set NULL pspace."));
+ }
}
/* Forget the last sal we displayed. */
struct ui_out *uiout = current_uiout;
const char *funname = NULL;
enum language funlang = language_unknown;
- struct ui_stream *stb;
+ struct ui_file *stb;
struct cleanup *old_chain, *list_chain;
struct value_print_options opts;
struct symbol *func;
pc_p = get_frame_pc_if_available (frame, &pc);
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
+ stb = mem_fileopen ();
+ old_chain = make_cleanup_ui_file_delete (stb);
find_frame_funname (frame, &funname, &funlang, &func);
ui_out_text (uiout, " in ");
}
annotate_frame_function_name ();
- fprintf_symbol_filtered (stb->stream, funname ? funname : "??",
+ fprintf_symbol_filtered (stb, funname ? funname : "??",
funlang, DMGL_ANSI);
ui_out_field_stream (uiout, "func", stb);
ui_out_wrap_hint (uiout, " ");
iterate_over_block_arg_local_vars_cb cb,
void *cb_data)
{
- struct dict_iterator iter;
+ struct block_iterator iter;
struct symbol *sym;
ALL_BLOCK_SYMBOLS (b, iter, sym)
print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
int *have_default, struct ui_file *stream)
{
- struct dict_iterator iter;
+ struct block_iterator iter;
struct symbol *sym;
int values_printed = 0;
iterate_over_block_arg_local_vars_cb cb,
void *cb_data)
{
- struct dict_iterator iter;
+ struct block_iterator iter;
struct symbol *sym, *sym2;
ALL_BLOCK_SYMBOLS (b, iter, sym)
struct gdbarch *gdbarch;
struct symbol *thisfun;
struct value *return_value = NULL;
+ struct value *function = NULL;
const char *query_prefix = "";
thisframe = get_selected_frame ("No selected frame.");
if (value_lazy (return_value))
value_fetch_lazy (return_value);
+ if (thisfun != NULL)
+ function = read_var_value (thisfun, thisframe);
+
if (TYPE_CODE (return_type) == TYPE_CODE_VOID)
/* If the return-type is "void", don't try to find the
return-value's location. However, do still evaluate the
occur. */
return_value = NULL;
else if (thisfun != NULL
- && using_struct_return (gdbarch,
- SYMBOL_TYPE (thisfun), return_type))
+ && using_struct_return (gdbarch, function, 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 ());
- struct type *func_type = thisfun == NULL ? NULL : SYMBOL_TYPE (thisfun);
- gdb_assert (gdbarch_return_value (gdbarch, func_type, return_type, NULL,
+ gdb_assert (gdbarch_return_value (gdbarch, function, return_type, NULL,
NULL, NULL)
== RETURN_VALUE_REGISTER_CONVENTION);
- gdbarch_return_value (gdbarch, func_type, return_type,
+ gdbarch_return_value (gdbarch, function, return_type,
get_current_regcache (), NULL /*read*/,
value_contents (return_value) /*write*/);
}