diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
commit | 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch) | |
tree | dd2a1ddf0476664c2b823409c36cbccd52662ca7 /packages/Python/lldbsuite/test/api/multithreaded/driver.cpp | |
parent | 3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff) |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/api/multithreaded/driver.cpp')
-rw-r--r-- | packages/Python/lldbsuite/test/api/multithreaded/driver.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp b/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp new file mode 100644 index 0000000000000..fa0c48e0ecfbe --- /dev/null +++ b/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp @@ -0,0 +1,38 @@ + +/// LLDB C API Test Driver + +#include <algorithm> +#include <iostream> +#include <iterator> +#include <string> +#include <vector> + +#include "lldb-headers.h" + +#include "common.h" + +using namespace std; +using namespace lldb; + +void test(SBDebugger &dbg, std::vector<string> args); + +int main(int argc, char** argv) { + int code = 0; + + SBDebugger::Initialize(); + SBDebugger dbg = SBDebugger::Create(); + + try { + if (!dbg.IsValid()) + throw Exception("invalid debugger"); + vector<string> args(argv + 1, argv + argc); + + test(dbg, args); + } catch (Exception &e) { + cout << "ERROR: " << e.what() << endl; + code = 1; + } + + SBDebugger::Destroy(dbg); + return code; +} |