summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2017-10-03 23:08:01 +0200
committerMark Wielaard <[email protected]>2017-10-05 14:00:27 +0200
commit734118467b1a28f9b1765a769e1269ec56bb78cf (patch)
treea0fe34aa866684831225b928c5d05dac0dbd3ba9
parent17d7194d291bf91d130b78e06cbe27b290e0376d (diff)
libdw: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
dwarf_cfi_cie_p used DW_CIE_ID_64 from dwarf.h which meant you had to include dwarf.h just to use the dwarf_cfi_cie_p macros. Just define the constant as LIBDW_CIE_ID in libdw.h to keep it independent. Signed-off-by: Mark Wielaard <[email protected]>
-rw-r--r--libdw/ChangeLog4
-rw-r--r--libdw/libdw.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 94e9c9ab..e6e7f3be 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-03 Mark Wielaard <[email protected]>
+
+ * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
+
2017-08-18 Ulf Hermann <[email protected]>
* memory-access.h: Use attribute_packed.
diff --git a/libdw/libdw.h b/libdw/libdw.h
index 63a38ff9..e42c0873 100644
--- a/libdw/libdw.h
+++ b/libdw/libdw.h
@@ -211,7 +211,9 @@ typedef union
Dwarf_FDE fde;
} Dwarf_CFI_Entry;
-#define dwarf_cfi_cie_p(entry) ((entry)->cie.CIE_id == DW_CIE_ID_64)
+/* Same as DW_CIE_ID_64 from dwarf.h to keep libdw.h independent. */
+#define LIBDW_CIE_ID 0xffffffffffffffffULL
+#define dwarf_cfi_cie_p(entry) ((entry)->cie.CIE_id == LIBDW_CIE_ID)
/* Opaque type representing a frame state described by CFI. */
typedef struct Dwarf_Frame_s Dwarf_Frame;