MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / resolveSym

Method resolveSym

Suscan/Plugin.cpp:194–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void *
195Plugin::resolveSym(std::string const &sym)
196{
197 void *addr;
198 std::string full_name =
199 STRINGIFY(SUSCAN_SYM_PFX) + sym;
200
201 if (sym == SIGDIGGER_PLUGIN_MANGLED_ENTRY)
202 full_name = sym;
203
204 addr = dlsym(this->m_handle, full_name.c_str());
205
206 if (addr == nullptr) {
207 SU_ERROR(
208 "%s: cannot resolve plugin symbol `%s'\n",
209 this->m_path.c_str(),
210 sym.c_str());
211 return nullptr;
212 }
213
214 return addr;
215}
216
217Plugin::Plugin(
218 std::string const &name,

Callers 1

loadMethod · 0.95

Calls 1

dlsymFunction · 0.85

Tested by

no test coverage detected