* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index e3d626f58a9a63ffe6f0011c52383a8970667fe4..8b92b6f37915e8b887f307cc3c6469ab83248cef 100644 (file)
@@ -24,7 +24,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "xcoffsolib.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "libbfd.h"            /* BFD internals (sigh!)  FIXME */
+#include "libbfd.h"  /* For bfd_cache_lookup (FIXME) */
 #include "bfd.h"
 
 #include <sys/ptrace.h>
@@ -502,9 +502,10 @@ vmap_ldinfo (ldi)
          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)
-         fatal ("cannot fstat(fd=%d) the BFD for %s (errno=%d)",
-                fileno(io), vp->name, errno);
+         continue;
 
        if (ii.st_dev != vi.st_dev || ii.st_ino != vi.st_ino)
          continue;
@@ -637,7 +638,8 @@ xcoff_relocate_symtab (pid)
    from the core file.  */
 
 void
-xcoff_relocate_core ()
+xcoff_relocate_core (target)
+     struct target_ops *target;
 {
 /* Offset of member MEMBER in a struct of type TYPE.  */
 #ifndef offsetof
@@ -717,10 +719,11 @@ xcoff_relocate_core ()
       vp->dstart = (CORE_ADDR) ldip->ldinfo_dataorg;
       vp->dend = vp->dstart + ldip->ldinfo_datasize;
 
-      if (vp->tadj != 0) {
-       vp->tstart += vp->tadj;
-       vp->tend += vp->tadj;
-      }
+      if (vp->tadj != 0)
+       {
+         vp->tstart += vp->tadj;
+         vp->tend += vp->tadj;
+       }
 
       /* Unless this is the exec file,
         add our sections to the section table for the core target.  */
@@ -729,13 +732,13 @@ xcoff_relocate_core ()
          int count;
          struct section_table *stp;
          
-         count = core_ops.to_sections_end - core_ops.to_sections;
+         count = target->to_sections_end - target->to_sections;
          count += 2;
-         core_ops.to_sections = (struct section_table *)
-           xrealloc (core_ops.to_sections,
+         target->to_sections = (struct section_table *)
+           xrealloc (target->to_sections,
                      sizeof (struct section_table) * count);
-         core_ops.to_sections_end = core_ops.to_sections + count;
-         stp = core_ops.to_sections_end - 2;
+         target->to_sections_end = target->to_sections + count;
+         stp = target->to_sections_end - 2;
 
          /* "Why do we add bfd_section_vma?", I hear you cry.
             Well, the start of the section in the file is actually
This page took 0.023925 seconds and 4 git commands to generate.