Skip to content

Commit 9ab7107

Browse files
committed
Add debug code to dlopen-ping-pong/binding.cc
1 parent 5f84071 commit 9ab7107

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/addons/dlopen-ping-pong/binding.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static ping ping_func;
2626
void LoadLibrary(const FunctionCallbackInfo<Value>& args) {
2727
const String::Utf8Value filename(args.GetIsolate(), args[0]);
2828
void* handle = dlopen(*filename, RTLD_LAZY);
29+
if (handle == nullptr) fprintf(stderr, "dlopen(%s): %s\n", *filename, dlerror());
2930
assert(handle != nullptr);
3031
ping_func = reinterpret_cast<ping>(dlsym(handle, "dlopen_ping"));
3132
assert(ping_func != nullptr);

0 commit comments

Comments
 (0)