]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
authorMark Wielaard <mark@klomp.org>
Tue, 3 Oct 2017 21:08:01 +0000 (23:08 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 5 Oct 2017 12:00:27 +0000 (14:00 +0200)
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 <mark@klomp.org>
libdw/ChangeLog
libdw/libdw.h

index 94e9c9ab0d9ca30ceaa41e047367d86bc9a5560b..e6e7f3bef6c747e7ac3697c7531cd260a64de8d7 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-03  Mark Wielaard  <mark@klomp.org>
+
+       * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
+
 2017-08-18  Ulf Hermann  <ulf.hermann@qt.io>
 
        * memory-access.h: Use attribute_packed.
index 63a38ff986bcb971dd5e5e80a1068465b6fbb573..e42c087397bb2e0ec6fe2aff0ac9b4c5948af0a2 100644 (file)
@@ -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;