aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/dbxread.c4
-rw-r--r--gdb/elfread.c4
-rw-r--r--gdb/hp-psymtab-read.c2
-rw-r--r--gdb/hpread.c2
-rw-r--r--gdb/nlmread.c2
-rw-r--r--gdb/objfiles.c32
-rw-r--r--gdb/os9kread.c2
-rw-r--r--gdb/somread.c2
-rw-r--r--gdb/source.c6
-rw-r--r--gdb/symfile.c8
-rw-r--r--gdb/symmisc.c20
-rw-r--r--gdb/xcoffread.c2
14 files changed, 48 insertions, 44 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8ebc041..d7dabb8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
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.
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 7b93f3d..7e655d4 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -713,7 +713,7 @@ coff_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
/* Let stabs reader clean up */
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 08ff814..61bd930 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -788,7 +788,7 @@ dbx_symfile_finish (struct objfile *objfile)
}
xfree (hfiles);
}
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
free_header_files ();
}
@@ -1051,7 +1051,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
static void
free_bincl_list (struct objfile *objfile)
{
- mfree (objfile->md, (PTR) bincl_list);
+ xmfree (objfile->md, (PTR) bincl_list);
bincls_allocated = 0;
}
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 4394e5a..84807c0 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -678,7 +678,7 @@ free_elfinfo (PTR objp)
while (ssi)
{
nssi = ssi->next;
- mfree (objfile->md, ssi);
+ xmfree (objfile->md, ssi);
ssi = nssi;
}
@@ -709,7 +709,7 @@ elf_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
}
diff --git a/gdb/hp-psymtab-read.c b/gdb/hp-psymtab-read.c
index 349ab18..6aba9e1 100644
--- a/gdb/hp-psymtab-read.c
+++ b/gdb/hp-psymtab-read.c
@@ -2073,7 +2073,7 @@ hpread_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
diff --git a/gdb/hpread.c b/gdb/hpread.c
index afd0b0a..f044ebe 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -625,7 +625,7 @@ hpread_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
diff --git a/gdb/nlmread.c b/gdb/nlmread.c
index e4c4970..eaa9dde 100644
--- a/gdb/nlmread.c
+++ b/gdb/nlmread.c
@@ -224,7 +224,7 @@ nlm_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- mfree (objfile->md, objfile->sym_private);
+ xmfree (objfile->md, objfile->sym_private);
}
}
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 73ef667..e0a69ca 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -187,13 +187,13 @@ allocate_objfile (bfd *abfd, int flags)
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. */
@@ -216,16 +216,16 @@ allocate_objfile (bfd *abfd, int flags)
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);
}
}
@@ -280,7 +280,7 @@ allocate_objfile (bfd *abfd, int flags)
objfile->obfd = abfd;
if (objfile->name != NULL)
{
- mfree (objfile->md, objfile->name);
+ xmfree (objfile->md, objfile->name);
}
if (abfd != NULL)
{
@@ -440,9 +440,9 @@ free_objfile (struct objfile *objfile)
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)
@@ -467,18 +467,18 @@ free_objfile (struct objfile *objfile)
{
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;
}
}
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index a7448d4..498498b 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -415,7 +415,7 @@ os9k_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
/*
free_header_files ();
diff --git a/gdb/somread.c b/gdb/somread.c
index 5afb15c..aba3323 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -423,7 +423,7 @@ som_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
- mfree (objfile->md, objfile->sym_stab_info);
+ xmfree (objfile->md, objfile->sym_stab_info);
}
hpread_symfile_finish (objfile);
}
diff --git a/gdb/source.c b/gdb/source.c
index afdc025..d04f886 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -241,12 +241,12 @@ forget_cached_source_info (void)
{
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;
}
}
@@ -682,7 +682,7 @@ open_source_file (struct symtab *s)
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;
}
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d5aeba3..ca86f28 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1667,11 +1667,11 @@ reread_symbols (void)
/* 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));
@@ -2417,11 +2417,11 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
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
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index f440f07..3c12988 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -89,10 +89,10 @@ free_symtab_block (struct objfile *objfile, struct block *b)
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.
@@ -126,7 +126,7 @@ free_symtab (register 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:
@@ -134,22 +134,22 @@ free_symtab (register struct symtab *s)
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
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 375d658..965473a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1860,7 +1860,7 @@ xcoff_symfile_finish (struct objfile *objfile)
{
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. */