[lldb-dev] Stopping "stop reason = exec"

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Mon Dec 4 15:50:10 PST 2017


There isn't a setting to auto-continue from exec.  Definitely should be.  

If somebody wants to try their hand at it, just add a setting in parallel to stop-on-sharedlibrary-events and then add a ShouldStop to the StopInfoExec (StopInfo.cpp) that checks this setting.  The StopInfoSignal does something equivalent, should be able to copy that.

For macOS, you can also just do:

(lldb) break set -n _dyld_start --skip-prologue 0 -s dyld
Breakpoint 2: where = dyld`_dyld_start, address = 0x000000010000b19c
(lldb) b com add -o continue

either in your .lldbinit or in your debug session.  If you are using TOT lldb you can do:

(lldb) break set -n _dyld_start --skip-prologue 0 -s dyld --auto-continue 1

Jim


> On Dec 4, 2017, at 3:29 PM, Chris Lattner via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> Is there anything I can put into my lldb init script to prevent LLDB from stopping on exec?  Every time I run a program I get this super irritating behavior:
> 
> Thanks for any help!
> 
> -Chris
> 
> 
> Process 20310 launched: '/Users/clattner/Projects/build/Xcode-ReleaseAssert+swift-DebugAssert/swift-macosx-x86_64/Debug/bin/swift' (x86_64)
> Process 20310 stopped
> * thread #2, stop reason = exec
>    frame #0: 0x000000010984f000 dyld`_dyld_start
> dyld`_dyld_start:
> ->  0x10984f000 <+0>: popq   %rdi
>    0x10984f001 <+1>: pushq  $0x0
>    0x10984f003 <+3>: movq   %rsp, %rbp
>    0x10984f006 <+6>: andq   $-0x10, %rsp
> Target 0: (swift) stopped.
> (lldb)
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev



More information about the lldb-dev mailing list