n = BLOCK_NSYMS (b);
for (i = 0; i < n; i++)
{
- mfree (objfile->md, SYMBOL_NAME (BLOCK_SYM (b, i)));
- mfree (objfile->md, (PTR) BLOCK_SYM (b, i));
+ xmfree (objfile->md, SYMBOL_NAME (BLOCK_SYM (b, i)));
+ xmfree (objfile->md, (PTR) BLOCK_SYM (b, i));
}
- mfree (objfile->md, (PTR) b);
+ xmfree (objfile->md, (PTR) b);
}
/* Free all the storage associated with the struct symtab <- S.
for (i = 0; i < n; i++)
free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
/* Free the blockvector itself. */
- mfree (s->objfile->md, (PTR) bv);
+ xmfree (s->objfile->md, (PTR) bv);
/* Also free the linetable. */
case free_linetable:
or by some other symtab, except for our linetable.
Free that now. */
if (LINETABLE (s))
- mfree (s->objfile->md, (PTR) LINETABLE (s));
+ xmfree (s->objfile->md, (PTR) LINETABLE (s));
break;
}
/* If there is a single block of memory to free, free it. */
if (s->free_ptr != NULL)
- mfree (s->objfile->md, s->free_ptr);
+ xmfree (s->objfile->md, s->free_ptr);
/* Free source-related stuff */
if (s->line_charpos != NULL)
- mfree (s->objfile->md, (PTR) s->line_charpos);
+ xmfree (s->objfile->md, (PTR) s->line_charpos);
if (s->fullname != NULL)
- mfree (s->objfile->md, s->fullname);
+ xmfree (s->objfile->md, s->fullname);
if (s->debugformat != NULL)
- mfree (s->objfile->md, s->debugformat);
- mfree (s->objfile->md, (PTR) s);
+ xmfree (s->objfile->md, s->debugformat);
+ xmfree (s->objfile->md, (PTR) s);
}
void
int len, blen;
register struct linetable *l;
struct blockvector *bv;
+ struct symbol *sym;
register struct block *b;
int depth;
if (BLOCK_GCC_COMPILED (b))
fprintf_filtered (outfile, ", compiled with gcc%d", BLOCK_GCC_COMPILED (b));
fprintf_filtered (outfile, "\n");
- /* Now print each symbol in this block */
- for (j = 0; j < blen; j++)
+ /* Now print each symbol in this block. */
+ /* FIXMED: Sort? */
+ ALL_BLOCK_SYMBOLS (b, j, sym)
{
struct print_symbol_args s;
- s.symbol = BLOCK_SYM (b, j);
+ s.symbol = sym;
s.depth = depth + 1;
s.outfile = outfile;
catch_errors (print_symbol, &s, "Error printing symbol:\n",
while (length--)
{
sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
- SYMBOL_NAMESPACE (*psym));
+ NULL, SYMBOL_NAMESPACE (*psym));
if (!sym)
{
printf_filtered ("Static symbol `");
while (length--)
{
sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
- SYMBOL_NAMESPACE (*psym));
+ NULL, SYMBOL_NAMESPACE (*psym));
if (!sym)
{
printf_filtered ("Global symbol `");