Thanks, I just tried that. Then I realized that I can barely see any of my app's symbol names in the disassembly (which I created with otool -vt /path/to/executable). For instance I cannot find any of the method names mentioned in the crash reports. The disassembly looks like this:
~/Library/Developer/Xcode/Archives/2024-07-12/MyApp macOS 12.07.2024, 20.43.xcarchive/Products/Applications/MyApp.app/Contents/MacOS/MyApp (architecture arm64):
(__TEXT,__text) section
0000000100004a00 stp x20, x19, [sp, #-0x20]!
0000000100004a04 stp x29, x30, [sp, #0x10]
0000000100004a08 add x29, sp, #0x10
0000000100004a0c adrp x8, 567 ; 0x10023b000
0000000100004a10 ldr x0, [x8, #0xc30] ; Objc class ref: bad class ref
0000000100004a14 bl 0x1001d664c ; symbol stub for: _objc_opt_self
0000000100004a18 adrp x8, 567 ; 0x10023b000
0000000100004a1c ldr x1, [x8, #0x588] ; Objc selector ref: sharedApplication
0000000100004a20 bl 0x1001d6634 ; Objc message: -[x0 sharedApplication]
0000000100004a24 mov x29, x29
0000000100004a28 bl 0x1001d667c ; symbol stub for: _objc_retainAutoreleasedReturnValue
0000000100004a2c adrp x19, 587 ; 0x10024f000
0000000100004a30 str x0, [x19, #0xb30]
0000000100004a34 mov x0, #0x0
0000000100004a38 bl 0x1000e6c04
0000000100004a3c bl 0x1001d6604 ; symbol stub for: _objc_allocWithZone
...
When you wrote
disassemble the code pointed to be the backtrace to make sure it’s the thunk that you expect it to be
were you thinking of a particular command that creates disassemblies with symbol names, or how would you "make sure it's the thunk that you expect it to be"?
Topic:
Programming Languages
SubTopic:
Swift
Tags: