From 8961f33e2a72a9430455cbb0368c71d22574dc3d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 26 Nov 2017 17:51:11 +0100 Subject: libdw: Handle DWARF5 DW_FORM_implicit_const. Add dwarf_getabbrevattr_data. Handle the new DW_FORM_implicit_const. The value of this form is embedded in the abbrev data (as sleb128) and not in the info DIE data. This also adds a new function dwarf_getabbrevattr_data which allows getting any data/value associated with a form. eu-readelf will use this new function to show the DW_FORM_implicit_const value. Signed-off-by: Mark Wielaard --- libdw/libdw.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdw/libdw.h') diff --git a/libdw/libdw.h b/libdw/libdw.h index acc38916..ac43ad97 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -594,6 +594,12 @@ extern int dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, unsigned int *formp, Dwarf_Off *offset); +/* Get specific attribute of abbreviation and any data encoded with it. + Specifically for DW_FORM_implicit_const data will be set to the + constant value associated. */ +extern int dwarf_getabbrevattr_data (Dwarf_Abbrev *abbrev, size_t idx, + unsigned int *namep, unsigned int *formp, + Dwarf_Sword *datap, Dwarf_Off *offset); /* Get string from-debug_str section. */ extern const char *dwarf_getstring (Dwarf *dbg, Dwarf_Off offset, -- cgit v1.2.1