When I build a program with debugging information (gcc -g
), gdb
is able to tell me addresses of local variables inside a function. Thus, the debugging symbols must contain enough information to calculate this (i.e. an offset from ebp
), and since gdb
uses libbfd
to read debugging symbols, I should be able to as well.
However, libbdf
's documentation seems to have nothing on this. Can libbfd
give me this information?