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

Method FrameObject

src/pystack/_pystack/pyframe.cpp:14–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13namespace pystack {
14FrameObject::FrameObject(
15 const std::shared_ptr<const AbstractProcessManager>& manager,
16 remote_addr_t addr,
17 ssize_t frame_no)
18: d_manager(manager)
19{
20 LOG(DEBUG) << "Copying frame number " << frame_no;
21 LOG(DEBUG) << std::hex << std::showbase << "Copying frame struct from address " << addr;
22 Structure<py_frame_v> frame(manager, addr);
23
24 d_addr = addr;
25 d_frame_no = frame_no;
26 d_is_shim = getIsShim(manager, frame);
27
28 ssize_t next_frame_no = frame_no + 1;
29 if (d_is_shim) {
30 LOG(DEBUG) << "Skipping over a shim frame inserted by the interpreter";
31 next_frame_no = frame_no;
32 } else {
33 d_code = getCode(manager, frame);
34 }
35
36 auto prev_addr = frame.getField(&py_frame_v::o_back);
37 LOG(DEBUG) << std::hex << std::showbase << "Previous frame address: " << prev_addr;
38 if (prev_addr) {
39 d_prev = std::make_shared<FrameObject>(manager, prev_addr, next_frame_no);
40 }
41 d_is_entry = isEntry(manager, frame);
42}
43
44bool
45FrameObject::getIsShim(

Callers

nothing calls this directly

Calls 1

LOGClass · 0.85

Tested by

no test coverage detected