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

Method TupleObject

src/pystack/_pystack/pytypes.cpp:86–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86TupleObject::TupleObject(
87 const std::shared_ptr<const AbstractProcessManager>& manager,
88 remote_addr_t addr)
89{
90 d_manager = manager;
91
92 Structure<py_tuple_v> tuple(manager, addr);
93 ssize_t num_items = tuple.getField(&py_tuple_v::o_ob_size);
94 if (num_items == 0) {
95 LOG(DEBUG) << std::hex << std::showbase << "There are no elements in this tuple";
96 return;
97 }
98 d_items.resize(num_items);
99 manager->copyMemoryFromProcess(
100 tuple.getFieldRemoteAddress(&py_tuple_v::o_ob_item),
101 num_items * sizeof(PyObject*),
102 d_items.data());
103}
104
105std::string
106TupleObject::toString(ssize_t max_size) const

Callers

nothing calls this directly

Calls 3

LOGClass · 0.85
getFieldRemoteAddressMethod · 0.80
copyMemoryFromProcessMethod · 0.45

Tested by

no test coverage detected