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

Method getFrameAddr

src/pystack/_pystack/pythread.cpp:213–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213remote_addr_t
214PyThread::getFrameAddr(
215 const std::shared_ptr<const AbstractProcessManager>& manager,
216 Structure<py_thread_v>& ts)
217{
218 if (manager->versionIsAtLeast(3, 11) && !manager->versionIsAtLeast(3, 13)) {
219 remote_addr_t cframe_addr = ts.getField(&py_thread_v::o_frame);
220 if (!manager->isAddressValid(cframe_addr)) {
221 return reinterpret_cast<remote_addr_t>(nullptr);
222 }
223
224 Structure<py_cframe_v> cframe(manager, cframe_addr);
225 return cframe.getField(&py_cframe_v::current_frame);
226 } else {
227 return ts.getField(&py_thread_v::o_frame);
228 }
229}
230
231std::shared_ptr<FrameObject>
232PyThread::FirstFrame() const

Callers

nothing calls this directly

Calls 2

versionIsAtLeastMethod · 0.80
isAddressValidMethod · 0.45

Tested by

no test coverage detected