/* Prototypes for local functions */
-static int block_depth (struct block *);
+static int block_depth (const struct block *);
static void print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
int depth, ui_file *outfile);
QUIT;
printf_filtered (_("Byte cache statistics for '%s':\n"),
objfile_name (objfile));
- print_bcache_statistics
- (psymbol_bcache_get_bcache (objfile->partial_symtabs->psymbol_cache),
- "partial symbol cache");
- print_bcache_statistics (objfile->per_bfd->macro_cache,
- "preprocessor macro cache");
- print_bcache_statistics (objfile->per_bfd->filename_cache,
- "file name cache");
+ objfile->partial_symtabs->psymbol_cache.print_statistics
+ ("partial symbol cache");
+ objfile->per_bfd->macro_cache.print_statistics
+ ("preprocessor macro cache");
+ objfile->per_bfd->filename_cache.print_statistics ("file name cache");
}
}
->storage_obstack)));
printf_filtered
(_(" Total memory used for psymbol cache: %d\n"),
- bcache_memory_used (psymbol_bcache_get_bcache
- (objfile->partial_symtabs->psymbol_cache)));
+ objfile->partial_symtabs->psymbol_cache.memory_used ());
printf_filtered (_(" Total memory used for macro cache: %d\n"),
- bcache_memory_used (objfile->per_bfd->macro_cache));
+ objfile->per_bfd->macro_cache.memory_used ());
printf_filtered (_(" Total memory used for file name cache: %d\n"),
- bcache_memory_used (objfile->per_bfd->filename_cache));
+ objfile->per_bfd->filename_cache.memory_used ());
}
}
struct linetable *l;
const struct blockvector *bv;
struct symbol *sym;
- struct block *b;
+ const struct block *b;
int depth;
fprintf_filtered (outfile, "\nSymtab for file %s\n",
block, not any blocks from included symtabs. */
ALL_DICT_SYMBOLS (BLOCK_MULTIDICT (b), miter, sym)
{
- TRY
+ try
{
print_symbol (gdbarch, sym, depth + 1, outfile);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
exception_fprintf (gdb_stderr, ex,
"Error printing symbol:\n");
}
- END_CATCH
}
}
fprintf_filtered (outfile, "\n");
if (symtab->language != language_unknown
&& symtab->language != language_auto)
{
- enum language saved_lang;
-
- saved_lang = set_language (symtab->language);
-
+ scoped_restore_current_language save_lang;
+ set_language (symtab->language);
dump_symtab_1 (symtab, outfile);
-
- set_language (saved_lang);
}
else
dump_symtab_1 (symtab, outfile);
unsigned i;
struct type *type = check_typedef (SYMBOL_TYPE (symbol));
- fprintf_filtered (outfile, "const %u hex bytes:",
- TYPE_LENGTH (type));
+ fprintf_filtered (outfile, "const %s hex bytes:",
+ pulongest (TYPE_LENGTH (type)));
for (i = 0; i < TYPE_LENGTH (type); i++)
fprintf_filtered (outfile, " %02x",
(unsigned) SYMBOL_VALUE_BYTES (symbol)[i]);
/* Return the nexting depth of a block within other blocks in its symtab. */
static int
-block_depth (struct block *block)
+block_depth (const struct block *block)
{
int i = 0;