Skip to content

Commit 1bc996d

Browse files
committed
Updated to CLI version 0.9.0-rc2
1 parent beb529c commit 1bc996d

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

arduino-debugger-extension/src/node/debug-adapter/arduino-debug-session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class ArduinoDebugSession extends GDBDebugSession {
9191
// new Scope('Pins', this.variableHandles.create(pins), false),
9292
new Scope('Local', this.variableHandles.create(frame), false),
9393
new Scope('Global', GLOBAL_HANDLE_ID, false),
94-
new Scope('Static', STATIC_HANDLES_START + parseInt(args.frameId as any, 10), false)
94+
// new Scope('Static', STATIC_HANDLES_START + parseInt(args.frameId as any, 10), false)
9595
],
9696
};
9797

arduino-debugger-extension/src/node/debug-adapter/arduino-variable-handler.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,28 @@ export class ArduinoVariableHandler {
4444
return variables;
4545
}
4646

47+
/** TODO */
48+
async getStaticVariables(frameHandle: number): Promise<DebugProtocol.Variable[]> {
49+
throw new Error('Static variables are not supported yet.');
50+
const frame = this.frameHandles.get(frameHandle);
51+
const result = await this.gdb.sendStackInfoFrame(this.gdb, frame.threadId, frame.frameId);
52+
const file = path.normalize(result.frame.file || '');
53+
const symbolInfo: any[] = [] // this.symbolTable.getStaticVariables(file);
54+
const variables: DebugProtocol.Variable[] = [];
55+
56+
// Fetch stack depth to obtain frameId/threadId/depth tuple
57+
const stackDepth = await mi.sendStackInfoDepth(this.gdb, { maxDepth: 100 });
58+
const depth = parseInt(stackDepth.depth, 10);
59+
60+
for (const symbol of symbolInfo) {
61+
const name = `${file}_static_var_${symbol.name}`;
62+
const variable = await this.getVariables(frame, name, symbol.name, depth);
63+
variables.push(variable);
64+
}
65+
66+
return variables;
67+
}
68+
4769
private async getVariables(frame: FrameReference, name: string, expression: string, depth: number): Promise<DebugProtocol.Variable> {
4870
let global = this.varMgr.getVar(frame.frameId, frame.threadId, depth, name);
4971

@@ -79,28 +101,6 @@ export class ArduinoVariableHandler {
79101
};
80102
}
81103

82-
/** TODO */
83-
async getStaticVariables(frameHandle: number): Promise<DebugProtocol.Variable[]> {
84-
throw new Error('Static variables are not supported yet.');
85-
const frame = this.frameHandles.get(frameHandle);
86-
const result = await this.gdb.sendStackInfoFrame(this.gdb, frame.threadId, frame.frameId);
87-
const file = path.normalize(result.frame.file || '');
88-
const symbolInfo: any[] = [] // this.symbolTable.getStaticVariables(file);
89-
const variables: DebugProtocol.Variable[] = [];
90-
91-
// Fetch stack depth to obtain frameId/threadId/depth tuple
92-
const stackDepth = await mi.sendStackInfoDepth(this.gdb, { maxDepth: 100 });
93-
const depth = parseInt(stackDepth.depth, 10);
94-
95-
for (const symbol of symbolInfo) {
96-
const name = `${file}_static_var_${symbol.name}`;
97-
const variable = await this.getVariables(frame, name, symbol.name, depth);
98-
variables.push(variable);
99-
}
100-
101-
return variables;
102-
}
103-
104104
async handlePinStatusRequest(): Promise<DebugProtocol.Variable[]> {
105105
const variables: DebugProtocol.Variable[] = [];
106106
variables.push({

arduino-ide-extension/scripts/download-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
(() => {
1212

13-
const DEFAULT_VERSION = '0.7.1'; // require('moment')().format('YYYYMMDD');
13+
const DEFAULT_VERSION = '0.9.0-rc2'; // require('moment')().format('YYYYMMDD');
1414

1515
const path = require('path');
1616
const shell = require('shelljs');

0 commit comments

Comments
 (0)