MCPcopy Create free account
hub / github.com/bloomberg/pystack / getAddressforSymbol

Method getAddressforSymbol

src/pystack/_pystack/unwinder.cpp:387–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387remote_addr_t
388AbstractUnwinder::getAddressforSymbol(const std::string& symbol, const std::string& modulename) const
389{
390 LOG(DEBUG) << "Trying to find address for symbol " << symbol;
391 ModuleArg arg = {symbol.c_str(), modulename.c_str(), 0};
392 if (dwfl_getmodules(Dwfl(), module_callback, &arg, 0) == -1) {
393 throw UnwinderError("Failed to fetch modules!");
394 }
395 LOG(DEBUG) << "Address for symbol " << symbol << " resolved to: " << std::hex << std::showbase
396 << arg.addr;
397 return arg.addr;
398}
399
400std::string
401AbstractUnwinder::demangleSymbol(const std::string& symbol)

Callers 1

findSymbolMethod · 0.80

Calls 3

LOGClass · 0.85
UnwinderErrorClass · 0.85
DwflClass · 0.70

Tested by

no test coverage detected