Skip to content

Commit

Permalink
more fixes for #923
Browse files Browse the repository at this point in the history
  • Loading branch information
haneefdm committed Aug 26, 2023
1 parent 254af82 commit 6200c61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.12.1-pre2",
"version": "1.12.1-pre3",
"preview": false,
"activationEvents": [
"onDebugResolve:cortex-debug",
Expand Down
4 changes: 2 additions & 2 deletions src/backend/mi2/mi2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,8 @@ export class MI2 extends EventEmitter implements IBackend {
}

public static getThreadFrameStr(threadId: number, frameId: number): string {
const th = threadId > 0 ? `--thread ${threadId} ` : '';
const fr = frameId >= 0 ? `--frame ${frameId}` : '';
const th = ((threadId !== undefined) && (threadId > 0)) ? `--thread ${threadId} ` : '';
const fr = ((frameId !== undefined) && (frameId >= 0)) ? `--frame ${frameId}` : '';
return th + fr;
}

Expand Down
8 changes: 4 additions & 4 deletions src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1891,9 +1891,9 @@ export class GDBDebugSession extends LoggingDebugSession {
const isReg = (varRef >= HandleRegions.REG_HANDLE_START && varRef < HandleRegions.REG_HANDLE_FINISH);
const globOrStatic = !isReg && this.getFloatingVariable(varRef, name);
if (isReg) {
const varObj = await this.miDebugger.varCreate(varRef, '$' + name, '-', '*');
name = varObj.name;
[threadId, frameId] = decodeReference(varRef);
const varObj = await this.miDebugger.varCreate(varRef, '$' + name, '-', '*', threadId, frameId);
name = varObj.name;
} else if (globOrStatic) {
name = globOrStatic.name;
} else if (varRef >= HandleRegions.VAR_HANDLES_START) {
Expand All @@ -1908,7 +1908,7 @@ export class GDBDebugSession extends LoggingDebugSession {
[threadId, frameId] = decodeReference(varRef);
}
const res = await this.miDebugger.varAssign(name, args.value, threadId, frameId);
// TODO: Need to check for errors
// TODO: Need to check for errors? Currently handled by outer try/catch
response.body = {
value: res.result('value')
};
Expand Down Expand Up @@ -2662,7 +2662,7 @@ export class GDBDebugSession extends LoggingDebugSession {
if (isFloating) {
varObj = await this.miDebugger.varCreate(parentVarReference, symOrExpr, gdbVarName);
} else {
varObj = await this.miDebugger.varCreate(parentVarReference, symOrExpr, gdbVarName, '*', threadId, frameId);
varObj = await this.miDebugger.varCreate(parentVarReference, symOrExpr, gdbVarName, '@', threadId, frameId);
}
const varId = this.findOrCreateVariable(varObj);
varObj.exp = symOrExpr;
Expand Down

0 comments on commit 6200c61

Please sign in to comment.