diff options
author | dim <dim@FreeBSD.org> | 2012-08-29 18:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-29 18:49:41 +0000 |
commit | 31e19c2da67608f7e84286c35dd40d3c5be53a56 (patch) | |
tree | 5918304f35bcdb5e9e7b66d9ef0ea1e148bb0015 /lib/libdwarf/dwarf_init.c | |
parent | 5adf2c54b3105c045c6986fa0c072ac520a30b03 (diff) | |
download | FreeBSD-src-31e19c2da67608f7e84286c35dd40d3c5be53a56.zip FreeBSD-src-31e19c2da67608f7e84286c35dd40d3c5be53a56.tar.gz |
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
Diffstat (limited to 'lib/libdwarf/dwarf_init.c')
-rw-r--r-- | lib/libdwarf/dwarf_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |