Hi guys, I was wondering, I am running a simple Assembly example with GNU Debbuger (GDB) on a RPI (ARM architecture). When I execute the command "info registers" I take the following output.
(gdb) info registers
r0 0x1 1
r1 0x7efff7b4 2130704308
r2 0x7efff7bc 2130704316
r3 0x10408 66568
r4 0x1042c 66604
r5 0x0 0
r6 0x102e0 66272
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0x76fff000 1996484608
r11 0x0 0
r12 0x7efff6e0 2130704096
sp 0x7efff660 0x7efff660
lr 0x76e8f678 1994978936
pc 0x10408 0x10408 <main>
cpsr 0x60000010 1610612752
From the output I can see that some register's values are memory addresses. Am I correct?
If I type then the following command I take this output:
(gdb) x $r3
0x10408 <main>: 0xe3a00000
(gdb) x $r1
0x7efff7b4: 0x7efff8d3
(gdb) x $r2
0x7efff7bc: 0x7efff8e3
This means that the value of the R3 for example points to another memory address location?
I am confused, the value of a register is the address that shows at the info field or the address that points to?
Any help to understand this?
Also, Is any general rule that declares which values of which registers are addresses or actual values like 3,4 and so on?
(gdb) info registers
r0 0x1 1
r1 0x7efff7b4 2130704308
r2 0x7efff7bc 2130704316
r3 0x10408 66568
r4 0x1042c 66604
r5 0x0 0
r6 0x102e0 66272
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0x76fff000 1996484608
r11 0x0 0
r12 0x7efff6e0 2130704096
sp 0x7efff660 0x7efff660
lr 0x76e8f678 1994978936
pc 0x10408 0x10408 <main>
cpsr 0x60000010 1610612752
From the output I can see that some register's values are memory addresses. Am I correct?
If I type then the following command I take this output:
(gdb) x $r3
0x10408 <main>: 0xe3a00000
(gdb) x $r1
0x7efff7b4: 0x7efff8d3
(gdb) x $r2
0x7efff7bc: 0x7efff8e3
This means that the value of the R3 for example points to another memory address location?
I am confused, the value of a register is the address that shows at the info field or the address that points to?
Any help to understand this?
Also, Is any general rule that declares which values of which registers are addresses or actual values like 3,4 and so on?