#include "gdbcmd.h"
#include "source.h"
#include "readline/tilde.h"
+#include <cli/cli-style.h>
/* Prototypes for local functions */
dump_objfile (struct objfile *objfile)
{
printf_filtered ("\nObject file %s: ", objfile_name (objfile));
- printf_filtered ("Objfile at ");
- gdb_print_host_address (objfile, gdb_stdout);
- printf_filtered (", bfd at ");
- gdb_print_host_address (objfile->obfd, gdb_stdout);
- printf_filtered (", %d minsyms\n\n",
+ printf_filtered ("Objfile at %s, bfd at %s, %d minsyms\n\n",
+ host_address_to_string (objfile),
+ host_address_to_string (objfile->obfd),
objfile->per_bfd->minimal_symbol_count);
objfile->dump ();
{
for (symtab *symtab : compunit_filetabs (cu))
{
- printf_filtered ("%s at ",
- symtab_to_filename_for_display (symtab));
- gdb_print_host_address (symtab, gdb_stdout);
+ printf_filtered ("%s at %s",
+ symtab_to_filename_for_display (symtab),
+ host_address_to_string (symtab));
if (SYMTAB_OBJFILE (symtab) != objfile)
printf_filtered (", NOT ON CHAIN!");
printf_filtered ("\n");
if (SYMTAB_DIRNAME (symtab) != NULL)
fprintf_filtered (outfile, "Compilation directory is %s\n",
SYMTAB_DIRNAME (symtab));
- fprintf_filtered (outfile, "Read from object file %s (",
- objfile_name (objfile));
- gdb_print_host_address (objfile, outfile);
- fprintf_filtered (outfile, ")\n");
+ fprintf_filtered (outfile, "Read from object file %s (%s)\n",
+ objfile_name (objfile),
+ host_address_to_string (objfile));
fprintf_filtered (outfile, "Language: %s\n",
language_str (symtab->language));
{
b = BLOCKVECTOR_BLOCK (bv, i);
depth = block_depth (b) * 2;
- print_spaces (depth, outfile);
- fprintf_filtered (outfile, "block #%03d, object at ", i);
- gdb_print_host_address (b, outfile);
+ fprintf_filtered (outfile, "%*sblock #%03d, object at %s",
+ depth, "", i,
+ host_address_to_string (b));
if (BLOCK_SUPERBLOCK (b))
- {
- fprintf_filtered (outfile, " under ");
- gdb_print_host_address (BLOCK_SUPERBLOCK (b), outfile);
- }
+ fprintf_filtered (outfile, " under %s",
+ host_address_to_string (BLOCK_SUPERBLOCK (b)));
/* drow/2002-07-10: We could save the total symbols count
even if we're using a hashtable, but nothing else but this message
wants it. */
else
section = NULL;
- print_spaces (depth, outfile);
+ print_spaces_filtered (depth, outfile);
if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
{
fprintf_filtered (outfile, "label %s at ", symbol->print_name ());
break;
case LOC_BLOCK:
- fprintf_filtered (outfile, "block object ");
- gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
- fprintf_filtered (outfile, ", ");
- fputs_filtered (paddress (gdbarch,
- BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
- outfile);
- fprintf_filtered (outfile, "..");
- fputs_filtered (paddress (gdbarch,
- BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))),
- outfile);
+ fprintf_filtered
+ (outfile, "block object %s, %s..%s",
+ host_address_to_string (SYMBOL_BLOCK_VALUE (symbol)),
+ paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
+ paddress (gdbarch, BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))));
if (section)
fprintf_filtered (outfile, " section %s",
bfd_section_name (section->the_bfd_section));
struct objfile *objfile;
objfile = symtab->compunit_symtab->objfile;
- printf_filtered (_("objfile: %s ((struct objfile *) %s)\n"),
- objfile_name (objfile),
+ printf_filtered (_("objfile: %ps ((struct objfile *) %s)\n"),
+ styled_string (file_name_style.style (),
+ objfile_name (objfile)),
host_address_to_string (objfile));
- printf_filtered (_("compunit_symtab: ((struct compunit_symtab *) %s)\n"),
+ printf_filtered (_("compunit_symtab: %s ((struct compunit_symtab *) %s)\n"),
+ symtab->compunit_symtab->name,
host_address_to_string (symtab->compunit_symtab));
- printf_filtered (_("symtab: %s ((struct symtab *) %s)\n"),
- symtab_to_fullname (symtab),
+ printf_filtered (_("symtab: %ps ((struct symtab *) %s)\n"),
+ styled_string (file_name_style.style (),
+ symtab_to_fullname (symtab)),
host_address_to_string (symtab));
linetable = SYMTAB_LINETABLE (symtab);
printf_filtered (_("linetable: ((struct linetable *) %s):\n"),
if (regexp == NULL
|| re_exec (symtab_to_filename_for_display (symtab)))
- maintenance_print_one_line_table (symtab, NULL);
+ {
+ maintenance_print_one_line_table (symtab, NULL);
+ printf_filtered ("\n");
+ }
}
}
}