3 #include "lldb/API/LLDB.h"
4 #include "lldb/API/SBDebugger.h"
5 #include "lldb/API/SBTarget.h"
8 int main (int argc
, char **argv
)
10 // We are expecting the program path and a path to an executable to load
13 const char *program_file
= argv
[1];
14 SBDebugger::Initialize();
15 SBDebugger debugger
= SBDebugger::Create(false);
18 SBTarget target
= debugger
.CreateTarget(program_file
, nullptr, nullptr,
22 // Create 3 targets at the same time and make sure we don't crash.
23 std::thread
thread1(lambda
);
24 std::thread
thread2(lambda
);
25 std::thread
thread3(lambda
);
29 SBDebugger::Terminate();