Use address mapping levels for 68hc11 simulator (kill overlap hack)
[deliverable/binutils-gdb.git] / bfd / trad-core.c
index 2a6f69bcfd967c101d586b3b7823f009be19b673..9cd12c04aee8ccb6bae499aac231012e13b7f7ba 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
-   Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 1999
+   Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000
    Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
@@ -25,7 +25,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "libaout.h"           /* BFD a.out internal data structures */
 
 #include <sys/param.h>
-#include <sys/dir.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
 #include <signal.h>
 
 #include <sys/user.h>          /* After a.out.h  */
@@ -112,7 +124,7 @@ trad_unix_core_file_p (abfd)
                                 + u.u_ssize))
        > (unsigned long) statbuf.st_size)
       {
-       bfd_set_error (bfd_error_file_truncated);
+       bfd_set_error (bfd_error_wrong_format);
        return 0;
       }
 #ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
@@ -202,7 +214,7 @@ trad_unix_core_file_p (abfd)
      0 is at the place pointed to by u_ar0 (by setting the vma of the start
      of the section to -u_ar0).  GDB uses this info to locate the regs,
      using minor trickery to get around the offset-or-absolute-addr problem. */
-  core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
+  core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
 
   core_datasec (abfd)->filepos = NBPG * UPAGES;
   core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize
This page took 0.024024 seconds and 4 git commands to generate.