VirtualBox

Changeset 31980 in vbox


Ignore:
Timestamp:
Aug 26, 2010 10:36:54 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65221
Message:

coredumper: Use our own ELF defines, added OS specific defines to ldrElfCommon.h

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/ldrELFCommon.h

    r3699 r31980  
    139139#define EM_IA_64        50      /* Intel IA-64 Processor */
    140140#define EM_X86_64       62      /* Advanced Micro Devices x86-64 */
     141#define EM_AMD64    EM_X86_64   /* SunOS compatibility (added by Ramshankar) */
    141142#define EM_ALPHA        0x9026  /* Alpha (written in the absence of an ABI */
    142143
     
    273274
    274275/* Values for n_type.  Used in core files. */
     276#if defined(RT_OS_FREEBSD)  /* (added by Ramshankar) */
    275277#define NT_PRSTATUS     1       /* Process status. */
    276278#define NT_FPREGSET     2       /* Floating point registers. */
    277279#define NT_PRPSINFO     3       /* Process state info. */
     280#elif defined(RT_OS_SOLARIS) /* (added by Ramshankar) */
     281#define NT_PRSTATUS     1       /* prstatus_t <sys/old_procfs.h>        */
     282#define NT_PRFPREG      2       /* prfpregset_t <sys/old_procfs.h>      */
     283#define NT_PRPSINFO     3       /* prpsinfo_t <sys/old_procfs.h>        */
     284#define NT_PRXREG       4       /* prxregset_t <sys/procfs.h> */
     285#define NT_PLATFORM     5       /* string from sysinfo(SI_PLATFORM)     */
     286#define NT_AUXV         6       /* auxv_t array <sys/auxv.h> */
     287#define NT_LDT          9       /* ssd array <sys/sysi86.h> IA32 only */
     288#define NT_PSTATUS      10      /* pstatus_t <sys/procfs.h> */
     289#define NT_PSINFO       13      /* psinfo_t     <sys/procfs.h> */
     290#define NT_PRCRED       14      /* prcred_t     <sys/procfs.h> */
     291#define NT_UTSNAME      15      /* struct utsname <sys/utsname.h> */
     292#define NT_LWPSTATUS    16      /* lwpstatus_t  <sys/procfs.h> */
     293#define NT_LWPSINFO     17      /* lwpsinfo_t <sys/procfs.h> */
     294#define NT_PRPRIV       18      /* prpriv_t     <sys/procfs.h>  */
     295#define NT_PRPRIVINFO   19      /* priv_impl_info_t <sys/priv.h> */
     296#define NT_CONTENT      20      /* core_content_t <sys/corectl.h> */
     297#define NT_ZONENAME     21      /* string from getzonenamebyid(3C) */
     298#define PF_SUNW_FAILURE 0x00100000      /* mapping absent due to failure */
     299#define PN_XNUM         0xffff  /* extended program header index */
     300#elif defined(RT_OS_LINUX) /* (added by Ramshankar) */
     301#define NT_PRSTATUS     1   /* Process status. */
     302#define NT_PRFPREG      2   /* Floating point registers. */
     303#define NT_PRPSINFO     3   /* Process state info. */
     304#define NT_TASKSTRUCT   4   /* Task info. */
     305#define NT_AUXV         6   /* Process auxiliary vectors. */
     306#define NT_PRXFPREG     0x46e62b7f /* from gdb5.1/include/elf/common.h */
     307#endif
    278308
    279309/* Symbol Binding - ELFNN_ST_BIND - st_info */
  • trunk/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp

    r31937 r31980  
    5454#endif  /* RT_OS_SOLARIS */
    5555
     56#include "internal/ldrElf.h"
     57
    5658/*******************************************************************************
    5759*   Globals                                                                    *
     
    7779    } while (0)
    7880
     81
     82/**
     83 * ELFNOTEHDR: ELF NOTE header.
     84 */
     85typedef struct ELFNOTEHDR
     86{
     87    Elf_Nhdr                        Hdr;                        /* Header of NOTE section */
     88    char                            achName[8];                 /* Name of NOTE section */
     89} ELFNOTEHDR;
     90typedef ELFNOTEHDR *PELFNOTEHDR;
    7991
    8092/**
     
    16751687
    16761688    PVBOXPROCESS pVBoxProc = &pVBoxCore->VBoxProc;
    1677     Phdr ProgHdr;
     1689    Elf_Phdr ProgHdr;
    16781690    RT_ZERO(ProgHdr);
    16791691    ProgHdr.p_type = PT_LOAD;
     
    17631775     * Write the ELF header.
    17641776     */
    1765     Ehdr ElfHdr;
     1777    Elf_Hdr ElfHdr;
    17661778    RT_ZERO(ElfHdr);
    17671779    ElfHdr.e_ident[EI_MAG0]  = ELFMAG0;
     
    17851797    ElfHdr.e_ehsize          = sizeof(ElfHdr);
    17861798    ElfHdr.e_phoff           = sizeof(ElfHdr);
    1787     ElfHdr.e_phentsize       = sizeof(Phdr);
    1788     ElfHdr.e_shentsize       = sizeof(Shdr);
     1799    ElfHdr.e_phentsize       = sizeof(Elf_Phdr);
     1800    ElfHdr.e_shentsize       = sizeof(Elf_Shdr);
    17891801    rc = pVBoxCore->pfnWriter(pVBoxCore->hCoreFile, &ElfHdr, sizeof(ElfHdr));
    17901802    if (RT_FAILURE(rc))
     
    17971809     * Setup program header.
    17981810     */
    1799     Phdr ProgHdr;
     1811    Elf_Phdr ProgHdr;
    18001812    RT_ZERO(ProgHdr);
    18011813    ProgHdr.p_type = PT_NOTE;
  • trunk/src/VBox/Runtime/r3/solaris/coredumper-solaris.h

    r31914 r31980  
    5656# undef _ELF32_COMPAT
    5757#endif
    58 # include <sys/machelf.h>
    5958# include <sys/corectl.h>
    6059#endif
    61 
    62 /**
    63  * ELFNOTEHDR: ELF NOTE header.
    64  */
    65 typedef struct ELFNOTEHDR
    66 {
    67     Nhdr                            Hdr;                        /* Header of NOTE section */
    68     char                            achName[8];                 /* Name of NOTE section */
    69 } ELFNOTEHDR;
    70 typedef ELFNOTEHDR *PELFNOTEHDR;
    7160
    7261
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette