X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fhpux-core.c;h=cc8207769fd7e5b5a5550d4fe3bca3e0f85c72a4;hb=5608e05bb4ef95fdd0051137ed7db8d1a29ee5ea;hp=3baefb18a1358f0acf65eb2cdf8907a6894f8538;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c index 3baefb18a1..cc8207769f 100644 --- a/bfd/hpux-core.c +++ b/bfd/hpux-core.c @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #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 @@ -46,7 +46,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif /* HOST_HPPABSD */ #include -#include +#ifdef HAVE_DIRENT_H +# include +#else +# ifdef HAVE_SYS_NDIR_H +# include +# endif +# ifdef HAVE_SYS_DIR_H +# include +# endif +# ifdef HAVE_NDIR_H +# include +# endif +#endif #include #include #include /* After a.out.h */ @@ -73,7 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* .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. */ @@ -130,7 +142,6 @@ hpux_core_make_empty_symbol (abfd) 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. @@ -276,7 +287,7 @@ hpux_core_core_file_p (abfd) */ unknown_sections++; break; - + default: return 0; /*unrecognized core file type */ } } @@ -290,8 +301,9 @@ hpux_core_core_file_p (abfd) 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; } @@ -376,7 +388,7 @@ const bfd_target hpux_core_vec = 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), @@ -387,5 +399,7 @@ const bfd_target hpux_core_vec = BFD_JUMP_TABLE_LINK (_bfd_nolink), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + NULL, + (PTR) 0 /* backend_data */ };