From 31e19c2da67608f7e84286c35dd40d3c5be53a56 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 29 Aug 2012 18:49:41 +0000 Subject: Teach libdwarf about the DW_FORM_flag_present dwarf attribute, so programs using libdwarf (such as ctfconvert) don't error out on files containing the attribute. MFC after: 2 weeks --- lib/libdwarf/dwarf_init.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libdwarf/dwarf_init.c') diff --git a/lib/libdwarf/dwarf_init.c b/lib/libdwarf/dwarf_init.c index 95642a0..aca6cef 100644 --- a/lib/libdwarf/dwarf_init.c +++ b/lib/libdwarf/dwarf_init.c @@ -396,6 +396,10 @@ dwarf_init_attr(Dwarf_Debug dbg, Elf_Data **dp, uint64_t *offsetp, avref.u[1].s = elf_strptr(dbg->dbg_elf, dbg->dbg_s[DWARF_debug_str].s_shnum, avref.u[0].u64); break; + case DW_FORM_flag_present: + /* This form has no value encoded in the DIE. */ + avref.u[0].u64 = 1; + break; default: DWARF_SET_ERROR(error, DWARF_E_NOT_IMPLEMENTED); ret = DWARF_E_NOT_IMPLEMENTED; -- cgit v1.1