Batch execution

Dear developers,

according to lldb -h the option -b / --batch should return to the command prompt if the underlying process hits a crash, something that does not happen in my case:

echo “run” > /tmp/after_load.txt

lldb -s /tmp/after_load.txt -b – helloworld 2

(lldb) target create “helloworld”
Current executable set to ‘helloworld’ (x86_64).
(lldb) settings set – target.run-args “2”
(lldb) command source -s 0 ‘/tmp/after_load.txt’
Executing commands in ‘/tmp/after_load.txt’.
(lldb) run
Process 26342 exited with status = 0 (0x00000000)

Process 26342 launched: ‘/tmp/helloworld’ (x86_64)

lldb -s /tmp/after_load.txt -b – helloworld 3

(lldb) target create “helloworld”
Current executable set to ‘helloworld’ (x86_64).
(lldb) settings set – target.run-args “3”
(lldb) command source -s 0 ‘/tmp/after_load.txt’
Executing commands in ‘/tmp/after_load.txt’.
(lldb) run
Process 26423 stopped

  • thread #1, name = ‘helloworld’, stop reason = unknown crash reason
    frame #0: 0x00007ffff7a86d7f libc.so.6__GI_raise + 271 libc.so.6__GI_raise:
    → 0x7ffff7a86d7f <+271>: movq 0x108(%rsp), %rcx
    0x7ffff7a86d87 <+279>: xorq %fs:0x28, %rcx
    0x7ffff7a86d90 <+288>: movl %r8d, %eax
    0x7ffff7a86d93 <+291>: jne 0x7ffff7a86dae ; <+318>

Process 26423 launched: ‘/tmp/helloworld’ (x86_64)