Remove gdb_print_host_address

gdb_print_host_address is just a simple wrapper around
fprintf_filtered.  However, it is readily replaced in all callers by a
combination of %s and call to host_address_to_string.  This also
simplifies the code, so I think it's worthwhile to remove this
function.

Regression tested on x86-64 Fedora 64.
This commit is contained in:
Tom Tromey 2021-12-22 10:28:37 -07:00
parent 34b965f7c0
commit 64b7cc507b
6 changed files with 107 additions and 175 deletions

View file

@ -405,14 +405,10 @@ fprint_dummy_frames (struct ui_file *file)
struct dummy_frame *s; struct dummy_frame *s;
for (s = dummy_frame_stack; s != NULL; s = s->next) for (s = dummy_frame_stack; s != NULL; s = s->next)
{ fprintf_unfiltered (file, "%s: id=%s, ptid=%s\n",
gdb_print_host_address (s, file); host_address_to_string (s),
fprintf_unfiltered (file, ":"); s->id.id.to_string ().c_str (),
fprintf_unfiltered (file, " id=%s", s->id.id.to_string ().c_str ()); target_pid_to_str (s->id.thread->ptid).c_str ());
fprintf_unfiltered (file, ", ptid=%s",
target_pid_to_str (s->id.thread->ptid).c_str ());
fprintf_unfiltered (file, "\n");
}
} }
static void static void

View file

@ -4901,48 +4901,44 @@ dump_fn_fieldlists (struct type *type, int spaces)
int overload_idx; int overload_idx;
struct fn_field *f; struct fn_field *f;
printf_filtered ("%*sfn_fieldlists ", spaces, ""); printf_filtered ("%*sfn_fieldlists %s\n", spaces, "",
gdb_print_host_address (TYPE_FN_FIELDLISTS (type), gdb_stdout); host_address_to_string (TYPE_FN_FIELDLISTS (type)));
printf_filtered ("\n");
for (method_idx = 0; method_idx < TYPE_NFN_FIELDS (type); method_idx++) for (method_idx = 0; method_idx < TYPE_NFN_FIELDS (type); method_idx++)
{ {
f = TYPE_FN_FIELDLIST1 (type, method_idx); f = TYPE_FN_FIELDLIST1 (type, method_idx);
printf_filtered ("%*s[%d] name '%s' (", spaces + 2, "", printf_filtered
method_idx, ("%*s[%d] name '%s' (%s) length %d\n", spaces + 2, "",
TYPE_FN_FIELDLIST_NAME (type, method_idx)); method_idx,
gdb_print_host_address (TYPE_FN_FIELDLIST_NAME (type, method_idx), TYPE_FN_FIELDLIST_NAME (type, method_idx),
gdb_stdout); host_address_to_string (TYPE_FN_FIELDLIST_NAME (type, method_idx)),
printf_filtered (_(") length %d\n"), TYPE_FN_FIELDLIST_LENGTH (type, method_idx));
TYPE_FN_FIELDLIST_LENGTH (type, method_idx));
for (overload_idx = 0; for (overload_idx = 0;
overload_idx < TYPE_FN_FIELDLIST_LENGTH (type, method_idx); overload_idx < TYPE_FN_FIELDLIST_LENGTH (type, method_idx);
overload_idx++) overload_idx++)
{ {
printf_filtered ("%*s[%d] physname '%s' (", printf_filtered
spaces + 4, "", overload_idx, ("%*s[%d] physname '%s' (%s)\n",
TYPE_FN_FIELD_PHYSNAME (f, overload_idx)); spaces + 4, "", overload_idx,
gdb_print_host_address (TYPE_FN_FIELD_PHYSNAME (f, overload_idx), TYPE_FN_FIELD_PHYSNAME (f, overload_idx),
gdb_stdout); host_address_to_string (TYPE_FN_FIELD_PHYSNAME (f,
printf_filtered (")\n"); overload_idx)));
printf_filtered ("%*stype ", spaces + 8, ""); printf_filtered
gdb_print_host_address (TYPE_FN_FIELD_TYPE (f, overload_idx), ("%*stype %s\n", spaces + 8, "",
gdb_stdout); host_address_to_string (TYPE_FN_FIELD_TYPE (f, overload_idx)));
printf_filtered ("\n");
recursive_dump_type (TYPE_FN_FIELD_TYPE (f, overload_idx), recursive_dump_type (TYPE_FN_FIELD_TYPE (f, overload_idx),
spaces + 8 + 2); spaces + 8 + 2);
printf_filtered ("%*sargs ", spaces + 8, ""); printf_filtered
gdb_print_host_address (TYPE_FN_FIELD_ARGS (f, overload_idx), ("%*sargs %s\n", spaces + 8, "",
gdb_stdout); host_address_to_string (TYPE_FN_FIELD_ARGS (f, overload_idx)));
printf_filtered ("\n");
print_args (TYPE_FN_FIELD_ARGS (f, overload_idx), print_args (TYPE_FN_FIELD_ARGS (f, overload_idx),
TYPE_FN_FIELD_TYPE (f, overload_idx)->num_fields (), TYPE_FN_FIELD_TYPE (f, overload_idx)->num_fields (),
spaces + 8 + 2); spaces + 8 + 2);
printf_filtered ("%*sfcontext ", spaces + 8, ""); printf_filtered
gdb_print_host_address (TYPE_FN_FIELD_FCONTEXT (f, overload_idx), ("%*sfcontext %s\n", spaces + 8, "",
gdb_stdout); host_address_to_string (TYPE_FN_FIELD_FCONTEXT (f,
printf_filtered ("\n"); overload_idx)));
printf_filtered ("%*sis_const %d\n", spaces + 8, "", printf_filtered ("%*sis_const %d\n", spaces + 8, "",
TYPE_FN_FIELD_CONST (f, overload_idx)); TYPE_FN_FIELD_CONST (f, overload_idx));
@ -4969,9 +4965,8 @@ print_cplus_stuff (struct type *type, int spaces)
{ {
printf_filtered ("%*svptr_fieldno %d\n", spaces, "", printf_filtered ("%*svptr_fieldno %d\n", spaces, "",
TYPE_VPTR_FIELDNO (type)); TYPE_VPTR_FIELDNO (type));
printf_filtered ("%*svptr_basetype ", spaces, ""); printf_filtered ("%*svptr_basetype %s\n", spaces, "",
gdb_print_host_address (TYPE_VPTR_BASETYPE (type), gdb_stdout); host_address_to_string (TYPE_VPTR_BASETYPE (type)));
puts_filtered ("\n");
if (TYPE_VPTR_BASETYPE (type) != NULL) if (TYPE_VPTR_BASETYPE (type) != NULL)
recursive_dump_type (TYPE_VPTR_BASETYPE (type), spaces + 2); recursive_dump_type (TYPE_VPTR_BASETYPE (type), spaces + 2);
@ -4981,11 +4976,10 @@ print_cplus_stuff (struct type *type, int spaces)
TYPE_NFN_FIELDS (type)); TYPE_NFN_FIELDS (type));
if (TYPE_N_BASECLASSES (type) > 0) if (TYPE_N_BASECLASSES (type) > 0)
{ {
printf_filtered ("%*svirtual_field_bits (%d bits at *", printf_filtered
spaces, "", TYPE_N_BASECLASSES (type)); ("%*svirtual_field_bits (%d bits at *%s)",
gdb_print_host_address (TYPE_FIELD_VIRTUAL_BITS (type), spaces, "", TYPE_N_BASECLASSES (type),
gdb_stdout); host_address_to_string (TYPE_FIELD_VIRTUAL_BITS (type)));
printf_filtered (")");
print_bit_vector (TYPE_FIELD_VIRTUAL_BITS (type), print_bit_vector (TYPE_FIELD_VIRTUAL_BITS (type),
TYPE_N_BASECLASSES (type)); TYPE_N_BASECLASSES (type));
@ -4995,22 +4989,20 @@ print_cplus_stuff (struct type *type, int spaces)
{ {
if (TYPE_FIELD_PRIVATE_BITS (type) != NULL) if (TYPE_FIELD_PRIVATE_BITS (type) != NULL)
{ {
printf_filtered ("%*sprivate_field_bits (%d bits at *", printf_filtered
spaces, "", type->num_fields ()); ("%*sprivate_field_bits (%d bits at *%s)",
gdb_print_host_address (TYPE_FIELD_PRIVATE_BITS (type), spaces, "", type->num_fields (),
gdb_stdout); host_address_to_string (TYPE_FIELD_PRIVATE_BITS (type)));
printf_filtered (")");
print_bit_vector (TYPE_FIELD_PRIVATE_BITS (type), print_bit_vector (TYPE_FIELD_PRIVATE_BITS (type),
type->num_fields ()); type->num_fields ());
puts_filtered ("\n"); puts_filtered ("\n");
} }
if (TYPE_FIELD_PROTECTED_BITS (type) != NULL) if (TYPE_FIELD_PROTECTED_BITS (type) != NULL)
{ {
printf_filtered ("%*sprotected_field_bits (%d bits at *", printf_filtered
spaces, "", type->num_fields ()); ("%*sprotected_field_bits (%d bits at *%s",
gdb_print_host_address (TYPE_FIELD_PROTECTED_BITS (type), spaces, "", type->num_fields (),
gdb_stdout); host_address_to_string (TYPE_FIELD_PROTECTED_BITS (type)));
printf_filtered (")");
print_bit_vector (TYPE_FIELD_PROTECTED_BITS (type), print_bit_vector (TYPE_FIELD_PROTECTED_BITS (type),
type->num_fields ()); type->num_fields ());
puts_filtered ("\n"); puts_filtered ("\n");
@ -5098,8 +5090,8 @@ recursive_dump_type (struct type *type, int spaces)
{ {
if (type == first_dont_print[i]) if (type == first_dont_print[i])
{ {
printf_filtered ("%*stype node ", spaces, ""); printf_filtered ("%*stype node %s", spaces, "",
gdb_print_host_address (type, gdb_stdout); host_address_to_string (type));
printf_filtered (_(" <same as already seen type>\n")); printf_filtered (_(" <same as already seen type>\n"));
return; return;
} }
@ -5108,13 +5100,11 @@ recursive_dump_type (struct type *type, int spaces)
obstack_ptr_grow (&dont_print_type_obstack, type); obstack_ptr_grow (&dont_print_type_obstack, type);
} }
printf_filtered ("%*stype node ", spaces, ""); printf_filtered ("%*stype node %s\n", spaces, "",
gdb_print_host_address (type, gdb_stdout); host_address_to_string (type));
printf_filtered ("\n"); printf_filtered ("%*sname '%s' (%s)\n", spaces, "",
printf_filtered ("%*sname '%s' (", spaces, "", type->name () ? type->name () : "<NULL>",
type->name () ? type->name () : "<NULL>"); host_address_to_string (type->name ()));
gdb_print_host_address (type->name (), gdb_stdout);
printf_filtered (")\n");
printf_filtered ("%*scode 0x%x ", spaces, "", type->code ()); printf_filtered ("%*scode 0x%x ", spaces, "", type->code ());
switch (type->code ()) switch (type->code ())
{ {
@ -5201,32 +5191,23 @@ recursive_dump_type (struct type *type, int spaces)
printf_filtered ("%*slength %s\n", spaces, "", printf_filtered ("%*slength %s\n", spaces, "",
pulongest (TYPE_LENGTH (type))); pulongest (TYPE_LENGTH (type)));
if (type->is_objfile_owned ()) if (type->is_objfile_owned ())
{ printf_filtered ("%*sobjfile %s\n", spaces, "",
printf_filtered ("%*sobjfile ", spaces, ""); host_address_to_string (type->objfile_owner ()));
gdb_print_host_address (type->objfile_owner (), gdb_stdout);
}
else else
{ printf_filtered ("%*sgdbarch %s\n", spaces, "",
printf_filtered ("%*sgdbarch ", spaces, ""); host_address_to_string (type->arch_owner ()));
gdb_print_host_address (type->arch_owner (), gdb_stdout); printf_filtered ("%*starget_type %s\n", spaces, "",
} host_address_to_string (TYPE_TARGET_TYPE (type)));
printf_filtered ("\n");
printf_filtered ("%*starget_type ", spaces, "");
gdb_print_host_address (TYPE_TARGET_TYPE (type), gdb_stdout);
printf_filtered ("\n");
if (TYPE_TARGET_TYPE (type) != NULL) if (TYPE_TARGET_TYPE (type) != NULL)
{ {
recursive_dump_type (TYPE_TARGET_TYPE (type), spaces + 2); recursive_dump_type (TYPE_TARGET_TYPE (type), spaces + 2);
} }
printf_filtered ("%*spointer_type ", spaces, ""); printf_filtered ("%*spointer_type %s\n", spaces, "",
gdb_print_host_address (TYPE_POINTER_TYPE (type), gdb_stdout); host_address_to_string (TYPE_POINTER_TYPE (type)));
printf_filtered ("\n"); printf_filtered ("%*sreference_type %s\n", spaces, "",
printf_filtered ("%*sreference_type ", spaces, ""); host_address_to_string (TYPE_REFERENCE_TYPE (type)));
gdb_print_host_address (TYPE_REFERENCE_TYPE (type), gdb_stdout); printf_filtered ("%*stype_chain %s\n", spaces, "",
printf_filtered ("\n"); host_address_to_string (TYPE_CHAIN (type)));
printf_filtered ("%*stype_chain ", spaces, "");
gdb_print_host_address (TYPE_CHAIN (type), gdb_stdout);
printf_filtered ("\n");
printf_filtered ("%*sinstance_flags 0x%x", spaces, "", printf_filtered ("%*sinstance_flags 0x%x", spaces, "",
(unsigned) type->instance_flags ()); (unsigned) type->instance_flags ());
if (TYPE_CONST (type)) if (TYPE_CONST (type))
@ -5331,8 +5312,7 @@ recursive_dump_type (struct type *type, int spaces)
} }
printf_filtered ("\n"); printf_filtered ("\n");
} }
gdb_print_host_address (type->fields (), gdb_stdout); printf ("%s\n", host_address_to_string (type->fields ()));
puts_filtered ("\n");
for (idx = 0; idx < type->num_fields (); idx++) for (idx = 0; idx < type->num_fields (); idx++)
{ {
if (type->code () == TYPE_CODE_ENUM) if (type->code () == TYPE_CODE_ENUM)
@ -5342,13 +5322,12 @@ recursive_dump_type (struct type *type, int spaces)
printf_filtered ("%*s[%d] bitpos %s bitsize %d type ", spaces + 2, "", printf_filtered ("%*s[%d] bitpos %s bitsize %d type ", spaces + 2, "",
idx, plongest (type->field (idx).loc_bitpos ()), idx, plongest (type->field (idx).loc_bitpos ()),
TYPE_FIELD_BITSIZE (type, idx)); TYPE_FIELD_BITSIZE (type, idx));
gdb_print_host_address (type->field (idx).type (), gdb_stdout); printf_filtered ("%s name '%s' (%s)\n",
printf_filtered (" name '%s' (", host_address_to_string (type->field (idx).type ()),
type->field (idx).name () != NULL type->field (idx).name () != NULL
? type->field (idx).name () ? type->field (idx).name ()
: "<NULL>"); : "<NULL>",
gdb_print_host_address (type->field (idx).name (), gdb_stdout); host_address_to_string (type->field (idx).name ()));
printf_filtered (")\n");
if (type->field (idx).type () != NULL) if (type->field (idx).type () != NULL)
{ {
recursive_dump_type (type->field (idx).type (), spaces + 4); recursive_dump_type (type->field (idx).type (), spaces + 4);
@ -5366,17 +5345,14 @@ recursive_dump_type (struct type *type, int spaces)
switch (TYPE_SPECIFIC_FIELD (type)) switch (TYPE_SPECIFIC_FIELD (type))
{ {
case TYPE_SPECIFIC_CPLUS_STUFF: case TYPE_SPECIFIC_CPLUS_STUFF:
printf_filtered ("%*scplus_stuff ", spaces, ""); printf_filtered ("%*scplus_stuff %s\n", spaces, "",
gdb_print_host_address (TYPE_CPLUS_SPECIFIC (type), host_address_to_string (TYPE_CPLUS_SPECIFIC (type)));
gdb_stdout);
puts_filtered ("\n");
print_cplus_stuff (type, spaces); print_cplus_stuff (type, spaces);
break; break;
case TYPE_SPECIFIC_GNAT_STUFF: case TYPE_SPECIFIC_GNAT_STUFF:
printf_filtered ("%*sgnat_stuff ", spaces, ""); printf_filtered ("%*sgnat_stuff %s\n", spaces, "",
gdb_print_host_address (TYPE_GNAT_SPECIFIC (type), gdb_stdout); host_address_to_string (TYPE_GNAT_SPECIFIC (type)));
puts_filtered ("\n");
print_gnat_stuff (type, spaces); print_gnat_stuff (type, spaces);
break; break;
@ -5397,9 +5373,8 @@ recursive_dump_type (struct type *type, int spaces)
break; break;
case TYPE_SPECIFIC_SELF_TYPE: case TYPE_SPECIFIC_SELF_TYPE:
printf_filtered ("%*sself_type ", spaces, ""); printf_filtered ("%*sself_type %s\n", spaces, "",
gdb_print_host_address (TYPE_SELF_TYPE (type), gdb_stdout); host_address_to_string (TYPE_SELF_TYPE (type)));
puts_filtered ("\n");
break; break;
case TYPE_SPECIFIC_FIXED_POINT: case TYPE_SPECIFIC_FIXED_POINT:

View file

@ -766,21 +766,17 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
fprintf_filtered (outfile, "\nPartial symtab for source file %s ", fprintf_filtered (outfile, "\nPartial symtab for source file %s ",
psymtab->filename); psymtab->filename);
} }
fprintf_filtered (outfile, "(object "); fprintf_filtered (outfile, "(object %s)\n\n",
gdb_print_host_address (psymtab, outfile); host_address_to_string (psymtab));
fprintf_filtered (outfile, ")\n\n"); fprintf_filtered (outfile, " Read from object file %s (%s)\n",
fprintf_filtered (outfile, " Read from object file %s (", objfile_name (objfile),
objfile_name (objfile)); host_address_to_string (objfile));
gdb_print_host_address (objfile, outfile);
fprintf_filtered (outfile, ")\n");
if (psymtab->readin_p (objfile)) if (psymtab->readin_p (objfile))
{ fprintf_filtered
fprintf_filtered (outfile, (outfile,
" Full symtab was read (at "); " Full symtab was read (at %s)\n",
gdb_print_host_address (psymtab->get_compunit_symtab (objfile), outfile); host_address_to_string (psymtab->get_compunit_symtab (objfile)));
fprintf_filtered (outfile, ")\n");
}
fprintf_filtered (outfile, " Symbols cover text addresses "); fprintf_filtered (outfile, " Symbols cover text addresses ");
fputs_filtered (paddress (gdbarch, psymtab->text_low (objfile)), outfile); fputs_filtered (paddress (gdbarch, psymtab->text_low (objfile)), outfile);
@ -792,18 +788,11 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n", fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n",
psymtab->number_of_dependencies); psymtab->number_of_dependencies);
for (i = 0; i < psymtab->number_of_dependencies; i++) for (i = 0; i < psymtab->number_of_dependencies; i++)
{ fprintf_filtered (outfile, " %d %s\n", i,
fprintf_filtered (outfile, " %d ", i); host_address_to_string (psymtab->dependencies[i]));
gdb_print_host_address (psymtab->dependencies[i], outfile);
fprintf_filtered (outfile, " %s\n",
psymtab->dependencies[i]->filename);
}
if (psymtab->user != NULL) if (psymtab->user != NULL)
{ fprintf_filtered (outfile, " Shared partial symtab with user %s\n",
fprintf_filtered (outfile, " Shared partial symtab with user "); host_address_to_string (psymtab->user));
gdb_print_host_address (psymtab->user, outfile);
fprintf_filtered (outfile, "\n");
}
if (!psymtab->global_psymbols.empty ()) if (!psymtab->global_psymbols.empty ())
{ {
print_partial_symbols print_partial_symbols
@ -881,12 +870,9 @@ psymbol_functions::dump (struct objfile *objfile)
for (psymtab = m_partial_symtabs->psymtabs; for (psymtab = m_partial_symtabs->psymtabs;
psymtab != NULL; psymtab != NULL;
psymtab = psymtab->next) psymtab = psymtab->next)
{ printf_filtered ("%s at %s\n",
printf_filtered ("%s at ", psymtab->filename,
psymtab->filename); host_address_to_string (psymtab));
gdb_print_host_address (psymtab, gdb_stdout);
printf_filtered ("\n");
}
printf_filtered ("\n\n"); printf_filtered ("\n\n");
} }
} }

View file

@ -113,11 +113,9 @@ static void
dump_objfile (struct objfile *objfile) dump_objfile (struct objfile *objfile)
{ {
printf_filtered ("\nObject file %s: ", objfile_name (objfile)); printf_filtered ("\nObject file %s: ", objfile_name (objfile));
printf_filtered ("Objfile at "); printf_filtered ("Objfile at %s, bfd at %s, %d minsyms\n\n",
gdb_print_host_address (objfile, gdb_stdout); host_address_to_string (objfile),
printf_filtered (", bfd at "); host_address_to_string (objfile->obfd),
gdb_print_host_address (objfile->obfd, gdb_stdout);
printf_filtered (", %d minsyms\n\n",
objfile->per_bfd->minimal_symbol_count); objfile->per_bfd->minimal_symbol_count);
objfile->dump (); objfile->dump ();
@ -129,9 +127,9 @@ dump_objfile (struct objfile *objfile)
{ {
for (symtab *symtab : compunit_filetabs (cu)) for (symtab *symtab : compunit_filetabs (cu))
{ {
printf_filtered ("%s at ", printf_filtered ("%s at %s",
symtab_to_filename_for_display (symtab)); symtab_to_filename_for_display (symtab),
gdb_print_host_address (symtab, gdb_stdout); host_address_to_string (symtab));
if (SYMTAB_OBJFILE (symtab) != objfile) if (SYMTAB_OBJFILE (symtab) != objfile)
printf_filtered (", NOT ON CHAIN!"); printf_filtered (", NOT ON CHAIN!");
printf_filtered ("\n"); printf_filtered ("\n");
@ -253,10 +251,9 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
if (SYMTAB_DIRNAME (symtab) != NULL) if (SYMTAB_DIRNAME (symtab) != NULL)
fprintf_filtered (outfile, "Compilation directory is %s\n", fprintf_filtered (outfile, "Compilation directory is %s\n",
SYMTAB_DIRNAME (symtab)); SYMTAB_DIRNAME (symtab));
fprintf_filtered (outfile, "Read from object file %s (", fprintf_filtered (outfile, "Read from object file %s (%s)\n",
objfile_name (objfile)); objfile_name (objfile),
gdb_print_host_address (objfile, outfile); host_address_to_string (objfile));
fprintf_filtered (outfile, ")\n");
fprintf_filtered (outfile, "Language: %s\n", fprintf_filtered (outfile, "Language: %s\n",
language_str (symtab->language)); language_str (symtab->language));
@ -286,14 +283,12 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
{ {
b = BLOCKVECTOR_BLOCK (bv, i); b = BLOCKVECTOR_BLOCK (bv, i);
depth = block_depth (b) * 2; depth = block_depth (b) * 2;
fprintf_filtered (outfile, "%*sblock #%03d, object at ", fprintf_filtered (outfile, "%*sblock #%03d, object at %s",
depth, "", i); depth, "", i,
gdb_print_host_address (b, outfile); host_address_to_string (b));
if (BLOCK_SUPERBLOCK (b)) if (BLOCK_SUPERBLOCK (b))
{ fprintf_filtered (outfile, " under %s",
fprintf_filtered (outfile, " under "); host_address_to_string (BLOCK_SUPERBLOCK (b)));
gdb_print_host_address (BLOCK_SUPERBLOCK (b), outfile);
}
/* drow/2002-07-10: We could save the total symbols count /* drow/2002-07-10: We could save the total symbols count
even if we're using a hashtable, but nothing else but this message even if we're using a hashtable, but nothing else but this message
wants it. */ wants it. */
@ -633,16 +628,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
break; break;
case LOC_BLOCK: case LOC_BLOCK:
fprintf_filtered (outfile, "block object "); fprintf_filtered
gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile); (outfile, "block object %s, %s..%s",
fprintf_filtered (outfile, ", "); host_address_to_string (SYMBOL_BLOCK_VALUE (symbol)),
fputs_filtered (paddress (gdbarch, paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))), paddress (gdbarch, BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))));
outfile);
fprintf_filtered (outfile, "..");
fputs_filtered (paddress (gdbarch,
BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))),
outfile);
if (section) if (section)
fprintf_filtered (outfile, " section %s", fprintf_filtered (outfile, " section %s",
bfd_section_name (section->the_bfd_section)); bfd_section_name (section->the_bfd_section));

View file

@ -779,14 +779,6 @@ uinteger_pow (ULONGEST v1, LONGEST v2)
} }
} }
/* Print a host address. */
void
gdb_print_host_address_1 (const void *addr, struct ui_file *stream)
{
fprintf_filtered (stream, "%s", host_address_to_string (addr));
}
/* An RAII class that sets up to handle input and then tears down /* An RAII class that sets up to handle input and then tears down

View file

@ -528,13 +528,6 @@ extern void fputs_highlighted (const char *str, const compiled_regex &highlight,
extern void reset_terminal_style (struct ui_file *stream); extern void reset_terminal_style (struct ui_file *stream);
/* Display the host ADDR on STREAM formatted as ``0x%x''. */
extern void gdb_print_host_address_1 (const void *addr, struct ui_file *stream);
/* Wrapper that avoids adding a pointless cast to all callers. */
#define gdb_print_host_address(ADDR, STREAM) \
gdb_print_host_address_1 ((const void *) ADDR, STREAM)
/* Return the address only having significant bits. */ /* Return the address only having significant bits. */
extern CORE_ADDR address_significant (gdbarch *gdbarch, CORE_ADDR addr); extern CORE_ADDR address_significant (gdbarch *gdbarch, CORE_ADDR addr);