iOS-restore-symbol報(bào)錯(cuò)

2023-01-19 11:03:40.541 restore-symbol[14981:549366] *** Assertion failure in -[CDObjectiveC2Processor loadClassAtAddress:], CDObjectiveC2Processor.m:258
2023-01-19 11:03:40.543 restore-symbol[14981:549366] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: moduleName.length == length'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff8061dde9b __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff805f3fe48 objc_exception_throw + 48
    2   Foundation                          0x00007ff806fc1d03 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 267
    3   restore-symbol                      0x00000001049fbedc -[CDObjectiveC2Processor loadClassAtAddress:] + 2709
    4   restore-symbol                      0x00000001049f9c38 -[CDObjectiveC2Processor loadClasses] + 224
    5   restore-symbol                      0x00000001049f70dd -[CDObjectiveCProcessor process] + 381
    6   restore-symbol                      0x00000001049e5a06 -[CDClassDump processObjectiveCData] + 300
    7   restore-symbol                      0x00000001049db497 restore_symbol + 823
    8   restore-symbol                      0x00000001049e2f32 main + 514
    9   dyld                                0x0000000204d2552e start + 462
    10  dyld                                0x0000000204d20000 dyld + 0
)
libc++abi: terminating with uncaught exception of type NSException

原因:restore-symbol的子模塊class-dump的版本太低
解決:

在restor-symbol 目錄下
rm -rf class-dump
git clone https://github.com/nygard/class-dump.git
注釋掉 makefile 中的 git submodule 命令
CDLCBuildVersion.m下面注釋 18行//case PLATFORM_IOSMAC:           return @"iOS Mac";
重新make即可
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容