This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Static variables incorrect address
- From: Kiranmaye Gannabathula <kiranmaye dot gannabathula at powervr dot com>
- To: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- Date: Thu, 21 Mar 2002 17:18:43 -0000
- Subject: Static variables incorrect address
Hello,
I have a problem with the global static variables in gdb.
For a C program as below
static int Data = 9;
int Func1(void)
{
return Data;
}
if i compile this with debug info and run it under gdb, when i breakpoint on
the variable Data and try to print its value i get some value and
if i look at the address
p /x Data
i get some invalid address.
Can anyone please help me with this
Thanks Kiran.