2003-01-31 Frank Ch. Eigler <fche@redhat.com>
[deliverable/binutils-gdb.git] / gdb / solib-sunos.c
index 304657c52eac53c2f48e05fa74e30b3cae6e3336..ae115673c2b5719a19028d27464a531e49bddc04 100644 (file)
@@ -39,6 +39,8 @@
 #include "gdbcore.h"
 #include "inferior.h"
 #include "solist.h"
+#include "bcache.h"
+#include "regcache.h"
 
 /* Link map info to include in an allocated so_list entry */
 
@@ -135,8 +137,8 @@ allocate_rt_common_objfile (void)
   objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
   memset (objfile, 0, sizeof (struct objfile));
   objfile->md = NULL;
-  obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
-                             xmalloc, xfree);
+  objfile->psymbol_cache = bcache_xmalloc ();
+  objfile->macro_cache = bcache_xmalloc ();
   obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0, xmalloc,
                              xfree);
   obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
@@ -728,8 +730,8 @@ sunos_relocate_main_executable (void)
       displacement = pc - bfd_get_start_address (exec_bfd);
       changed = 0;
 
-      new_offsets = xcalloc (sizeof (struct section_offsets),
-                            symfile_objfile->num_sections);
+      new_offsets = xcalloc (symfile_objfile->num_sections,
+                            sizeof (struct section_offsets));
       old_chain = make_cleanup (xfree, new_offsets);
 
       for (i = 0; i < symfile_objfile->num_sections; i++)
This page took 0.024598 seconds and 4 git commands to generate.