| 354 | } |
| 355 | |
| 356 | remote_addr_t |
| 357 | AbstractProcessManager::findInterpreterStateFromPyRuntime(remote_addr_t runtime_addr) const |
| 358 | { |
| 359 | LOG(INFO) << "Searching for PyInterpreterState based on PyRuntime address " << std::hex |
| 360 | << std::showbase << runtime_addr; |
| 361 | |
| 362 | Structure<py_runtime_v> py_runtime(shared_from_this(), runtime_addr); |
| 363 | remote_addr_t interp_state = py_runtime.getField(&py_runtime_v::o_interp_head); |
| 364 | |
| 365 | if (!isValidInterpreterState(interp_state)) { |
| 366 | LOG(INFO) << "Failing to resolve PyInterpreterState based on PyRuntime address " << std::hex |
| 367 | << std::showbase << runtime_addr; |
| 368 | return (remote_addr_t)NULL; |
| 369 | } |
| 370 | |
| 371 | LOG(DEBUG) << "Interpreter head reference from symbol dereference successfully"; |
| 372 | return interp_state; |
| 373 | } |
| 374 | |
| 375 | remote_addr_t |
| 376 | AbstractProcessManager::scanMemoryAreaForInterpreterState(const VirtualMap& map) const |