This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: Address of variable doesn't work (ARM-ELF 4.18)?



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.


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