Crash debugging for translated x86_64 process under Rosetta

Hi all,

I want to analyze the crash dump of translated x86_64 application under Rosetta emulation.

After survey, I enable core dump at the start of my application, build application with DWARF and dSym config in XCode, and collect core dump from /cores/core.PID

However, when I want to analyze core dump with lldb, I use the following command for backtracing:

lldb -c /cores/core.PID
(lldb) target create --core "/cores/core.PID"
Core file '/cores/core.PID' (arm64) was loaded.
(lldb) bt

and I only got frame number with function address

* thread #1, stop reason = ESR_EC_DABORT_EL0 (fault address: 0x0)
  * frame #0: 0x0000000102ae4c04
  * frame #1: 0x0000000202d166ac

Therefore, I try to add-sym but get the following error message:

error: symbol file 'xxxxx.dSYM' does not match any existing module

I know that macOS would generate crash report in ~/Library/Logs/DiagnosticReports/, but I need further analysis of crash dump.

Is there any way to do post-mortem debugging for translated process under Rosetta?

Thanks!

Hi, have you found any solution?

I noticed that although the executable itself is x86_64, but the coredump is arm64, maybe that's actually coredump of Rosetta, and we need some kind of translation?

➜  ~ file trigger_core
trigger_core: Mach-O 64-bit executable x86_64
➜  ~ file /cores/core.94816
/cores/core.94816: Mach-O 64-bit core arm64
Crash debugging for translated x86_64 process under Rosetta
 
 
Q