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]
Other format: [Raw text]

Re: Static variables incorrect address


> From: Kiranmaye Gannabathula <kiranmaye.gannabathula@powervr.com>
> Date: Thu, 21 Mar 2002 17:18:43 -0000
> 
> 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.

I'm sorry, from your description I cannot figure out exactly what
happened.  Please post a complete GDB session showing the commands you
typed and what GDB printed in response.

Also, what version of GDB is that, and on what platforms?


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