This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
gdb is not calculating symbol addresses correctly for code compiled with 3.3.1
- From: Stephen Smith <ischis2 at cox dot net>
- To: gdb at sources dot redhat dot com
- Date: Sun, 03 Dec 2006 18:00:32 -0700
- Subject: gdb is not calculating symbol addresses correctly for code compiled with 3.3.1
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?