value of local variable stored in register

Eli Zaretskii eliz@gnu.org
Mon Feb 4 20:32:00 GMT 2008


> 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.



More information about the Gdb mailing list