This commit is contained in:
WebFreak001 2017-04-14 18:26:40 +02:00
commit a21e2e65af
6 changed files with 47 additions and 11 deletions

View file

@ -8,6 +8,7 @@ export interface LaunchRequestArguments {
cwd: string;
target: string;
gdbpath: string;
env: any;
debugger_args: string[];
arguments: string;
terminal: string;
@ -21,6 +22,7 @@ export interface AttachRequestArguments {
cwd: string;
target: string;
gdbpath: string;
env: any;
debugger_args: string[];
executable: string;
remote: boolean;
@ -43,7 +45,7 @@ class GDBDebugSession extends MI2DebugSession {
}
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args);
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args, args.env);
this.initDebugger();
this.quit = false;
this.attached = false;
@ -112,7 +114,7 @@ class GDBDebugSession extends MI2DebugSession {
}
protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args);
this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args, args.env);
this.initDebugger();
this.quit = false;
this.attached = !args.remote;