/* BFD back-end for HP/UX core files.
- Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1998, 1999, 2001
+ Free Software Foundation, Inc.
Written by Stu Grossman, Cygnus Support.
Converted to back-end form by Ian Lance Taylor, Cygnus SUpport
#include "sysdep.h"
#include "libbfd.h"
-#if defined (HOST_HPPAHPUX) || defined (HOST_HP300HPUX)
+#if defined (HOST_HPPAHPUX) || defined (HOST_HP300HPUX) || defined (HOST_HPPAMPEIX)
/* FIXME: sys/core.h doesn't exist for HPUX version 7. HPUX version
5, 6, and 7 core files seem to be standard trad-core.c type core
#endif /* HOST_HPPABSD */
#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 <machine/reg.h>
#include <sys/user.h> /* After a.out.h */
/* .lwpid and .user_tid are only valid if PROC_INFO_HAS_THREAD_ID, else they
are set to 0. Also, until HP-UX implements MxN threads, .user_tid and
.lwpid are synonymous. */
-struct hpux_core_struct
+struct hpux_core_struct
{
int sig;
int lwpid; /* Kernel thread ID. */
return new;
}
-
/* this function builds a bfd target if the file is a corefile.
It returns null or 0 if it finds out thaat it is not a core file.
The way it checks this is by looking for allowed 'type' field values.
*/
unknown_sections++;
break;
-
+
default: return 0; /*unrecognized core file type */
}
}
built.
*/
if ((unknown_sections > 0) && (good_sections > 0))
- warning ("%s appears to be a core file,\nbut contains unknown sections. It may have been created on an incompatible\nversion of HP-UX. As a result, some information may be unavailable.\n",
- abfd->filename);
+ (*_bfd_error_handler)
+ ("%s appears to be a core file,\nbut contains unknown sections. It may have been created on an incompatible\nversion of HP-UX. As a result, some information may be unavailable.\n",
+ abfd->filename);
return abfd->xvec;
}
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (hpux_core),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0 /* backend_data */
};