Hello,
I am attempting to use elfutils / libdw to create a library for tagging
function's local/automatic variable storage. I hope to use dwarf info to
get the stack frame offsets, etc. for function's local vars.
I started with readelf.c as an example for iterating through CU/DIE.
Since my code isn't "part of" elfutils I am not including private
headers such as libdwP.h. Because of that some of the code derived from
readelf won't compile of course.
Are these structure accesses simply short-cuts and it is possible to get
the info needed via API functions? For things like "cu->version" it
seems I can get that via the API dwarf_cu_info, but for some things I
don't quite see what I'd need in the public headers. For example, in the
(readelf.c) function get_indexed_addr, the line:
Elf_Data *debug_addr = cu->dbg->sectiondata[IDX_debug_addr];
uses the (private) structure Dwarf_CU to get at the (private) structure
Dwarf, to get at the sectiondata. I can get the Dwarf via
dwarf_cu_getdwarf, but Is there another way to get at the section data
(and IDX_debug_addr) ?
Thanks and apologies for my newbie-ness here. Please let me know if
there is a better email address to send this question to.
Brian
--
This email and any attachments may contain confidential information.
Unauthorized use or distribution is prohibited. If you are not an intended
recipient, please promptly advise the sender and kindly delete all copies.
Thank you.