This is the mail archive of the gdb@sourceware.org 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: value of local variable stored in register


> Date: Mon, 4 Feb 2008 10:23:26 +0530
> From: "Neeraj kushwaha" <kushneeraj@gmail.com>
> 
> The value of local variable is shown as c = 11305136, but actual value is 20.
> 
> How to get the correct value of variables which are stored in register.

 (gdb) info address c

This will show where the variable c is stored.  If it says it's in a
register, print the value of that register.


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