* Makefile.in (xcoffread.o): Depend on partial-stab.h.
authorJim Kingdon <jkingdon@engr.sgi.com>
Thu, 18 May 1995 05:24:29 +0000 (05:24 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Thu, 18 May 1995 05:24:29 +0000 (05:24 +0000)
* xcoffsolib.c (sharedlibrary_command): New command.
* xcoffsolib.c (solib_info): Call xcoff_relocate_symtab.
* xcoffsolib.c: Miscellaneous cleanups.

* partial-stab.h: Ignore symbol descriptor '-' (for local
variables with negative type numbers) without complaint.

* rs6000-nat.c (vmap_ldinfo): Use bfd_stat rather than our own
local emulation thereof.  Remove unused variable ostart.

gdb/ChangeLog
gdb/partial-stab.h
gdb/rs6000-nat.c
gdb/xcoffsolib.c

index 646fdbd5ae595899341457f280158043c0f12a8d..a9ec6ce78d978cf871c0cd16fd9dd58fadec11a9 100644 (file)
@@ -1,3 +1,17 @@
+Wed May 17 11:21:32 1995  Jim Kingdon  <kingdon@deneb.cygnus.com>
+
+       * Makefile.in (xcoffread.o): Depend on partial-stab.h.
+
+       * xcoffsolib.c (sharedlibrary_command): New command.
+       * xcoffsolib.c (solib_info): Call xcoff_relocate_symtab.
+       * xcoffsolib.c: Miscellaneous cleanups.
+
+       * partial-stab.h: Ignore symbol descriptor '-' (for local
+       variables with negative type numbers) without complaint.
+
+       * rs6000-nat.c (vmap_ldinfo): Use bfd_stat rather than our own
+       local emulation thereof.  Remove unused variable ostart.
+
 Wed May 17 15:55:53 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
 
        * Makefile.in (config.status): changed target so that
index a0eafac0e930f56e6cfaa8e26d0c313032b69775..29394395d6d66db0930baba0333adbb6cef11441 100644 (file)
@@ -593,6 +593,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
            case '7':
            case '8':
            case '9':
+           case '-':
              continue;
 
            case ':':
index 042f7ee75ac7aa557f602a741f93f11c3bfe33bc..8fac1d847a12aee646cda8beed935922c369312d 100644 (file)
@@ -435,7 +435,6 @@ vmap_ldinfo (ldi)
   struct stat ii, vi;
   register struct vmap *vp;
   int got_one, retried;
-  CORE_ADDR ostart;
   int got_exec_file;
 
   /* For each *ldi, see if we have a corresponding *vp.
@@ -453,8 +452,6 @@ vmap_ldinfo (ldi)
   retry:
     for (got_one = 0, vp = vmap; vp; vp = vp->nxt)
       {
-       FILE *io;
-
        /* First try to find a `vp', which is the same as in ldinfo.
           If not the same, just continue and grep the next `vp'. If same,
           relocate its tstart, tend, dstart, dend values. If no such `vp'
@@ -467,14 +464,14 @@ vmap_ldinfo (ldi)
            || (memb[0] && !STREQ(memb, vp->member)))
          continue;
 
-       io = bfd_cache_lookup (vp->bfd);                /* totally opaque! */
-       if (!io)
-         fatal ("cannot find BFD's iostream for %s", vp->name);
-
        /* See if we are referring to the same file. */
-       /* An error here is innocuous, most likely meaning that
-          the file descriptor has become worthless. */
-       if (fstat (fileno(io), &vi) < 0)
+       if (bfd_stat (vp->bfd, &vi) < 0)
+         /* An error here is innocuous, most likely meaning that
+            the file descriptor has become worthless.
+            FIXME: What does it mean for a file descriptor to become
+            "worthless"?  What makes it happen?  What error does it
+            produce (ENOENT? others?)?  Should we at least provide
+            a warning?  */
          continue;
 
        if (ii.st_dev != vi.st_dev || ii.st_ino != vi.st_ino)
@@ -485,8 +482,7 @@ vmap_ldinfo (ldi)
 
        ++got_one;
 
-       /* found a corresponding VMAP. remap! */
-       ostart = vp->tstart;
+       /* Found a corresponding VMAP.  Remap!  */
 
        /* We can assume pointer == CORE_ADDR, this code is native only.  */
        vp->tstart = (CORE_ADDR) ldi->ldinfo_textorg;
@@ -507,7 +503,7 @@ vmap_ldinfo (ldi)
        /* relocate symbol table(s). */
        vmap_symtab (vp);
 
-       /* there may be more, so we don't break out of the loop. */
+       /* There may be more, so we don't break out of the loop.  */
       }
 
     /* if there was no matching *vp, we must perforce create the sucker(s) */
