Escaping cwd, fix #7
This commit is contained in:
parent
2d3741f4e1
commit
3831f07c2a
1 changed files with 4 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.sendCommand("gdb-set target-async on"),
|
this.sendCommand("gdb-set target-async on"),
|
||||||
this.sendCommand("environment-directory \"" + cwd + "\"")
|
this.sendCommand("environment-directory \"" + cwd.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"")
|
||||||
]).then(resolve, reject);
|
]).then(resolve, reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.sendCommand("gdb-set target-async on"),
|
this.sendCommand("gdb-set target-async on"),
|
||||||
this.sendCommand("environment-directory \"" + cwd + "\"")
|
this.sendCommand("environment-directory \"" + cwd.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"")
|
||||||
]).then(resolve, reject);
|
]).then(resolve, reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +51,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.sendCommand("gdb-set target-async on"),
|
this.sendCommand("gdb-set target-async on"),
|
||||||
this.sendCommand("environment-directory \"" + cwd + "\""),
|
this.sendCommand("environment-directory \"" + cwd.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\""),
|
||||||
this.sendCommand("target-select remote " + target)
|
this.sendCommand("target-select remote " + target)
|
||||||
]).then(resolve, reject);
|
]).then(resolve, reject);
|
||||||
});
|
});
|
||||||
|
|
@ -133,7 +133,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
});
|
});
|
||||||
this.sendRaw("-gdb-exit");
|
this.sendRaw("-gdb-exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
detach() {
|
detach() {
|
||||||
let proc = this.process;
|
let proc = this.process;
|
||||||
let to = setTimeout(() => {
|
let to = setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue