gdb is not calculating symbol addresses correctly for code compiled with 3.3.1
Stephen Smith
ischis2@cox.net
Mon Dec 4 01:00:00 GMT 2006
I am noticing this issue with binaries that are compiled with 3.3.1. If
the same code is compiled with 2.95 the symbols are calculated correctly.
I am debugging an embedded application and have a library that is loaded
into memory. I am using the add symbol file command to load its symbols
and besides the required text section address I am specifiying the
.data, .sdata2, .sdata, .sbss and .bss section addresses. gdb is
acknowledging the addresses I give it.
Then when I ask for the address of one of the variables, I am getting an
address totally outside the range that I specified. If I browse the
memory (i.e. I don't refer to the variable, but rather print the data at
the hex address in question) I do find that the variable is at the
address I thought it was - not the location that gdb calculated.
Has anyone else seen this behavior?
More information about the Gdb
mailing list