Skip to content

Commit

Permalink
[LLDB] wasm: Add create_target API call
Browse files Browse the repository at this point in the history
  • Loading branch information
jawilk committed Oct 1, 2022
1 parent 12a948e commit 7a14bd2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lldb/tools/driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ using namespace std;

extern "C" {
EMSCRIPTEN_KEEPALIVE const char* execute_command(const char* input);
EMSCRIPTEN_KEEPALIVE void create_target(const char* path);
}

class LLDBSentry {
Expand Down Expand Up @@ -866,4 +867,14 @@ const char* execute_command(const char* command) {
cout << "result: " << result.GetOutput() << "\n";
return strdup(result.GetOutput());
}

void create_target(const char* path) {
cout << "LLDB WASM call - " << __FUNCTION__ << " path: " << path << "\n";

SBError error;
const char *arch = NULL;
const char *platform = NULL;
const bool add_dependent_libs = false;
g_debugger.CreateTarget(path, arch, platform, add_dependent_libs, error);
}
#endif

0 comments on commit 7a14bd2

Please sign in to comment.