mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-21 04:25:45 -04:00

Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285542
39 lines
666 B
Plaintext
39 lines
666 B
Plaintext
|
|
/// LLDB C API Test Driver
|
|
|
|
#include <algorithm>
|
|
#include <iostream>
|
|
#include <iterator>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
%include_SB_APIs%
|
|
|
|
#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;
|
|
}
|