Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the hash (#) value associated with the ARM LDR instruction mean?

Tags:

assembly

arm

I'm trying to debug a crash I am experiencing in my application. The stack trace is pointing to an LDR instruction with the following format (thanks disassembler):

LDR R3, [R0,#4]

My question is in regards to the source component. What does the #4 in the second parameter mean? I'm assuming it is some kind of offset, but I haven't found documentation supporting that for the LDR instruction.

like image 930
MM. Avatar asked May 23 '11 13:05

MM.


1 Answers

It loads R3 from the address in R0 + 4 bytes. So, yes, it is a byte offset. See this explanation of the addressing modes.

like image 93
Graham Borland Avatar answered Jan 03 '23 16:01

Graham Borland