The ELF file contains debug info, then the types of variables, structures, and great many other kinds of info can be extracted from that binary.Theoretically possible, but I don't know how to program the implementation by c language
For example if I have an embedded struct and variable like this:
unsigned int varA;
unsigned int varB;
I want to get the address and type of not only data, but preferably data.varA and data.varB. I used segger ELFlib without success, and I was wondering if there was a more suitable library.
Which of these(Libdwarf,elfutils) is more suitable for my needs?