1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / osfsolib.c
index ea0720846a3961e8b73267b61e1a1d66aaa113a1..31c9bf998935236ba073d47e17df701d17e8bbbb 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle OSF/1 shared libraries for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright 1993, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
    
 This file is part of GDB.
 
@@ -193,8 +193,8 @@ next_link_map_member PARAMS ((struct so_list *));
 static void
 xfer_link_map_member PARAMS ((struct so_list *, struct link_map *));
 
-static void
-solib_map_sections PARAMS ((struct so_list *));
+static int
+solib_map_sections PARAMS ((char *));
 
 /*
 
@@ -204,7 +204,7 @@ LOCAL FUNCTION
 
 SYNOPSIS
 
-       static void solib_map_sections (struct so_list *so)
+       static int solib_map_sections (struct so_list *so)
 
 DESCRIPTION
 
@@ -223,10 +223,11 @@ FIXMES
        expansion stuff?).
  */
 
-static void
-solib_map_sections (so)
-     struct so_list *so;
+static int
+solib_map_sections (arg)
+     char *arg;
 {
+  struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
   char *filename;
   char *scratch_pathname;
   int scratch_chan;
@@ -288,6 +289,8 @@ solib_map_sections (so)
 
   /* Free the file names, close the file now.  */
   do_cleanups (old_chain);
+
+  return (1);
 }
 
 /*
@@ -485,7 +488,9 @@ xfer_link_map_member (so_list_ptr, lm)
        }
 #endif
 
-      solib_map_sections (so_list_ptr);
+      catch_errors (solib_map_sections, (char *) so_list_ptr,
+                   "Error while mapping shared library sections:\n",
+                   RETURN_MASK_ALL);
     }
 }
 
@@ -570,7 +575,7 @@ symbol_add_stub (arg)
 
   if (so -> textsection)
     text_addr = so -> textsection -> addr;
-  else
+  else if (so -> abfd != NULL)
     {
       asection *lowest_sect;
 
@@ -587,7 +592,7 @@ symbol_add_stub (arg)
   
   so -> objfile = symbol_file_add (so -> so_name, so -> from_tty,
                                   text_addr,
-                                  0, 0, 0);
+                                  0, 0, 0, 0, 1);
   return (1);
 }
 
@@ -830,6 +835,8 @@ clear_solib()
   struct so_list *next;
   char *bfd_filename;
   
+  disable_breakpoints_in_shlibs (1);
+
   while (so_list_head)
     {
       if (so_list_head -> sections)
@@ -846,7 +853,7 @@ clear_solib()
       else
        /* This happens for the executable on SVR4.  */
        bfd_filename = NULL;
-      
+
       next = so_list_head -> next;
       if (bfd_filename)
        free ((PTR)bfd_filename);
This page took 0.024602 seconds and 4 git commands to generate.