annotate_arg_emitter arg_emitter;
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- fprintf_symbol_filtered (&stb, arg->sym->print_name (),
- arg->sym->language (), DMGL_PARAMS | DMGL_ANSI);
+ fputs_filtered (arg->sym->print_name (), &stb);
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. */
stb.puts ("=");
- fprintf_symbol_filtered (&stb, arg->sym->print_name (),
- arg->sym->language (),
- DMGL_PARAMS | DMGL_ANSI);
+ fputs_filtered (arg->sym->print_name (), &stb);
}
if (arg->entry_kind == print_entry_values_only
|| arg->entry_kind == print_entry_values_compact)
annotate_frame_function_name ();
string_file stb;
- fprintf_symbol_filtered (&stb, funname ? funname.get () : "??",
- funlang, DMGL_ANSI);
+ fputs_filtered (funname ? funname.get () : "??", &stb);
uiout->field_stream ("func", stb, function_name_style.style ());
uiout->wrap_hint (" ");
annotate_frame_args ();
if (funname)
{
printf_filtered (" in ");
- fprintf_symbol_filtered (gdb_stdout, funname, funlang,
- DMGL_ANSI | DMGL_PARAMS);
+ fputs_filtered (funname, gdb_stdout);
}
wrap_here (" ");
if (sal.symtab)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int sp_size = register_size (gdbarch, sp_regnum);
- sp = extract_unsigned_integer (value_contents_all (value),
- sp_size, byte_order);
+ sp = extract_unsigned_integer
+ (value_contents_all (value).data (), sp_size, byte_order);
printf_filtered (" Previous frame's sp is ");
fputs_filtered (paddress (gdbarch, sp), gdb_stdout);
if (p->treg.has_value ()
&& !treg_matches_sym_type_name (*p->treg, sym))
return;
+ if (language_def (sym->language ())->symbol_printing_suppressed (sym))
+ return;
frame = frame_find_by_id (p->frame_id);
if (frame == NULL)
struct info_print_options
{
bool quiet = false;
- char *type_regexp = nullptr;
-
- ~info_print_options ()
- {
- xfree (type_regexp);
- }
+ std::string type_regexp;
};
/* The options used by the 'info locals' and 'info args' commands. */
if (args != nullptr && *args == '\0')
args = nullptr;
- print_frame_local_vars (get_selected_frame (_("No frame selected.")),
- opts.quiet, args, opts.type_regexp,
- 0, gdb_stdout);
+ print_frame_local_vars
+ (get_selected_frame (_("No frame selected.")),
+ opts.quiet, args,
+ opts.type_regexp.empty () ? nullptr : opts.type_regexp.c_str (),
+ 0, gdb_stdout);
}
/* Iterate over all the argument variables in block B. */
if (args != nullptr && *args == '\0')
args = nullptr;
- print_frame_arg_vars (get_selected_frame (_("No frame selected.")),
- opts.quiet, args, opts.type_regexp, gdb_stdout);
+ print_frame_arg_vars
+ (get_selected_frame (_("No frame selected.")),
+ opts.quiet, args,
+ opts.type_regexp.empty () ? nullptr : opts.type_regexp.c_str (),
+ gdb_stdout);
}
\f
/* Return the symbol-block in which the selected frame is executing.
if (thisfun != NULL)
return_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (thisfun));
if (return_type == NULL)
- {
+ {
if (retval_expr->first_opcode () != UNOP_CAST
&& retval_expr->first_opcode () != UNOP_CAST_TYPE)
error (_("Return value type not available for selected "
&& rv_conv != RETURN_VALUE_ABI_RETURNS_ADDRESS);
gdbarch_return_value (cache_arch, function, return_type,
get_current_regcache (), NULL /*read*/,
- value_contents (return_value) /*write*/);
+ value_contents (return_value).data () /*write*/);
}
/* If we are at the end of a call dummy now, pop the dummy frame
set to the selected frame. */
scoped_restore_current_thread restore_fi_current_frame;
- cmd_result = execute_command_to_string
- (cmd, from_tty, gdb_stdout->term_out ());
+ execute_command_to_string
+ (cmd_result, cmd, from_tty, gdb_stdout->term_out ());
}
fi = get_selected_frame (_("frame apply "
"unable to get selected frame."));