How to print register address in GDB?

2

I want to print the register's own address where it resides in memory using GDB. For example, Where does the GPG register r1 reside in memory? From the result below I can't find the register's own address.

(gdb) info reg r0 r1
r0             0x0  0
r1             0x0  0

even with

(gdb) x/x $r0
0x0 <_ftext>:   0xffffffff
(gdb) x/x $r1
0x0 <_ftext>:   0xffffffff
(gdb)
gdb
asked on Stack Overflow Jan 7, 2015 by Equation Solver • edited Nov 28, 2020 by d-cubed

1 Answer

10

Registers don't have addresses, only names. They are locations in the CPU itself, not in RAM.

answered on Stack Overflow Jan 7, 2015 by legoscia

User contributions licensed under CC BY-SA 3.0