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

Method getThreads

src/backend/mi2/mi2.ts:671–689  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

669 }
670
671 async getThreads(): Promise<Thread[]> {
672 if (trace) this.log("stderr", "getThreads");
673
674 const command = "thread-info";
675 const result = await this.sendCommand(command);
676 const threads = result.result("threads");
677 const ret: Thread[] = [];
678 return threads.map(element => {
679 const ret: Thread = {
680 id: parseInt(MINode.valueOf(element, "id")),
681 targetId: MINode.valueOf(element, "target-id")
682 };
683
684 ret.name = MINode.valueOf(element, "details")
685 || undefined;
686
687 return ret;
688 });
689 }
690
691 async getStack(startFrame: number, maxLevels: number, thread: number): Promise<Stack[]> {
692 if (trace) this.log("stderr", "getStack");

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