Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

恢复swift混编失败 #25

Open
ChandHsu opened this issue Nov 25, 2018 · 4 comments
Open

恢复swift混编失败 #25

ChandHsu opened this issue Nov 25, 2018 · 4 comments

Comments

@ChandHsu
Copy link

Scan OC method in mach-o-file.
2018-11-25 14:37:54.450 restore-symbol[8066:588336] *** Assertion failure in -[CDObjectiveC2Processor loadClassAtAddress:], /Users/yifang/restore-symbol/class-dump/Source/CDObjectiveC2Processor.m:258
2018-11-25 14:37:54.452 restore-symbol[8066:588336] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: moduleName.length == length'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff4a479e65 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff764d4720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4a494ab2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff4c838d1d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 restore-symbol 0x000000010f53a821 -[CDObjectiveC2Processor loadClassAtAddress:] + 2826
5 restore-symbol 0x000000010f53831c -[CDObjectiveC2Processor loadClasses] + 243
6 restore-symbol 0x000000010f53563c -[CDObjectiveCProcessor process] + 391
7 restore-symbol 0x000000010f522e9b -[CDClassDump processObjectiveCData] + 344
8 restore-symbol 0x000000010f51828f restore_symbol + 831
9 restore-symbol 0x000000010f520212 main + 482
10 libdyld.dylib 0x00007fff775a308d start + 1
11 ??? 0x0000000000000006 0x0 + 6
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

@WolfMobileDev
Copy link

Scan OC method in mach-o-file.
2018-11-25 14:37:54.450 restore-symbol[8066:588336] *** Assertion failure in -[CDObjectiveC2Processor loadClassAtAddress:], /Users/yifang/restore-symbol/class-dump/Source/CDObjectiveC2Processor.m:258
2018-11-25 14:37:54.452 restore-symbol[8066:588336] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: moduleName.length == length'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff4a479e65 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff764d4720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4a494ab2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff4c838d1d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 restore-symbol 0x000000010f53a821 -[CDObjectiveC2Processor loadClassAtAddress:] + 2826
5 restore-symbol 0x000000010f53831c -[CDObjectiveC2Processor loadClasses] + 243
6 restore-symbol 0x000000010f53563c -[CDObjectiveCProcessor process] + 391
7 restore-symbol 0x000000010f522e9b -[CDClassDump processObjectiveCData] + 344
8 restore-symbol 0x000000010f51828f restore_symbol + 831
9 restore-symbol 0x000000010f520212 main + 482
10 libdyld.dylib 0x00007fff775a308d start + 1
11 ??? 0x0000000000000006 0x0 + 6
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

我也遇到了这个问题,解决了吗

@shinyYangYang
Copy link

you need update class-dump. support Swift https://github.com/BlueCocoa/class-dump

@timelessRecall
Copy link

@shinyYangYang 你好,链接失效了 有备份么

@crifan
Copy link

crifan commented Apr 19, 2022

直接解决

  • 原因:此restore-symbol依赖于class-dump,而此处的class-dump不支持swift

  • 解决办法:把restore-symbol中的class-dump换成支持swift的版本

  • 具体步骤:

  • 先切换到swift-binaries的branch -》确保代码支持swift

  • 再去参考:iOS 逆向入门 - 符号恢复及反汇编 | Darren's Blog,去注释掉:Source/CDObjectiveC2Processor.m中的loadClassAtAddress中的2行NSParameterAssert

- (CDOCClass *)loadClassAtAddress:(uint64_t)address;
{
。。。
        // NSParameterAssert(moduleName.length == length);
。。。
        // NSParameterAssert(className.length == length);

更高级更好的解决

直接换:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants