Rename DEBUG to SYMBIAN_DEBUG to avoid conflicts with global DEBUG definition
[deliverable/binutils-gdb.git] / bfd / trad-core.c
index dda2e815471bc5b5da2a196660d9c8e9b135954b..cb4111fb9418c59e1d5024d19c82a7fef7d8ad5f 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
    Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004
+   2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
@@ -18,7 +18,7 @@ GNU General Public License for more details.
 
 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -65,8 +65,7 @@ struct trad_core_struct
 const bfd_target *trad_unix_core_file_p PARAMS ((bfd *abfd));
 char * trad_unix_core_file_failing_command PARAMS ((bfd *abfd));
 int trad_unix_core_file_failing_signal PARAMS ((bfd *abfd));
-bfd_boolean trad_unix_core_file_matches_executable_p
-  PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+#define trad_unix_core_file_matches_executable_p generic_core_file_matches_executable_p
 static void swap_abort PARAMS ((void));
 
 /* Handle 4.2-style (and perhaps also sysV-style) core dump file.  */
@@ -109,14 +108,11 @@ trad_unix_core_file_p (abfd)
 
   /* Check that the size claimed is no greater than the file size.  */
   {
-    FILE *stream = bfd_cache_lookup (abfd);
     struct stat statbuf;
 
-    if (fstat (fileno (stream), &statbuf) < 0)
-      {
-       bfd_set_error (bfd_error_system_call);
-       return 0;
-      }
+    if (bfd_stat (abfd, &statbuf) < 0)
+      return 0;
+
     if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
 #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
                                 - u.u_tsize
@@ -256,14 +252,6 @@ trad_unix_core_file_failing_signal (ignore_abfd)
   return -1;           /* FIXME, where is it? */
 #endif
 }
-
-bfd_boolean
-trad_unix_core_file_matches_executable_p  (core_bfd, exec_bfd)
-     bfd *core_bfd ATTRIBUTE_UNUSED;
-     bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
-  return TRUE;         /* FIXME, We have no way of telling at this point */
-}
 \f
 /* If somebody calls any byte-swapping routines, shoot them.  */
 static void
This page took 0.024911 seconds and 4 git commands to generate.