mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 15:47:37 +01:00
Break out the ifdefs for the UCD_info.prstatus type
This cleans up the code a bit and makes it easier to refer to the prstatus type in other places.
This commit is contained in:
parent
b9ff650a22
commit
d627481783
1 changed files with 8 additions and 7 deletions
|
@ -74,6 +74,13 @@ struct coredump_phdr
|
||||||
|
|
||||||
typedef struct coredump_phdr coredump_phdr_t;
|
typedef struct coredump_phdr coredump_phdr_t;
|
||||||
|
|
||||||
|
#if defined(HAVE_STRUCT_ELF_PRSTATUS)
|
||||||
|
#define PRSTATUS_STRUCT elf_prstatus
|
||||||
|
#elif defined(HAVE_STRUCT_PRSTATUS)
|
||||||
|
#define PRSTATUS_STRUCT prstatus
|
||||||
|
#else
|
||||||
|
#define PRSTATUS_STRUCT non_existent
|
||||||
|
#endif
|
||||||
|
|
||||||
struct UCD_info
|
struct UCD_info
|
||||||
{
|
{
|
||||||
|
@ -83,13 +90,7 @@ struct UCD_info
|
||||||
coredump_phdr_t *phdrs; /* array, allocated */
|
coredump_phdr_t *phdrs; /* array, allocated */
|
||||||
unsigned phdrs_count;
|
unsigned phdrs_count;
|
||||||
void *note_phdr; /* allocated or NULL */
|
void *note_phdr; /* allocated or NULL */
|
||||||
#if defined(HAVE_STRUCT_ELF_PRSTATUS)
|
struct PRSTATUS_STRUCT *prstatus; /* points inside note_phdr */
|
||||||
struct elf_prstatus *prstatus; /* points inside note_phdr */
|
|
||||||
#elif defined(HAVE_STRUCT_PRSTATUS)
|
|
||||||
struct prstatus *prstatus; /* points inside note_phdr */
|
|
||||||
#else
|
|
||||||
struct non_existent *prstatus;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct elf_dyn_info edi;
|
struct elf_dyn_info edi;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue