Re: Function address incoherence
"Christian Biesinger via gdb" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAPTJ0XH=GzX4+xR_OiVcc=+r2socS0uJuF6zoNcR6=Ux+ULSbw@mail.gmail.com> |
On Sat, Aug 24, 2019 at 5:27 AM Andrea Cardaci <[email protected]> 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