Skip to content

Commit

Permalink
1.fix gdb check error
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRiley0 committed May 31, 2024
1 parent 004e120 commit 2869f94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class GDBDebugSession extends MI2DebugSession {

protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
const dbgCommand = args.gdbpath || "gdb";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand Down Expand Up @@ -101,7 +101,7 @@ class GDBDebugSession extends MI2DebugSession {

protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
const dbgCommand = args.gdbpath || "gdb";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/lldb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class LLDBDebugSession extends MI2DebugSession {

protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
const dbgCommand = args.lldbmipath || "lldb-mi";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand Down Expand Up @@ -95,7 +95,7 @@ class LLDBDebugSession extends MI2DebugSession {

protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
const dbgCommand = args.lldbmipath || "lldb-mi";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/mago.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MagoDebugSession extends MI2DebugSession {

protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
const dbgCommand = args.magomipath || "mago-mi";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand All @@ -75,7 +75,7 @@ class MagoDebugSession extends MI2DebugSession {

protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
const dbgCommand = args.magomipath || "mago-mi";
if (this.checkCommand(dbgCommand)) {
if (!this.checkCommand(dbgCommand)) {
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
return;
}
Expand Down

0 comments on commit 2869f94

Please sign in to comment.