| 218 | } |
| 219 | |
| 220 | lldb::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 | |
| 241 | NodeInstance* Debugger::nodeFromFrame(lldb::SBFrame frame) { |
| 242 | using namespace std::string_literals; |
no test coverage detected