[iOS逆向工程] 在汇编语言调试中获取当前实例句柄
来源:互联网 发布:windows 触摸板设置 编辑:程序博客网 时间:2024/06/05 06:29
函数参数的传递
Table 3 : Accessing parameters after the prologue
既然知道参数是如何存储的,那C++和Objective-C是如何传递当前实例的句柄的呢?
当在汇编语言下调试Cocoa代码,请记住以下运行时特性:
The Objective-C compiler adds two implicit parameters to each method, the first of which is a pointer to the object being called (
self
).The second implicit parameter is the method selector (
_cmd
). In Objective-C this is of typeSEL
; in GDB you can print this as a C string.The Objective-C runtime dispatches methods via a family of C function. The most commonly seen is
objc_msgSend
, but some architectures useobjc_msgSend_stret
for methods which returns structures, and some architectures useobjc_msgSend_fpret
for methods that return floating point values. There are also equivalent functions for callingsuper
(objc_msgSendSuper
and so on).The first word of any Objective-C object (the
isa
field) is a pointer to the object's class.
实战
0xb01dd28c: 0x0000a07c 0x0929e170 0x04e7aad3 0x1386d750
(id) $102 = 0x0929e210 <CALayer: 0x929e170>
(id) $105 = 0x00000001 [no Objective-C description available]
0x04e7aad3: "addSublayer:"
(lldb) po [[`*(int*)($esp+4)` superview] recursiveDescription]
(id) $7 = 0x0719f940 <UIWebSelectionView: 0x107d74e0; frame = (0 0; 0 0); layer = <CALayer: 0x107d7620>>
| <UIView: 0x107d7770; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x107d77d0>>
| <UIWebSelectionOutline: 0x759b340; frame = (-2 -2; 4 4); userInteractionEnabled = NO; layer = <CALayer: 0x75963e0>>
| | <UIView: 0x759b3f0; frame = (0 0; 0 0); layer = <CALayer: 0x759d580>>
| | <UIView: 0x759da60; frame = (0 0; 0 0); layer = <CALayer: 0x759bfb0>>
| | <UIView: 0x759be40; frame = (0 0; 0 0); layer = <CALayer: 0x759db30>>
转载请注明出处: http://blog.csdn.net/horkychen
- [iOS逆向工程] 在汇编语言调试中获取当前实例句柄
- IOS如何在当前工程中导入另一个工程文件
- IOS如何在当前工程中导入另一个工程文件
- MFC中获得当前进程实例句柄
- 在MFC中获取窗口\视图句柄 &获取当前活动的CView
- 在MFC中获取窗口\视图句柄 &获取当前活动的CView .
- 逆向工程(二)汇编语言
- ios中获取当前手机通讯录信息一、在工程中添加AddressBook.framework和AddressBookUI.framework
- 获取当前线程句柄
- mybaitis逆向工程实例
- MyBatis逆向工程实例
- iOS逆向工程之Hopper+LLDB调试第三方App
- iOS逆向工程之Hopper+LLDB调试第三方App
- iOS逆向工程之Hopper+LLDB调试第三方App
- ios如何在当前工程中导入另一个工程文件(添加编辑新建的FramesWork)
- iOS逆向工程——获取app素材图片
- iOS逆向工程三:苹果私有API的获取
- 【iOS逆向工程】从脱壳到获取源码
- 数对之差的最大值
- SNMP之JRobin画图
- Asp.Net截取两个相同字符之间的字符串内容(示例)
- svn常用命令
- linux 下multiple definition of出错
- [iOS逆向工程] 在汇编语言调试中获取当前实例句柄
- cocos2d-x 内存管理一
- cocos2d-x 内存管理二
- 花生壳
- virtualbox4.1.6虚拟机安装Ubuntu11.10.Desktop 教程
- Google Play Services 2.0增加Maps与Photo Sphere API
- 嵌入式linux系统架构及开发流程
- linux命令总结
- array_diff_assoc (函数)