I'm getting started with LLDB and am following the tutorial here: https://lldb.llvm.org/python_reference/lldb.SBDebugger-class.html. Whenever I Launch a target the process gets stuck in the launching state and will never launch. I've tried lldb in bash and it works perfectly. I've read through the documentation with the tutorial and can't find an explanation about the launching state, or how to discover what is causing it to get stuck.
System is Ubuntu 18.04 64 bit dual core 8GB RAM using python2.7.
The most simple code to reproduce the error is as follows:
import lldb
import os
exe = './a.out'
db = lldb.SBDebugger.Create()
db.SetAsync(False)
target = db.CreateTargetWithFileAndArch(exe, 'x86_64-linux-gnu')
pro = target.LaunchSimple(None,None,os.getcwd())
print(pro)
Running the python code will always give me the following output:
SBProcess: pid = 0, state = launching, threads = 0, executable = a.out
The a.out is just a heloworld.cpp compiled with clang++ -fstandalone-debug
UPDATE: Thanks to Jim's suggestion I tried SBTarget.Launch() instead and used the error to discover that lldb could not find lldb-server-6.0.0 because it installs as lldb-server-6.0
The Fix
sudo ln -s /usr/bin/lldb-server6.0 /usr/bin/lldb-server6.0.0