类转储是否会被CFObjects/structs混淆?我在应用程序上使用了类转储,其中一个方法的参数是一个结构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。

Thnaks!

有帮助吗?

解决方案

该应用程序正在使用Core Foundation对象的c++包装器。该 struct CFStringBInstantMessage 是这种类型的对象。你要 (NSString *)(arg1._field2.mCFRef).

void **_vptr$CFObject field是这里的主要提示-它表示虚拟超类的vtable CFObject -结合常用的C++ m 前缀命名约定。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top