无法从反汇编中解码简单的 ARM 函数原型?
我无法弄清楚这个简单函数的原型:
在堆栈中:
函数调用:
这就是我到目前为止得到的,它会导致错误。
//No idea
void CameraDeviceCreate(int one,int two,int* three);
使用了三个寄存器(R0、R1、R2),因此应该有三个参数。第三个指的是堆栈变量(我仍然不明白它是如何工作的)。 #0x28 (var_28) 仅在 ADD 调用中提及,不确定它可能是什么。 我在哪里犯了错误?
如果我遗漏了一些信息,请告诉我,我会添加它。顺便说一下,这是来自Camera.framework。
I can't figure out the prototype for this simple function:
In stack:
Function call:
That's what I got so far, and it causes an error.
//No idea
void CameraDeviceCreate(int one,int two,int* three);
There are three registers used (R0,R1,R2) so there should be three arguments. Third one refers to a stack variable (I still don't get how that works). #0x28 (var_28) is only mentioned in the ADD call, not sure what it could be. Where did I make a mistake?
If I missed some info out tell me and I'll add it. This is from Camera.framework by the way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么你认为你做错了?
请注意,不能保证第三个参数是“int*”——您需要查看当时 R4 中的内容——我猜它实际上是指向某种结构,而不是 int。
Why do you think you have it wrong?
Note, there is no guarantee that the third parameter is 'int*' - you need to look at what is in R4 at that point - I would guess its actually some sort of structure being pointed at, rather than an int.