Create a similar funciton which does not pass the pointer to thread state, only the manager and the tid
| 358 | // Create a similar funciton which does not pass the pointer to thread state, only the manager and the |
| 359 | // tid |
| 360 | std::shared_ptr<PyThread> |
| 361 | getThreadFromInterpreterState( |
| 362 | const std::shared_ptr<const AbstractProcessManager>& manager, |
| 363 | remote_addr_t addr) |
| 364 | { |
| 365 | if (tid_offset_in_pthread_struct == 0) { |
| 366 | tid_offset_in_pthread_struct = findPthreadTidOffset(manager, addr); |
| 367 | } |
| 368 | |
| 369 | LOG(DEBUG) << std::hex << std::showbase << "Copying PyInterpreterState struct from address " << addr; |
| 370 | Structure<py_is_v> is(manager, addr); |
| 371 | auto thread_addr = is.getField(&py_is_v::o_tstate_head); |
| 372 | return std::make_shared<PyThread>(manager, thread_addr); |
| 373 | } |
| 374 | |
| 375 | } // namespace pystack |
nothing calls this directly
no test coverage detected