* bfd-in.h (align_power): Cast constants to bfd_vma type.
[deliverable/binutils-gdb.git] / gdb / solib-sunos.c
index b5d95864c0bac111e7687f8eccc3b2f4cb2308e2..374ec253a018453baf58c3b0c33451a23cbae950 100644 (file)
@@ -137,6 +137,8 @@ allocate_rt_common_objfile (void)
   objfile->md = NULL;
   obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
                              xmalloc, xfree);
+  obstack_specify_allocation (&objfile->macro_cache.cache, 0, 0,
+                             xmalloc, xfree);
   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++)
@@ -852,8 +854,7 @@ sunos_solib_create_inferior_hook (void)
       warning ("shared library handler failed to disable breakpoint");
     }
 
-  if (auto_solib_add)
-    solib_add ((char *) 0, 0, (struct target_ops *) 0);
+  solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
 }
 
 static void
This page took 0.024085 seconds and 4 git commands to generate.