Made target path absolute when passing to gdb (should fix #22)

This commit is contained in:
WebFreak001 2016-03-10 13:08:08 +01:00
commit 2aff091374
2 changed files with 19 additions and 3 deletions

View file

@ -6,7 +6,15 @@ import * as nativePath from "path"
let path = posix;
export class MI2_LLDB extends MI2 {
protected initCommands(target: string, cwd: string) {
protected initCommands(target: string, cwd: string, ssh: boolean = false) {
if (ssh) {
if (!path.isAbsolute(target))
target = path.join(cwd, target);
}
else {
if (!nativePath.isAbsolute(target))
target = nativePath.join(cwd, target);
}
return [
this.sendCommand("gdb-set target-async on"),
this.sendCommand("file-exec-and-symbols \"" + escape(target) + "\"")