How to fix lldb stopping immediately after run call?

为君一笑 提交于 2019-12-11 10:04:17

问题


I'm using lldb on Mojave with Xcode 10.2.1. As soon as command 'run' to lldb, this happens:

(lldb) target create "<executable>"
Current executable set to '<executable>' (x86_64).
(lldb) run
Process 95857 launched: '/Users/<path to executable>' (x86_64)
Process 95857 stopped
* thread #2, stop reason = exec
    frame #0: 0x0000000102491000 dyld`_dyld_start
dyld`_dyld_start:
->  0x102491000 <+0>: popq   %rdi
    0x102491001 <+1>: pushq  $0x0
    0x102491003 <+3>: movq   %rsp, %rbp
    0x102491006 <+6>: andq   $-0x10, %rsp
Target 0: (pmtad) stopped.

I've tried looking up issue relating to the dyld`_dyld_start print-out, as that's the only lead I could come up with. I read that this might be something having to do with trying to re-run the executable, though I wasn't very sure what was being described.

I should just be able to run this fine. It works on other machines with older OS's.


回答1:


The program you are running exec'ed another (or the same) binary. That's the meaning of the "stop reason = exec" message. By default, lldb stops when a program re-exec's itself, but if you want it not to, then do:

(lldb) settings set target.process.stop-on-exec false

You can also put this in your ~/.lldbinit.



来源:https://stackoverflow.com/questions/57065144/how-to-fix-lldb-stopping-immediately-after-run-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!