1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 03:53:43 +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:
Alexander Larsson 2012-03-23 21:00:29 +01:00 committed by Arun Sharma
parent b9ff650a22
commit d627481783

View file

@ -74,6 +74,13 @@ struct coredump_phdr
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
{
@ -83,13 +90,7 @@ struct UCD_info
coredump_phdr_t *phdrs; /* array, allocated */
unsigned phdrs_count;
void *note_phdr; /* allocated or NULL */
#if defined(HAVE_STRUCT_ELF_PRSTATUS)
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 PRSTATUS_STRUCT *prstatus; /* points inside note_phdr */
struct elf_dyn_info edi;
};