2001-12-02 Andrew Cagney <ac131313@redhat.com>
+ * coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c, hpread.c,
+ nlmread.c, objfiles.c, os9kread.c, somread.c, source.c, symfile.c,
+ symmisc.c, xcoffread.c: Use xmfree instead of mfree.
+
* jv-lang.c (add_class_symtab_symbol): Use xmrealloc instead of
mrealloc.
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
/* Let stabs reader clean up */
}
xfree (hfiles);
}
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
free_header_files ();
}
static void
free_bincl_list (struct objfile *objfile)
{
- mfree (objfile->md, (PTR) bincl_list);
+ xmfree (objfile->md, (PTR) bincl_list);
bincls_allocated = 0;
}
while (ssi)
{
nssi = ssi->next;
- mfree (objfile->md, ssi);
+ xmfree (objfile->md, ssi);
ssi = nssi;
}
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
}
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
\f
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
\f
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
objfile->mmfd = fd;
/* Update pointers to functions to *our* copies */
obstack_chunkfun (&objfile->psymbol_cache.cache, xmmalloc);
- obstack_freefun (&objfile->psymbol_cache.cache, mfree);
+ obstack_freefun (&objfile->psymbol_cache.cache, xmfree);
obstack_chunkfun (&objfile->psymbol_obstack, xmmalloc);
- obstack_freefun (&objfile->psymbol_obstack, mfree);
+ obstack_freefun (&objfile->psymbol_obstack, xmfree);
obstack_chunkfun (&objfile->symbol_obstack, xmmalloc);
- obstack_freefun (&objfile->symbol_obstack, mfree);
+ obstack_freefun (&objfile->symbol_obstack, xmfree);
obstack_chunkfun (&objfile->type_obstack, xmmalloc);
- obstack_freefun (&objfile->type_obstack, mfree);
+ obstack_freefun (&objfile->type_obstack, xmfree);
/* If already in objfile list, unlink it. */
unlink_objfile (objfile);
/* Forget things specific to a particular gdb, may have changed. */
objfile->flags |= OBJF_MAPPED;
mmalloc_setkey (objfile->md, 0, objfile);
obstack_specify_allocation_with_arg (&objfile->psymbol_cache.cache,
- 0, 0, xmmalloc, mfree,
+ 0, 0, xmmalloc, xmfree,
objfile->md);
obstack_specify_allocation_with_arg (&objfile->psymbol_obstack,
- 0, 0, xmmalloc, mfree,
+ 0, 0, xmmalloc, xmfree,
objfile->md);
obstack_specify_allocation_with_arg (&objfile->symbol_obstack,
- 0, 0, xmmalloc, mfree,
+ 0, 0, xmmalloc, xmfree,
objfile->md);
obstack_specify_allocation_with_arg (&objfile->type_obstack,
- 0, 0, xmmalloc, mfree,
+ 0, 0, xmmalloc, xmfree,
objfile->md);
}
}
objfile->obfd = abfd;
if (objfile->name != NULL)
{
- mfree (objfile->md, objfile->name);
+ xmfree (objfile->md, objfile->name);
}
if (abfd != NULL)
{
clear_pc_function_cache ();
/* The last thing we do is free the objfile struct itself for the
- non-reusable case, or detach from the mapped file for the reusable
- case. Note that the mmalloc_detach or the mfree is the last thing
- we can do with this objfile. */
+ non-reusable case, or detach from the mapped file for the
+ reusable case. Note that the mmalloc_detach or the xmfree() is
+ the last thing we can do with this objfile. */
#if defined(USE_MMALLOC) && defined(HAVE_MMAP)
{
if (objfile->name != NULL)
{
- mfree (objfile->md, objfile->name);
+ xmfree (objfile->md, objfile->name);
}
if (objfile->global_psymbols.list)
- mfree (objfile->md, objfile->global_psymbols.list);
+ xmfree (objfile->md, objfile->global_psymbols.list);
if (objfile->static_psymbols.list)
- mfree (objfile->md, objfile->static_psymbols.list);
+ xmfree (objfile->md, objfile->static_psymbols.list);
/* Free the obstacks for non-reusable objfiles */
free_bcache (&objfile->psymbol_cache);
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
obstack_free (&objfile->type_obstack, 0);
- mfree (objfile->md, objfile);
+ xmfree (objfile->md, objfile);
objfile = NULL;
}
}
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
/*
free_header_files ();
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
hpread_symfile_finish (objfile);
}
{
if (s->line_charpos != NULL)
{
- mfree (objfile->md, s->line_charpos);
+ xmfree (objfile->md, s->line_charpos);
s->line_charpos = NULL;
}
if (s->fullname != NULL)
{
- mfree (objfile->md, s->fullname);
+ xmfree (objfile->md, s->fullname);
s->fullname = NULL;
}
}
if (result >= 0)
return result;
/* Didn't work -- free old one, try again. */
- mfree (s->objfile->md, s->fullname);
+ xmfree (s->objfile->md, s->fullname);
s->fullname = NULL;
}
/* FIXME: Do we have to free a whole linked list, or is this
enough? */
if (objfile->global_psymbols.list)
- mfree (objfile->md, objfile->global_psymbols.list);
+ xmfree (objfile->md, objfile->global_psymbols.list);
memset (&objfile->global_psymbols, 0,
sizeof (objfile->global_psymbols));
if (objfile->static_psymbols.list)
- mfree (objfile->md, objfile->static_psymbols.list);
+ xmfree (objfile->md, objfile->static_psymbols.list);
memset (&objfile->static_psymbols, 0,
sizeof (objfile->static_psymbols));
if (objfile->global_psymbols.list)
{
- mfree (objfile->md, (PTR) objfile->global_psymbols.list);
+ xmfree (objfile->md, (PTR) objfile->global_psymbols.list);
}
if (objfile->static_psymbols.list)
{
- mfree (objfile->md, (PTR) objfile->static_psymbols.list);
+ xmfree (objfile->md, (PTR) objfile->static_psymbols.list);
}
/* Current best guess is that approximately a twentieth
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
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
/* Start with a fresh include table for the next objfile. */