This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

symbol table incorrect with add-symbol-file command


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]