与 ARM LDR 指令关联的哈希 (#) 值是什么意思? [英] What does the hash (#) value associated with the ARM LDR instruction mean?

查看:24
本文介绍了与 ARM LDR 指令关联的哈希 (#) 值是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试在我的应用程序中遇到的崩溃.堆栈跟踪指向具有以下格式的 LDR 指令(感谢反汇编程序):

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]

我的问题是关于源组件的.第二个参数中的#4 是什么意思?我假设它是某种偏移量,但我还没有找到支持 LDR 指令的文档.

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.

推荐答案

它从 R0 + 4 个字节的地址中加载 R3.所以,是的,它是一个字节偏移量.请参阅此寻址模式说明.

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

这篇关于与 ARM LDR 指令关联的哈希 (#) 值是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