Skip to content

Commit

Permalink
Add debug code to dlopen-ping-pong/binding.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Sep 10, 2019
1 parent 5f84071 commit 9ab7107
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/addons/dlopen-ping-pong/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static ping ping_func;
void LoadLibrary(const FunctionCallbackInfo<Value>& args) {
const String::Utf8Value filename(args.GetIsolate(), args[0]);
void* handle = dlopen(*filename, RTLD_LAZY);
if (handle == nullptr) fprintf(stderr, "dlopen(%s): %s\n", *filename, dlerror());
assert(handle != nullptr);
ping_func = reinterpret_cast<ping>(dlsym(handle, "dlopen_ping"));
assert(ping_func != nullptr);
Expand Down

0 comments on commit 9ab7107

Please sign in to comment.