tslint: Enable semicolon
Not really necessary, but it's nice if code is consistently formatted.
This commit is contained in:
parent
37570139e3
commit
f6f071ccb8
9 changed files with 37 additions and 38 deletions
|
|
@ -133,7 +133,7 @@ export interface MIError extends Error {
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly message: string;
|
readonly message: string;
|
||||||
readonly source: string;
|
readonly source: string;
|
||||||
};
|
}
|
||||||
export interface MIErrorConstructor {
|
export interface MIErrorConstructor {
|
||||||
new (message: string, source: string): MIError;
|
new (message: string, source: string): MIError;
|
||||||
readonly prototype: MIError;
|
readonly prototype: MIError;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { MINode } from "./mi_parse"
|
import { MINode } from "./mi_parse";
|
||||||
|
|
||||||
const resultRegex = /^([a-zA-Z_\-][a-zA-Z0-9_\-]*|\[\d+\])\s*=\s*/;
|
const resultRegex = /^([a-zA-Z_\-][a-zA-Z0-9_\-]*|\[\d+\])\s*=\s*/;
|
||||||
const variableRegex = /^[a-zA-Z_\-][a-zA-Z0-9_\-]*/;
|
const variableRegex = /^[a-zA-Z_\-][a-zA-Z0-9_\-]*/;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as ChildProcess from "child_process"
|
import * as ChildProcess from "child_process";
|
||||||
import * as fs from "fs"
|
import * as fs from "fs";
|
||||||
|
|
||||||
export function spawnTerminalEmulator(preferedEmulator: string): Thenable<string> {
|
export function spawnTerminalEmulator(preferedEmulator: string): Thenable<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { Breakpoint, IBackend, Thread, Stack, SSHArguments, Variable, VariableObject, MIError } from "../backend"
|
import { Breakpoint, IBackend, Thread, Stack, SSHArguments, Variable, VariableObject, MIError } from "../backend";
|
||||||
import * as ChildProcess from "child_process"
|
import * as ChildProcess from "child_process";
|
||||||
import { EventEmitter } from "events"
|
import { EventEmitter } from "events";
|
||||||
import { parseMI, MINode } from '../mi_parse';
|
import { parseMI, MINode } from '../mi_parse';
|
||||||
import * as linuxTerm from '../linux/console';
|
import * as linuxTerm from '../linux/console';
|
||||||
import * as net from "net"
|
import * as net from "net";
|
||||||
import * as fs from "fs"
|
import * as fs from "fs";
|
||||||
import { posix } from "path"
|
import { posix } from "path";
|
||||||
import * as nativePath from "path"
|
import * as nativePath from "path";
|
||||||
const path = posix;
|
const path = posix;
|
||||||
import { Client } from "ssh2";
|
import { Client } from "ssh2";
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
||||||
if (process.platform == "win32") {
|
if (process.platform == "win32") {
|
||||||
if (separateConsole !== undefined)
|
if (separateConsole !== undefined)
|
||||||
promises.push(this.sendCommand("gdb-set new-console on"))
|
promises.push(this.sendCommand("gdb-set new-console on"));
|
||||||
Promise.all(promises).then(() => {
|
Promise.all(promises).then(() => {
|
||||||
this.emit("debug-ready");
|
this.emit("debug-ready");
|
||||||
resolve();
|
resolve();
|
||||||
|
|
@ -170,7 +170,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
if (procArgs && procArgs.length && !attach)
|
if (procArgs && procArgs.length && !attach)
|
||||||
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
||||||
Promise.all(promises).then(() => {
|
Promise.all(promises).then(() => {
|
||||||
this.emit("debug-ready")
|
this.emit("debug-ready");
|
||||||
resolve();
|
resolve();
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
|
|
@ -231,7 +231,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
commands.push(this.sendCommand("file-symbol-file \"" + escape(executable) + "\""));
|
commands.push(this.sendCommand("file-symbol-file \"" + escape(executable) + "\""));
|
||||||
}
|
}
|
||||||
Promise.all(commands).then(() => {
|
Promise.all(commands).then(() => {
|
||||||
this.emit("debug-ready")
|
this.emit("debug-ready");
|
||||||
resolve();
|
resolve();
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
|
|
@ -256,7 +256,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
this.sendCommand("environment-directory \"" + escape(cwd) + "\""),
|
this.sendCommand("environment-directory \"" + escape(cwd) + "\""),
|
||||||
this.sendCommand("target-select remote " + target)
|
this.sendCommand("target-select remote " + target)
|
||||||
]).then(() => {
|
]).then(() => {
|
||||||
this.emit("debug-ready")
|
this.emit("debug-ready");
|
||||||
resolve();
|
resolve();
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
|
|
@ -408,7 +408,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
this.stream.on("exit", function (code) {
|
this.stream.on("exit", function (code) {
|
||||||
clearTimeout(to);
|
clearTimeout(to);
|
||||||
})
|
});
|
||||||
this.sendRaw("-gdb-exit");
|
this.sendRaw("-gdb-exit");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -719,7 +719,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
async varUpdate(name: string = "*"): Promise<MINode> {
|
async varUpdate(name: string = "*"): Promise<MINode> {
|
||||||
if (trace)
|
if (trace)
|
||||||
this.log("stderr", "varUpdate");
|
this.log("stderr", "varUpdate");
|
||||||
return this.sendCommand(`var-update --all-values ${name}`)
|
return this.sendCommand(`var-update --all-values ${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async varAssign(name: string, rawValue: string): Promise<MINode> {
|
async varAssign(name: string, rawValue: string): Promise<MINode> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { MI2, escape } from "./mi2"
|
import { MI2, escape } from "./mi2";
|
||||||
import { Breakpoint } from "../backend"
|
import { Breakpoint } from "../backend";
|
||||||
import * as ChildProcess from "child_process"
|
import * as ChildProcess from "child_process";
|
||||||
import { posix } from "path"
|
import { posix } from "path";
|
||||||
import * as nativePath from "path"
|
import * as nativePath from "path";
|
||||||
const path = posix;
|
const path = posix;
|
||||||
|
|
||||||
export class MI2_LLDB extends MI2 {
|
export class MI2_LLDB extends MI2 {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { MI2_LLDB } from "./mi2lldb"
|
import { MI2_LLDB } from "./mi2lldb";
|
||||||
import { Stack } from "../backend"
|
import { Stack } from "../backend";
|
||||||
import { MINode } from "../mi_parse"
|
import { MINode } from "../mi_parse";
|
||||||
|
|
||||||
export class MI2_Mago extends MI2_LLDB {
|
export class MI2_Mago extends MI2_LLDB {
|
||||||
getStack(maxLevels: number, thread: number): Promise<Stack[]> {
|
getStack(maxLevels: number, thread: number): Promise<Stack[]> {
|
||||||
|
|
@ -29,7 +29,7 @@ export class MI2_Mago extends MI2_LLDB {
|
||||||
level: level,
|
level: level,
|
||||||
line: line
|
line: line
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
stack.forEach(element => {
|
stack.forEach(element => {
|
||||||
if (element)
|
if (element)
|
||||||
if (element[0] == "stack") {
|
if (element[0] == "stack") {
|
||||||
|
|
|
||||||
14
src/gdb.ts
14
src/gdb.ts
|
|
@ -87,10 +87,10 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
if (this.crashed)
|
if (this.crashed)
|
||||||
this.handlePause(undefined);
|
this.handlePause(undefined);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 100, `Failed to start MI Debugger: ${err.toString()}`)
|
this.sendErrorResponse(response, 100, `Failed to start MI Debugger: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`)
|
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -108,10 +108,10 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
if (this.crashed)
|
if (this.crashed)
|
||||||
this.handlePause(undefined);
|
this.handlePause(undefined);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 100, `Failed to Start MI Debugger: ${err.toString()}`)
|
this.sendErrorResponse(response, 100, `Failed to Start MI Debugger: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`)
|
this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +151,7 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
}, 50);
|
}, 50);
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`)
|
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -163,7 +163,7 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
});
|
});
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 102, `Failed to attach: ${err.toString()}`)
|
this.sendErrorResponse(response, 102, `Failed to attach: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -174,7 +174,7 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
});
|
});
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 101, `Failed to attach: ${err.toString()}`)
|
this.sendErrorResponse(response, 101, `Failed to attach: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ export class MI2DebugSession extends DebugSession {
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.sendErrorResponse(response, 11, `Could not continue: ${err}`);
|
this.sendErrorResponse(response, 11, `Could not continue: ${err}`);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
|
protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
|
||||||
|
|
@ -321,7 +321,7 @@ export class MI2DebugSession extends DebugSession {
|
||||||
};
|
};
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.sendErrorResponse(response, 12, `Failed to get Stack Trace: ${err.toString()}`)
|
this.sendErrorResponse(response, 12, `Failed to get Stack Trace: ${err.toString()}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -500,7 +500,7 @@ export class MI2DebugSession extends DebugSession {
|
||||||
|
|
||||||
response.body = {
|
response.body = {
|
||||||
variables: vars
|
variables: vars
|
||||||
}
|
};
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|
@ -647,7 +647,7 @@ export class MI2DebugSession extends DebugSession {
|
||||||
response.body = {
|
response.body = {
|
||||||
variablesReference: 0,
|
variablesReference: 0,
|
||||||
result: res.result("value")
|
result: res.result("value")
|
||||||
}
|
};
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
}, msg => {
|
}, msg => {
|
||||||
this.sendErrorResponse(response, 7, msg.toString());
|
this.sendErrorResponse(response, 7, msg.toString());
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
"ordered-imports": false,
|
"ordered-imports": false,
|
||||||
"quotemark": false,
|
"quotemark": false,
|
||||||
"radix": false,
|
"radix": false,
|
||||||
"semicolon": false,
|
|
||||||
"space-before-function-paren": false,
|
"space-before-function-paren": false,
|
||||||
"trailing-comma": false,
|
"trailing-comma": false,
|
||||||
"triple-equals": false,
|
"triple-equals": false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue