Made gdb & lldb command path customizable (fix #53)
This commit is contained in:
parent
f46ab81b2e
commit
7e73c686b2
3 changed files with 32 additions and 4 deletions
20
package.json
20
package.json
|
|
@ -60,6 +60,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of project"
|
"description": "Path of project"
|
||||||
},
|
},
|
||||||
|
"gdbpath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to the gdb executable or the command if in PATH",
|
||||||
|
"default": "gdb"
|
||||||
|
},
|
||||||
"printCalls": {
|
"printCalls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Prints all GDB calls to console",
|
"description": "Prints all GDB calls to console",
|
||||||
|
|
@ -155,6 +160,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of executable for debugging symbols"
|
"description": "Path of executable for debugging symbols"
|
||||||
},
|
},
|
||||||
|
"gdbpath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to the gdb executable or the command if in PATH",
|
||||||
|
"default": "gdb"
|
||||||
|
},
|
||||||
"cwd": {
|
"cwd": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of project",
|
"description": "Path of project",
|
||||||
|
|
@ -228,6 +238,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of project"
|
"description": "Path of project"
|
||||||
},
|
},
|
||||||
|
"lldbmipath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to the lldb-mi executable or the command if in PATH",
|
||||||
|
"default": "lldb-mi"
|
||||||
|
},
|
||||||
"printCalls": {
|
"printCalls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Prints all lldb calls to console",
|
"description": "Prints all lldb calls to console",
|
||||||
|
|
@ -318,6 +333,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of executable for debugging symbols"
|
"description": "Path of executable for debugging symbols"
|
||||||
},
|
},
|
||||||
|
"lldbmipath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to the lldb-mi executable or the command if in PATH",
|
||||||
|
"default": "lldb-mi"
|
||||||
|
},
|
||||||
"cwd": {
|
"cwd": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Path of project",
|
"description": "Path of project",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { SSHArguments } from './backend/backend';
|
||||||
export interface LaunchRequestArguments {
|
export interface LaunchRequestArguments {
|
||||||
cwd: string;
|
cwd: string;
|
||||||
target: string;
|
target: string;
|
||||||
|
gdbpath: string;
|
||||||
arguments: string;
|
arguments: string;
|
||||||
terminal: string;
|
terminal: string;
|
||||||
autorun: string[];
|
autorun: string[];
|
||||||
|
|
@ -17,6 +18,7 @@ export interface LaunchRequestArguments {
|
||||||
export interface AttachRequestArguments {
|
export interface AttachRequestArguments {
|
||||||
cwd: string;
|
cwd: string;
|
||||||
target: string;
|
target: string;
|
||||||
|
gdbpath: string;
|
||||||
executable: string;
|
executable: string;
|
||||||
remote: boolean;
|
remote: boolean;
|
||||||
autorun: string[];
|
autorun: string[];
|
||||||
|
|
@ -30,11 +32,11 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
response.body.supportsFunctionBreakpoints = true;
|
response.body.supportsFunctionBreakpoints = true;
|
||||||
response.body.supportsEvaluateForHovers = true;
|
response.body.supportsEvaluateForHovers = true;
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
this.miDebugger = new MI2("gdb", ["-q", "--interpreter=mi2"]);
|
|
||||||
this.initDebugger();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
|
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
|
||||||
|
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"]);
|
||||||
|
this.initDebugger();
|
||||||
this.quit = false;
|
this.quit = false;
|
||||||
this.attached = false;
|
this.attached = false;
|
||||||
this.needContinue = false;
|
this.needContinue = false;
|
||||||
|
|
@ -93,6 +95,8 @@ class GDBDebugSession extends MI2DebugSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
|
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
|
||||||
|
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"]);
|
||||||
|
this.initDebugger();
|
||||||
this.quit = false;
|
this.quit = false;
|
||||||
this.attached = !args.remote;
|
this.attached = !args.remote;
|
||||||
this.needContinue = true;
|
this.needContinue = true;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { SSHArguments } from './backend/backend';
|
||||||
export interface LaunchRequestArguments {
|
export interface LaunchRequestArguments {
|
||||||
cwd: string;
|
cwd: string;
|
||||||
target: string;
|
target: string;
|
||||||
|
lldbmipath: string;
|
||||||
arguments: string;
|
arguments: string;
|
||||||
autorun: string[];
|
autorun: string[];
|
||||||
ssh: SSHArguments;
|
ssh: SSHArguments;
|
||||||
|
|
@ -16,6 +17,7 @@ export interface LaunchRequestArguments {
|
||||||
export interface AttachRequestArguments {
|
export interface AttachRequestArguments {
|
||||||
cwd: string;
|
cwd: string;
|
||||||
target: string;
|
target: string;
|
||||||
|
lldbmipath: string;
|
||||||
executable: string;
|
executable: string;
|
||||||
autorun: string[];
|
autorun: string[];
|
||||||
printCalls: boolean;
|
printCalls: boolean;
|
||||||
|
|
@ -28,11 +30,11 @@ class LLDBDebugSession extends MI2DebugSession {
|
||||||
response.body.supportsFunctionBreakpoints = true;
|
response.body.supportsFunctionBreakpoints = true;
|
||||||
response.body.supportsEvaluateForHovers = true;
|
response.body.supportsEvaluateForHovers = true;
|
||||||
this.sendResponse(response);
|
this.sendResponse(response);
|
||||||
this.miDebugger = new MI2_LLDB("lldb-mi", []);
|
|
||||||
this.initDebugger();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
|
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
|
||||||
|
this.miDebugger = new MI2_LLDB(args.lldbmipath || "lldb-mi", []);
|
||||||
|
this.initDebugger();
|
||||||
this.quit = false;
|
this.quit = false;
|
||||||
this.attached = false;
|
this.attached = false;
|
||||||
this.needContinue = false;
|
this.needContinue = false;
|
||||||
|
|
@ -91,6 +93,8 @@ class LLDBDebugSession extends MI2DebugSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
|
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
|
||||||
|
this.miDebugger = new MI2_LLDB(args.lldbmipath || "lldb-mi", []);
|
||||||
|
this.initDebugger();
|
||||||
this.quit = false;
|
this.quit = false;
|
||||||
this.attached = true;
|
this.attached = true;
|
||||||
this.needContinue = true;
|
this.needContinue = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue