MCPcopy Create free account
hub / github.com/chigraph/chigraph / inspectNodeOutput

Method inspectNodeOutput

libchigraphdebugger/src/Debugger.cpp:220–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220lldb::SBValue Debugger::inspectNodeOutput(const NodeInstance& inst, size_t id,
221 lldb::SBFrame frame) {
222 assert(id < inst.outputDataConnections.size());
223
224 // if frame isn't valid, use the default
225 if (!frame.IsValid()) {
226 auto thread = lldbProcess().GetSelectedThread();
227 if (!thread.IsValid()) { return {}; }
228 frame = thread.GetSelectedFrame();
229 }
230
231 if (!frame.IsValid()) { return {}; }
232
233 // make sure it's in scope
234 auto func = &nodeFromFrame(frame)->function();
235 if (func != &inst.function()) { return {}; }
236
237 auto variableName = inst.stringId() + "__" + std::to_string(id);
238 return frame.FindVariable(variableName.c_str());
239}
240
241NodeInstance* Debugger::nodeFromFrame(lldb::SBFrame frame) {
242 using namespace std::string_literals;

Callers 1

DebuggerTests.cppFile · 0.80

Calls 2

stringIdMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected