missing #include <dwarf.h> in libdw.h?

Mark Wielaard mark@klomp.org
Wed Oct 4 19:02:00 GMT 2017


On Tue, 2017-10-03 at 19:30 +0000, Bill Williams wrote:
> libdw.h uses the DW_CIE_ID_64 define from dwarf.h in a macro
> definition, but does not itself include dwarf.h. This makes the
> libdw.h header not self-contained if and only if your code uses the
> dwarf_cfi_cie_p macro. Is this behavior by design, or a bug?

I don't think this is by design. It seems a bug nobody noticed before
because people often do include dwarf.h also. But nothing else
explicitly needs the dwarf.h constants. It would probably not break
anything to explicitly include dwarf.h in libdw.h, but it seems better
to just define this constant explicitly in libdw.h as the attached
patch does. Does that make sense to you?

Thanks,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libdw-Define-LIBDW_CIE_ID-and-use-it-in-dwarf_cfi_ci.patch
Type: text/x-patch
Size: 1482 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/elfutils-devel/attachments/20171004/5dfc67a2/attachment.bin>


More information about the Elfutils-devel mailing list