gdb_printf ("\nObject file %s: ", objfile_name (objfile));
gdb_printf ("Objfile at %s, bfd at %s, %d minsyms\n\n",
host_address_to_string (objfile),
- host_address_to_string (objfile->obfd),
+ host_address_to_string (objfile->obfd.get ()),
objfile->per_bfd->minimal_symbol_count);
objfile->dump ();
{
struct objfile *objfile = symtab->compunit ()->objfile ();
struct gdbarch *gdbarch = objfile->arch ();
- int i;
struct mdict_iterator miter;
- int len;
struct linetable *l;
- const struct blockvector *bv;
struct symbol *sym;
- const struct block *b;
int depth;
gdb_printf (outfile, "\nSymtab for file %s at %s\n",
if (l)
{
gdb_printf (outfile, "\nLine table:\n\n");
- len = l->nitems;
- for (i = 0; i < len; i++)
+ int len = l->nitems;
+ for (int i = 0; i < len; i++)
{
gdb_printf (outfile, " line %d at ", l->item[i].line);
gdb_puts (paddress (gdbarch, l->item[i].pc), outfile);
if (is_main_symtab_of_compunit_symtab (symtab))
{
gdb_printf (outfile, "\nBlockvector:\n\n");
- bv = symtab->compunit ()->blockvector ();
- len = BLOCKVECTOR_NBLOCKS (bv);
- for (i = 0; i < len; i++)
+ const blockvector *bv = symtab->compunit ()->blockvector ();
+ for (int i = 0; i < bv->num_blocks (); i++)
{
- b = BLOCKVECTOR_BLOCK (bv, i);
+ const block *b = bv->block (i);
depth = block_depth (b) * 2;
gdb_printf (outfile, "%*sblock #%03d, object at %s",
depth, "", i,
host_address_to_string (b));
- if (BLOCK_SUPERBLOCK (b))
+ if (b->superblock ())
gdb_printf (outfile, " under %s",
- host_address_to_string (BLOCK_SUPERBLOCK (b)));
+ host_address_to_string (b->superblock ()));
/* 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. */
gdb_printf (outfile, ", %d syms/buckets in ",
- mdict_size (BLOCK_MULTIDICT (b)));
+ mdict_size (b->multidict ()));
gdb_puts (paddress (gdbarch, b->start ()), outfile);
gdb_printf (outfile, "..");
gdb_puts (paddress (gdbarch, b->end ()), outfile);
- if (BLOCK_FUNCTION (b))
+ if (b->function ())
{
gdb_printf (outfile, ", function %s",
- BLOCK_FUNCTION (b)->linkage_name ());
- if (BLOCK_FUNCTION (b)->demangled_name () != NULL)
+ b->function ()->linkage_name ());
+ if (b->function ()->demangled_name () != NULL)
{
gdb_printf (outfile, ", %s",
- BLOCK_FUNCTION (b)->demangled_name ());
+ b->function ()->demangled_name ());
}
}
gdb_printf (outfile, "\n");
/* Now print each symbol in this block (in no particular order, if
we're using a hashtable). Note that we only want this
block, not any blocks from included symtabs. */
- ALL_DICT_SYMBOLS (BLOCK_MULTIDICT (b), miter, sym)
+ ALL_DICT_SYMBOLS (b->multidict (), miter, sym)
{
try
{
gdb_printf (outfile, "Compunit user: %s\n", addr);
}
if (cust->includes != nullptr)
- for (i = 0; ; ++i)
+ for (int i = 0; ; ++i)
{
struct compunit_symtab *include = cust->includes[i];
if (include == nullptr)
struct type *type = check_typedef (symbol->type ());
gdb_printf (outfile, "const %s hex bytes:",
- pulongest (TYPE_LENGTH (type)));
- for (i = 0; i < TYPE_LENGTH (type); i++)
+ pulongest (type->length ()));
+ for (i = 0; i < type->length (); i++)
gdb_printf (outfile, " %02x",
(unsigned) symbol->value_bytes ()[i]);
}
{
int i = 0;
- while ((block = BLOCK_SUPERBLOCK (block)) != NULL)
+ while ((block = block->superblock ()) != NULL)
{
i++;
}