diff options
author | Mark Wielaard <[email protected]> | 2018-04-26 11:53:49 +0200 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2018-05-15 11:25:27 +0200 |
commit | 6ed8b94952ddf155960c799ef76f3048f033e873 (patch) | |
tree | b9270241542b3575e08f3639829137dee8caaa67 /libdw/dwarf_formstring.c | |
parent | b9c76ded0f07d270bbb9314fb970bb0afcb71d58 (diff) |
readelf: Add DWARF5 .debug_line support.
This only changes the parsing of the directory and file name tables.
It does this by sharing the printing of (non-CU based) from data from
the .debug_macro code. Adding support for printing strx[1234] form data
by sharing the code that detects the correct str_offsets_base in libdw.
The header format is also cleaned up a bit so that it better lines out.
Testcases adjusted and new ones added.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdw/dwarf_formstring.c')
-rw-r--r-- | libdw/dwarf_formstring.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/libdw/dwarf_formstring.c b/libdw/dwarf_formstring.c index c55c7f04..251784df 100644 --- a/libdw/dwarf_formstring.c +++ b/libdw/dwarf_formstring.c @@ -177,20 +177,3 @@ dwarf_formstring (Dwarf_Attribute *attrp) return (const char *) data->d_buf + off; } INTDEF(dwarf_formstring) - -Dwarf_Off __libdw_cu_str_off_base (Dwarf_CU *cu) -{ - if (cu->str_off_base == (Dwarf_Off) -1) - { - Dwarf_Die cu_die = CUDIE(cu); - Dwarf_Attribute attr; - if (dwarf_attr (&cu_die, DW_AT_str_offsets_base, &attr) != NULL) - { - Dwarf_Word off; - if (dwarf_formudata (&attr, &off) == 0) - cu->str_off_base = off; - } - } - - return cu->str_off_base; -} |