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

Method findDebugOffsetsFromMaps

src/pystack/_pystack/process.cpp:484–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484remote_addr_t
485AbstractProcessManager::findDebugOffsetsFromMaps() const
486{
487 LOG(INFO) << "Scanning all writable path-backed maps for _Py_DebugOffsets";
488 for (auto& map : d_memory_maps) {
489 if (map.Flags().find("w") != std::string::npos && !map.Path().empty()) {
490 LOG(DEBUG) << std::hex << std::showbase << "Attempting to locate _Py_DebugOffsets in map of "
491 << map.Path() << " starting at " << map.Start() << " and ending at " << map.End();
492 LOG(DEBUG) << "Flags: " << map.Flags();
493 try {
494 if (remote_addr_t result = scanMemoryAreaForDebugOffsets(map)) {
495 return result;
496 }
497 } catch (RemoteMemCopyError& ex) {
498 LOG(INFO) << "Failed to scan map starting at " << map.Start();
499 }
500 }
501 }
502 return 0;
503}
504
505ssize_t
506AbstractProcessManager::copyMemoryFromProcess(remote_addr_t addr, size_t size, void* destination) const

Callers

nothing calls this directly

Calls 3

LOGClass · 0.85
StartMethod · 0.80
EndMethod · 0.80

Tested by

no test coverage detected