类转储和 CFObjects
类转储是否会被 CFObjects/structs 混淆?我在应用程序上使用了类转储,该方法的参数之一是 struct arg1,它是一个 BInstantMessage:
struct BInstantMessage {
void **_field1;
struct CFString _field2;
unsigned short *_field3;
struct DTextStyle _field4;
struct BUser *_field5;
struct BChat *_field6;
};
struct CFString {
void **_vptr$CFObject;
struct __CFString *mCFRef;
_Bool mIsMutable;
};
struct __CFString;
那么,如何从该 arg1 获取 CFStringRef 或 NSString* ?我猜类转储正在用 CFString 定义替换一些 CFStringRef,但这只是一个猜测...... 我想要的只是从 arg1 获取一个 CFStringRef,它是一个 BInstantMessage。
谢谢!
Does class dump get confused by CFObjects/structs? I used class dump on an application and one of the method's argument was a struct arg1 which is a BInstantMessage:
struct BInstantMessage {
void **_field1;
struct CFString _field2;
unsigned short *_field3;
struct DTextStyle _field4;
struct BUser *_field5;
struct BChat *_field6;
};
struct CFString {
void **_vptr$CFObject;
struct __CFString *mCFRef;
_Bool mIsMutable;
};
struct __CFString;
So, how can I get a CFStringRef or NSString* from this arg1? I am guess that class dump is replacing some CFStringRef by CFString definitions, but it's just a guess...
All I want is to get a CFStringRef from arg1 which is a BInstantMessage.
Thnaks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该应用程序使用 Core Foundation 对象的 C++ 包装器。
BInstantMessage
中的struct CFString
就是这种类型的对象。您需要(NSString *)(arg1._field2.mCFRef)
。void **_vptr$CFObject
字段是这里的主要提示 – 它表示虚拟超类CFObject
的 vtable – 与常见的 C++m
相结合> 前缀命名约定。The application is using a C++ wrapper for Core Foundation objects. the
struct CFString
inBInstantMessage
is an object of this type. You want(NSString *)(arg1._field2.mCFRef)
.The
void **_vptr$CFObject
field is the major hint here – it represents the vtable for a virtual superclassCFObject
– combined with the common C++m
prefix naming convention.