I am developing a new tool of valgrind in which at some point I want to read the dwarf debug info in order to get the starting address and the size of a global array.
I know that this info is included into the .debug_info section of dwarf3 debug info.
In the derictory /valgrind/coregrind/m_debuginfo there is a header file priv_readdwarf3.h in which there is a func at line 57:
/* Read variables and types from DWARF3 ".debug_info" sections. */
extern void ML_(read_debuginfo_dwarf3)(
struct _DebugInfo* di,
UChar* debug_info_img, SizeT debug_info_sz,
UChar* debug_types_img, SizeT debug_types_sz,
UChar* debug_abbv_img, SizeT debug_abbv_sz,
UChar* debug_line_img, SizeT debug_line_sz,
UChar* debug_str_img, SizeT debug_str_sz,
UChar* debug_ranges_img, SizeT debug_ranges_sz,
UChar* debug_loc_img, SizeT debug_loc_sz,
UChar* debug_info_alt_img, SizeT debug_info_alt_sz,
UChar* debug_abbv_alt_img, SizeT debug_abbv_alt_sz,
UChar* debug_line_alt_img, SizeT debug_line_alt_sz,
UChar* debug_str_alt_img, SizeT debug_str_alt_sz
);
but i cant understand how to use this func.
Any help appreciated Thanks in advance.