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

Function getLoadPointOfModule

src/pystack/_pystack/elf_common.cpp:523–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523uintptr_t
524getLoadPointOfModule(const dwfl_unique_ptr& dwfl, const std::string& mod)
525{
526 LOG(DEBUG) << "Finding load point of binary " << mod;
527 auto args = std::pair<uintptr_t, const std::string&>(0, mod);
528 if (dwfl_getmodules(dwfl.get(), module_callback, &args, 0) == -1) {
529 LOG(ERROR) << "Failed to obtain load point of binary " << mod;
530 return 0;
531 }
532 LOG(DEBUG) << "Load point of module found at " << std::hex << std::showbase << args.first;
533 return args.first;
534}
535
536std::string
537buildIdPtrToString(const uint8_t* id, ssize_t size)

Callers 1

Calls 1

LOGClass · 0.85

Tested by

no test coverage detected