Added support for program arguments (fix #27)

This commit is contained in:
WebFreak001 2016-02-23 15:33:03 +01:00
commit cb9e36d6db
4 changed files with 21 additions and 10 deletions

View file

@ -13,6 +13,7 @@ let relative = posix.relative;
export interface LaunchRequestArguments {
cwd: string;
target: string;
arguments: string;
autorun: string[];
ssh: SSHArguments;
printCalls: boolean;
@ -109,7 +110,7 @@ class MI2DebugSession extends DebugSession {
this.isSSH = true;
this.trimCWD = args.cwd.replace(/\\/g, "/");
this.switchCWD = args.ssh.cwd;
this.gdbDebugger.ssh(args.ssh, args.ssh.cwd, args.target).then(() => {
this.gdbDebugger.ssh(args.ssh, args.ssh.cwd, args.target, args.arguments).then(() => {
if (args.autorun)
args.autorun.forEach(command => {
this.gdbDebugger.sendUserInput(command);
@ -120,7 +121,7 @@ class MI2DebugSession extends DebugSession {
});
}
else {
this.gdbDebugger.load(args.cwd, args.target).then(() => {
this.gdbDebugger.load(args.cwd, args.target, args.arguments).then(() => {
if (args.autorun)
args.autorun.forEach(command => {
this.gdbDebugger.sendUserInput(command);