index 590de2cc66ea782e4326d1be4cf448ac5d0d03e2..0c98bece55e3b65c8f90bf161cc5b22bf4ce7fc7 100644 (file)
@@ -18,12 +18,15 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+#if 0
 #include <sys/types.h>
 #include <sys/ldr.h>
+#endif
 
 #include "defs.h"
 #include "bfd.h"
 #include "xcoffsolib.h"
+#include "inferior.h"
 
 #ifdef SOLIB_SYMBOLS_MANUAL
 
@@ -146,56 +149,63 @@ CORE_ADDR addr;
    return "(unknown load module)";
 }
 
+static void solib_info PARAMS ((char *, int));
 
-solib_info (ldi)
-register struct ld_info *ldi;
+static void
+solib_info (args, from_tty)
+     char *args;
+     int from_tty;
 {
+  struct vmap *vp = vmap;
 
-   struct vmap *vp = vmap;
+  /* Check for new shared libraries loaded with load ().  */
+  xcoff_relocate_symtab (inferior_pid);
 
-   if (!vp || !vp->nxt) {
-     printf_unfiltered("No shared libraries loaded at this time.\n");  
-     return;
-   }
+  if (vp == NULL || vp->nxt == NULL)
+    {
+      printf_unfiltered ("No shared libraries loaded at this time.\n");        
+      return;
+    }
 
-   /* skip over the first vmap, it is the main program, always loaded. */
-   vp = vp->nxt;
+  /* Skip over the first vmap, it is the main program, always loaded.  */
+  vp = vp->nxt;
 
-   printf_unfiltered ("\
+  printf_unfiltered ("\
 Text Range             Data Range              Syms    Shared Object Library\n");
 
-   for (; vp; vp = vp->nxt) {
-
-     printf_unfiltered ("0x%08x-0x%08x 0x%08x-0x%08x   %s      %s%s%s%s\n",
-       vp->tstart, vp->tend,
-       vp->dstart, vp->dend,
-       vp->loaded ? "Yes" : "No ",
-       *vp->member ? "(" : "",
-       vp->member,
-       *vp->member ? ") " : "",
-       vp->name);
-   }
+  for (; vp != NULL; vp = vp->nxt)
+    {
+      printf_unfiltered ("0x%08x-0x%08x        0x%08x-0x%08x   %s      %s%s%s%s\n",
+                        vp->tstart, vp->tend,
+                        vp->dstart, vp->dend,
+                        vp->loaded ? "Yes" : "No ",
+                        *vp->member ? "(" : "",
+                        vp->member,
+                        *vp->member ? ") " : "",
+                        vp->name);
+    }
 }
 
-#ifdef SOLIB_SYMBOLS_MANUAL
 void
 sharedlibrary_command (args, from_tty)
-  char *args;
-  int from_tty;
+     char *args;
+     int from_tty;
 {
-  dont_repeat();
+  dont_repeat ();
+
+  /* Check for new shared libraries loaded with load ().  */
+  xcoff_relocate_symtab (inferior_pid);
+
+#ifdef SOLIB_SYMBOLS_MANUAL
   solib_add (args, from_tty, (struct target_ops *)0);
-}
 #endif /* SOLIB_SYMBOLS_MANUAL */
+}
 
 void
 _initialize_solib()
 {
-
-#ifdef SOLIB_SYMBOLS_MANUAL
-  add_com("sharedlibrary", class_files, sharedlibrary_command,
+  add_com ("sharedlibrary", class_files, sharedlibrary_command,
           "Load shared object library symbols for files matching REGEXP.");
-#endif
-  add_info("sharedlibrary", solib_info, 
-          "Status of loaded shared object libraries");
+  add_info ("sharedlibrary", solib_info, 
+           "Status of loaded shared object libraries");
 }
This page took 0.030712 seconds and 4 git commands to generate.