summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-02-09 23:50:55 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-02-09 23:50:55 +0000
commite36310bc531ae81a439a925f3259d50671ff2085 (patch)
tree01c8106031b30386cf94898ee235fe4a0b93d9a5 /gdb/symfile.c
parent133ed28118e101f911bc317504e7dde86061c63a (diff)
downloadgdb-e36310bc531ae81a439a925f3259d50671ff2085.tar.gz
2004-02-09 Elena Zannoni <ezannoni@redhat.com>
* bcache.c (bcache_xmalloc): Use obstack_init instead of obstack_specify_allocation. * objfiles.c (allocate_objfile): Ditto. * solib-sunos.c (solib_add_common_symbols) (allocate_rt_common_objfile): Ditto. * symfile.c (reread_symbols): Ditto. * gdb_obstack.h: Add comment.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 13bfec3e288..7e16d457161 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1933,12 +1933,13 @@ reread_symbols (void)
/* We never make this a mapped file. */
objfile->md = NULL;
- /* obstack_specify_allocation also initializes the obstack so
- it is empty. */
objfile->psymbol_cache = bcache_xmalloc ();
objfile->macro_cache = bcache_xmalloc ();
- obstack_specify_allocation (&objfile->objfile_obstack, 0, 0,
- xmalloc, xfree);
+ /* obstack_init also initializes the obstack so it is
+ empty. We could use obstack_specify_allocation but
+ gdb_obstack.h specifies the alloc/dealloc
+ functions. */
+ obstack_init (&objfile->objfile_obstack);
if (build_objfile_section_table (objfile))
{
error ("Can't find the file sections in `%s': %s",