This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
symbol table incorrect with add-symbol-file command
- To: gdb at sources dot redhat dot com
- Subject: symbol table incorrect with add-symbol-file command
- From: Niraj Gupta <ngupta at zumanetworks dot com>
- Date: Mon, 22 Jan 2001 13:36:47 -0800
we are using one of the latest snapshot of the tree (jan 2001 2-week)
part of our symbol table is added using the add-symbol-file command
the target is powerpc-linux compiler verion is 2.92.2, all the symbols show
up correctly except for
global static symbols, this can be recreated with following
/* test.c */
#define LEN 16
static unsigned char a[LEN];
static unsigned char b[LEN];
clear()
{
int i;
for(i=0;i<LEN;i++)
a[i] = b[i] = 0;
}
compile with
powerpc-linux-gcc -c -g test.c
gdb> add-symbol-file test.c 0x1000 -s .data 0x2000 -s .bss 0x3000
gdb>p/x &a
0x3000
gdb> p/x &b
0x3000
/* here the address of b is incorrect, it should be 0x3010 */
please help