Skip to content

Commit 6942703

Browse files
oltolmWebFreak001
authored andcommitted
add "override" to methods
1 parent 04068e9 commit 6942703

5 files changed

Lines changed: 29 additions & 29 deletions

File tree

src/backend/mi2/mi2mago.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Stack } from "../backend";
33
import { MINode } from "../mi_parse";
44

55
export class MI2_Mago extends MI2_LLDB {
6-
getStack(startFrame: number, maxLevels: number, thread: number): Promise<Stack[]> {
6+
override getStack(startFrame: number, maxLevels: number, thread: number): Promise<Stack[]> {
77
return new Promise((resolve, reject) => {
88
const command = "stack-list-frames";
99
this.sendCommand(command).then((result) => {

src/gdb.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface AttachRequestArguments extends DebugProtocol.AttachRequestArgum
4040
}
4141

4242
class GDBDebugSession extends MI2DebugSession {
43-
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
43+
protected override initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
4444
response.body.supportsGotoTargetsRequest = true;
4545
response.body.supportsHitConditionalBreakpoints = true;
4646
response.body.supportsConfigurationDoneRequest = true;
@@ -52,7 +52,7 @@ class GDBDebugSession extends MI2DebugSession {
5252
this.sendResponse(response);
5353
}
5454

55-
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
55+
protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
5656
const dbgCommand = args.gdbpath || "gdb";
5757
if (this.checkCommand(dbgCommand)) {
5858
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
@@ -98,7 +98,7 @@ class GDBDebugSession extends MI2DebugSession {
9898
}
9999
}
100100

101-
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
101+
protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
102102
const dbgCommand = args.gdbpath || "gdb";
103103
if (this.checkCommand(dbgCommand)) {
104104
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);

src/lldb.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface AttachRequestArguments extends DebugProtocol.AttachRequestArgum
3737
}
3838

3939
class LLDBDebugSession extends MI2DebugSession {
40-
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
40+
protected override initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
4141
response.body.supportsGotoTargetsRequest = true;
4242
response.body.supportsHitConditionalBreakpoints = true;
4343
response.body.supportsConfigurationDoneRequest = true;
@@ -47,7 +47,7 @@ class LLDBDebugSession extends MI2DebugSession {
4747
this.sendResponse(response);
4848
}
4949

50-
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
50+
protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
5151
const dbgCommand = args.lldbmipath || "lldb-mi";
5252
if (this.checkCommand(dbgCommand)) {
5353
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
@@ -93,7 +93,7 @@ class LLDBDebugSession extends MI2DebugSession {
9393
}
9494
}
9595

96-
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
96+
protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
9797
const dbgCommand = args.lldbmipath || "lldb-mi";
9898
if (this.checkCommand(dbgCommand)) {
9999
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);

src/mago.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MagoDebugSession extends MI2DebugSession {
3636
super(debuggerLinesStartAt1, isServer);
3737
}
3838

39-
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
39+
protected override initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
4040
response.body.supportsHitConditionalBreakpoints = true;
4141
response.body.supportsConfigurationDoneRequest = true;
4242
response.body.supportsConditionalBreakpoints = true;
@@ -49,7 +49,7 @@ class MagoDebugSession extends MI2DebugSession {
4949
return 0;
5050
}
5151

52-
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
52+
protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
5353
const dbgCommand = args.magomipath || "mago-mi";
5454
if (this.checkCommand(dbgCommand)) {
5555
this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`);
@@ -73,7 +73,7 @@ class MagoDebugSession extends MI2DebugSession {
7373
});
7474
}
7575

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

src/mibase.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class MI2DebugSession extends DebugSession {
182182
this.quitEvent();
183183
}
184184

185-
protected disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments): void {
185+
protected override disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments): void {
186186
if (this.attached)
187187
this.miDebugger.detach();
188188
else
@@ -192,7 +192,7 @@ export class MI2DebugSession extends DebugSession {
192192
this.sendResponse(response);
193193
}
194194

195-
protected async setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): Promise<void> {
195+
protected override async setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): Promise<void> {
196196
try {
197197
if (this.useVarObjects) {
198198
let name = args.name;
@@ -219,7 +219,7 @@ export class MI2DebugSession extends DebugSession {
219219
}
220220
}
221221

222-
protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
222+
protected override setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
223223
const all = [];
224224
args.breakpoints.forEach(brk => {
225225
all.push(this.miDebugger.addBreakPoint({ raw: brk.name, condition: brk.condition, countCondition: brk.hitCondition }));
@@ -239,7 +239,7 @@ export class MI2DebugSession extends DebugSession {
239239
});
240240
}
241241

242-
protected setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): void {
242+
protected override setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): void {
243243
let path = args.source.path;
244244
if (this.isSSH) {
245245
// convert local path to ssh path
@@ -269,7 +269,7 @@ export class MI2DebugSession extends DebugSession {
269269
});
270270
}
271271

272-
protected threadsRequest(response: DebugProtocol.ThreadsResponse): void {
272+
protected override threadsRequest(response: DebugProtocol.ThreadsResponse): void {
273273
if (!this.miDebugger) {
274274
this.sendResponse(response);
275275
return;
@@ -300,7 +300,7 @@ export class MI2DebugSession extends DebugSession {
300300
return [frameId & 0xffff, frameId >> 16];
301301
}
302302

303-
protected stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void {
303+
protected override stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void {
304304
this.miDebugger.getStack(args.startFrame, args.levels, args.threadId).then(stack => {
305305
const ret: StackFrame[] = [];
306306
stack.forEach(element => {
@@ -334,7 +334,7 @@ export class MI2DebugSession extends DebugSession {
334334
});
335335
}
336336

337-
protected configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): void {
337+
protected override configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): void {
338338
const promises: Thenable<any>[] = [];
339339
let entryPoint: string | undefined = undefined;
340340
let runToStart: boolean = false;
@@ -403,7 +403,7 @@ export class MI2DebugSession extends DebugSession {
403403
});
404404
}
405405

406-
protected scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void {
406+
protected override scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void {
407407
const scopes = new Array<Scope>();
408408
const [threadId, level] = this.frameIdToThreadAndLevel(args.frameId);
409409

@@ -430,7 +430,7 @@ export class MI2DebugSession extends DebugSession {
430430
this.sendResponse(response);
431431
}
432432

433-
protected async variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> {
433+
protected override async variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> {
434434
const variables: DebugProtocol.Variable[] = [];
435435
const id: VariableScope | string | VariableObject | ExtendedVariable = this.variableHandles.get(args.variablesReference);
436436

@@ -649,63 +649,63 @@ export class MI2DebugSession extends DebugSession {
649649
}
650650
}
651651

652-
protected pauseRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void {
652+
protected override pauseRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void {
653653
this.miDebugger.interrupt().then(done => {
654654
this.sendResponse(response);
655655
}, msg => {
656656
this.sendErrorResponse(response, 3, `Could not pause: ${msg}`);
657657
});
658658
}
659659

660-
protected reverseContinueRequest(response: DebugProtocol.ReverseContinueResponse, args: DebugProtocol.ReverseContinueArguments): void {
660+
protected override reverseContinueRequest(response: DebugProtocol.ReverseContinueResponse, args: DebugProtocol.ReverseContinueArguments): void {
661661
this.miDebugger.continue(true).then(done => {
662662
this.sendResponse(response);
663663
}, msg => {
664664
this.sendErrorResponse(response, 2, `Could not continue: ${msg}`);
665665
});
666666
}
667667

668-
protected continueRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void {
668+
protected override continueRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void {
669669
this.miDebugger.continue().then(done => {
670670
this.sendResponse(response);
671671
}, msg => {
672672
this.sendErrorResponse(response, 2, `Could not continue: ${msg}`);
673673
});
674674
}
675675

676-
protected stepBackRequest(response: DebugProtocol.StepBackResponse, args: DebugProtocol.StepBackArguments): void {
676+
protected override stepBackRequest(response: DebugProtocol.StepBackResponse, args: DebugProtocol.StepBackArguments): void {
677677
this.miDebugger.step(true).then(done => {
678678
this.sendResponse(response);
679679
}, msg => {
680680
this.sendErrorResponse(response, 4, `Could not step back: ${msg} - Try running 'target record-full' before stepping back`);
681681
});
682682
}
683683

684-
protected stepInRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
684+
protected override stepInRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
685685
this.miDebugger.step().then(done => {
686686
this.sendResponse(response);
687687
}, msg => {
688688
this.sendErrorResponse(response, 4, `Could not step in: ${msg}`);
689689
});
690690
}
691691

692-
protected stepOutRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
692+
protected override stepOutRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
693693
this.miDebugger.stepOut().then(done => {
694694
this.sendResponse(response);
695695
}, msg => {
696696
this.sendErrorResponse(response, 5, `Could not step out: ${msg}`);
697697
});
698698
}
699699

700-
protected nextRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
700+
protected override nextRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
701701
this.miDebugger.next().then(done => {
702702
this.sendResponse(response);
703703
}, msg => {
704704
this.sendErrorResponse(response, 6, `Could not step over: ${msg}`);
705705
});
706706
}
707707

708-
protected evaluateRequest(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments): void {
708+
protected override evaluateRequest(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments): void {
709709
const [threadId, level] = this.frameIdToThreadAndLevel(args.frameId);
710710
if (args.context == "watch" || args.context == "hover") {
711711
this.miDebugger.evalExpression(args.expression, threadId, level).then((res) => {
@@ -736,7 +736,7 @@ export class MI2DebugSession extends DebugSession {
736736
}
737737
}
738738

739-
protected gotoTargetsRequest(response: DebugProtocol.GotoTargetsResponse, args: DebugProtocol.GotoTargetsArguments): void {
739+
protected override gotoTargetsRequest(response: DebugProtocol.GotoTargetsResponse, args: DebugProtocol.GotoTargetsArguments): void {
740740
const path: string = this.isSSH ? this.sourceFileMap.toRemotePath(args.source.path) : args.source.path;
741741
this.miDebugger.goto(path, args.line).then(done => {
742742
response.body = {
@@ -753,7 +753,7 @@ export class MI2DebugSession extends DebugSession {
753753
});
754754
}
755755

756-
protected gotoRequest(response: DebugProtocol.GotoResponse, args: DebugProtocol.GotoArguments): void {
756+
protected override gotoRequest(response: DebugProtocol.GotoResponse, args: DebugProtocol.GotoArguments): void {
757757
this.sendResponse(response);
758758
}
759759

0 commit comments

Comments
 (0)