MCPcopy Create free account
hub / github.com/apitrace/apitrace / tryLib

Function tryLib

cli/cli_resources.cpp:39–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37#include <dlfcn.h>
38
39static bool
40tryLib(const os::String &path, bool verbose)
41{
42 void *handle = dlopen(path.str(), RTLD_LAZY);
43 bool exists = (handle != NULL);
44 if (verbose) {
45 if (exists) {
46 std::cerr << "info: found " << path.str() << "\n";
47 } else {
48 std::cerr << "info: did not find " << dlerror() << "\n";
49 }
50 }
51 if (exists)
52 dlclose(handle);
53 return exists;
54}
55#endif
56
57static bool

Callers 1

findWrapperFunction · 0.85

Calls 2

dlopenFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected