libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 3/4] Break out the ifdefs for the UCD_info.prst


From: Alexander Larsson
Subject: [Libunwind-devel] [PATCH 3/4] Break out the ifdefs for the UCD_info.prstatus type
Date: Fri, 23 Mar 2012 21:00:29 +0100

This cleans up the code a bit and makes it easier to refer to
the prstatus type in other places.
---
 src/coredump/_UCD_internal.h |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
index 82ffa66..ecad0bd 100644
--- a/src/coredump/_UCD_internal.h
+++ b/src/coredump/_UCD_internal.h
@@ -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;
   };
-- 
1.7.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]