Function address incoherence

Christian Biesinger via gdb gdb@sourceware.org
Mon Aug 26 16:34:00 GMT 2019


On Sat, Aug 24, 2019 at 5:27 AM Andrea Cardaci <cyrus.and@gmail.com> wrote:
> Back to the gdb-dashboard issue, I fetch the function address with
> gdb.parse_and_eval(frame.name()).address and since frame.name() is
> _start, the address that I obtain is 0x80482e0 instead of 0xb7fdba20
> thus I end up displaying wrong offsets.

Why don't you use frame.function() and get the address from there?

(and why parse_and_eval instead of lookup_symbol?)

On GDB trunk, you can look up symbols per-objfile, which can help if
multiple files have the same symbol.

Christian



More information about the Gdb mailing list