Skip to content

Commit

Permalink
fix problems found in review
Browse files Browse the repository at this point in the history
  • Loading branch information
oltolm committed Mar 10, 2024
1 parent ec2a93a commit 5e9abd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/backend/mi2/mi2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class MI2 extends EventEmitter implements IBackend {
}

onOutputStderr(str: string) {
let lines = str.split('\n');
const lines = str.split('\n');
lines.forEach(line => {
this.log("stderr", line);
});
Expand All @@ -330,7 +330,7 @@ export class MI2 extends EventEmitter implements IBackend {
}

onOutput(str: string) {
let lines = str.split('\n');
const lines = str.split('\n');
lines.forEach(line => {
if (couldBeOutput(line)) {
if (!gdbMatch.exec(line))
Expand Down Expand Up @@ -835,7 +835,7 @@ export class MI2 extends EventEmitter implements IBackend {
this.log("stderr", "varCreate");
let miCommand = "var-create ";
if (threadId != 0) {
miCommand += `--thread ${threadId} --frame ${frameLevel}`
miCommand += `--thread ${threadId} --frame ${frameLevel}`;
}
const res = await this.sendCommand(`${miCommand} ${this.quote(name)} ${frame} "${expression}"`);
return new VariableObject(res.result(""));
Expand Down
3 changes: 2 additions & 1 deletion src/mibase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ export class MI2DebugSession extends DebugSession {
this.sendResponse(response);
}).catch((error: MIError) => {
if (error.message === 'Selected thread is running.') {
console.error(error);
console.error(error.message);

Check failure on line 288 in src/mibase.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement.
this.sendResponse(response);
return;
}
this.sendErrorResponse(response, 17, `Could not get threads: ${error}`);
Expand Down

0 comments on commit 5e9abd8

Please sign in to comment.