This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: value of local variable stored in register
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Neeraj kushwaha" <kushneeraj at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 04 Feb 2008 22:31:31 +0200
- Subject: Re: value of local variable stored in register
- References: <df5e18bd0802032053o7dddab55n6b01a369424e727b@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.