MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / GetSymbol

Function GetSymbol

framework/src/bundle/BundleUtils.cpp:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 void*
88 GetSymbol(void* libHandle, char const* symbol, std::string& errmsg)
89 {
90 void* addr = libHandle ? dlsym(libHandle, symbol) : nullptr;
91 if (!addr)
92 {
93 const std::string dlerrorMsg = dlerror();
94 errmsg += "GetSymbol() failed to find (" + std::string { symbol }
95 + ") with error : " + (!dlerrorMsg.empty() ? dlerrorMsg : "unknown");
96 }
97 return addr;
98 }
99
100 } // namespace BundleUtils
101

Callers

nothing calls this directly

Calls 3

dlsymFunction · 0.85
dlerrorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected