MCPcopy Create free account
hub / github.com/WebFreak001/code-debug / getStackVariables

Method getStackVariables

src/backend/mi2/mi2.ts:740–759  ·  view source on GitHub ↗
(thread: number, frame: number)

Source from the content-addressed store, hash-verified

738 }
739
740 async getStackVariables(thread: number, frame: number): Promise<Variable[]> {
741 if (trace)
742 this.log("stderr", "getStackVariables");
743
744 const result = await this.sendCommand(`stack-list-variables --thread ${thread} --frame ${frame} --simple-values`);
745 const variables = result.result("variables");
746 const ret: Variable[] = [];
747 for (const element of variables) {
748 const key = MINode.valueOf(element, "name");
749 const value = MINode.valueOf(element, "value");
750 const type = MINode.valueOf(element, "type");
751 ret.push({
752 name: key,
753 valueStr: value,
754 type: type,
755 raw: element
756 });
757 }
758 return ret;
759 }
760
761 async getRegisters(): Promise<Variable[]> {
762 if (trace)

Callers

nothing calls this directly

Calls 4

logMethod · 0.95
sendCommandMethod · 0.95
resultMethod · 0.80
valueOfMethod · 0.80

Tested by

no test coverage detected