(gdb) p &a
if you need the address of variable a
. A variable might be cached in a register though, in which case GDB would tell you address requested for identifier "a" which is in register $xxx
.
Sidenote: do not use gets
, see here.
(gdb) p &a
if you need the address of variable a
. A variable might be cached in a register though, in which case GDB would tell you address requested for identifier "a" which is in register $xxx
.
Sidenote: do not use gets
, see here.