Address of variable doesn't work (ARM-ELF 4.18)?
Richard Earnshaw
rearnsha@arm.com
Sat Apr 1 00:00:00 GMT 2000
grante@visi.com said:
> Using arm-elf-gdb 4.18, how do I get gdb to print the address of a
> variable or to use the address of a variable as the argument for an
> 'x' command?
Info address should give you what you want, and a lot more besides. It
works even if the symbol you have asked for is in a register.
(gdb) info address main
Symbol "main" is a function at address 0x3b064.
(gdb) info address optimize
Symbol "optimize" is static storage at address 0x3214d4.
(gdb) info address argc
Symbol "argc" is an argument at offset 68.
(gdb) info address p
Symbol "p" is a local variable at frame offset -20.
(gdb) info address c
Symbol "c" is a variable in register l0.
Richard.
More information about the Gdb
mailing list