]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/api/multithreaded/driver.cpp
Vendor import of lldb release_39 branch r287912:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / api / multithreaded / driver.cpp
1
2 /// LLDB C API Test Driver
3
4 #include <algorithm>
5 #include <iostream>
6 #include <iterator>
7 #include <string>
8 #include <vector>
9
10 #include "lldb-headers.h"
11
12 #include "common.h"
13
14 using namespace std;
15 using namespace lldb;
16
17 void test(SBDebugger &dbg, std::vector<string> args);
18
19 int main(int argc, char** argv) {
20   int code = 0;
21
22   SBDebugger::Initialize();
23   SBDebugger dbg = SBDebugger::Create();
24
25   try {
26     if (!dbg.IsValid())
27       throw Exception("invalid debugger");
28     vector<string> args(argv + 1, argv + argc);
29
30     test(dbg, args);
31   } catch (Exception &e) {
32     cout << "ERROR: " << e.what() << endl;
33     code = 1;
34   }
35
36   SBDebugger::Destroy(dbg);
37   return code;
38 }