Post not yet marked as solved
Post marked as unsolved with 0 replies, 828 views
I'm trying to attach with lldb to a x64 process running under Rosetta, attachment itself succeeded but lldb is unable to load target neither it's modules.
And getting this output:
(lldb) process attach --pid 20586
Process 20586 stopped
* thread #1, stop reason = signal SIGSTOP
frame #0: 0x00007ff813a1d1ee
-> 0x7ff813a1d1ee: jae 0x7ff813a1d1f8
0x7ff813a1d1f0: movq %rax, %rdi
0x7ff813a1d1f3: jmp 0x7ff813a18cdb
0x7ff813a1d1f8: retq
Target 0: (No executable module.) stopped.
Architecture set to: x86_64-apple-macosx-.
(lldb) target modules list
error: the target has no associated executable images
A few weeks ago I had the same problem, but some combination of actions like rebuilding deleting and redownloading binaries and some other unknown magic fixed this behaviour. And today I stumbled upon this problem again, and same actions does not make any effect.
Attaching to process works in general (event to processes running under Rosetta), but this specific process I want to debug is causing troubles.
This is what successful attachment looks like:
(lldb) process attach --pid 20576
warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not read from the host's in-memory shared cache. This will likely reduce debugging performance.
Process 20576 stopped
* thread #1, name = 'CrRendererMain', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007ff813a185b2 libsystem_kernel.dylib`mach_msg2_trap + 10
libsystem_kernel.dylib`mach_msg2_trap:
-> 0x7ff813a185b2 <+10>: retq
0x7ff813a185b3 <+11>: nop
libsystem_kernel.dylib`macx_swapon:
0x7ff813a185b4 <+0>: movq %rcx, %r10
0x7ff813a185b7 <+3>: movl $0x1000030, %eax ; imm = 0x1000030
Target 0: (Electron Helper (Renderer)) stopped.
Executable module set to "/Users/mb/work/positron/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Helper (Renderer).app/Contents/MacOS/Electron Helper (Renderer)".
Architecture set to: x86_64-apple-macosx-.
To give a bit more context my MacOS version is 13.14.1 on MacBook Pro with M2 chip.