Merge pull request #13 from bbenoist/bugfix/win32-gdb-over-ssh
Fix invalid local windows path when using GDB over SSH
This commit is contained in:
commit
d60a4cf83e
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import { MINode } from './backend/mi_parse'
|
||||||
import { expandValue, isExpandable } from './backend/gdb_expansion'
|
import { expandValue, isExpandable } from './backend/gdb_expansion'
|
||||||
import { MI2 } from './backend/mi2/mi2'
|
import { MI2 } from './backend/mi2/mi2'
|
||||||
import { posix } from "path"
|
import { posix } from "path"
|
||||||
|
import * as systemPath from "path"
|
||||||
|
|
||||||
let resolve = posix.resolve;
|
let resolve = posix.resolve;
|
||||||
let relative = posix.relative;
|
let relative = posix.relative;
|
||||||
|
|
@ -197,7 +198,7 @@ class MI2DebugSession extends DebugSession {
|
||||||
let file = element.file;
|
let file = element.file;
|
||||||
if (this.isSSH) {
|
if (this.isSSH) {
|
||||||
file = relative(this.switchCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
file = relative(this.switchCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||||
file = resolve(this.trimCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
file = systemPath.resolve(this.trimCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||||
}
|
}
|
||||||
ret.push(new StackFrame(element.level, element.function + "@" + element.address, new Source(element.fileName, file), element.line, 0));
|
ret.push(new StackFrame(element.level, element.function + "@" + element.address, new Source(element.fileName, file), element.line, 0));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue