Using undefined instead of "<unknown>" for UI
This commit is contained in:
parent
b2d23d6e10
commit
839766a065
2 changed files with 12 additions and 10 deletions
|
|
@ -525,9 +525,9 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
let from = parseInt(MINode.valueOf(element, "@frame.from"));
|
||||
ret.push({
|
||||
address: addr,
|
||||
fileName: filename || "",
|
||||
file: file || "<unknown>",
|
||||
function: func || from || "<unknown>",
|
||||
fileName: filename,
|
||||
file: file,
|
||||
function: func || from,
|
||||
level: level,
|
||||
line: line
|
||||
});
|
||||
|
|
|
|||
|
|
@ -205,13 +205,15 @@ export class MI2DebugSession extends DebugSession {
|
|||
let ret: StackFrame[] = [];
|
||||
stack.forEach(element => {
|
||||
let file = element.file;
|
||||
if (this.isSSH) {
|
||||
file = relative(this.switchCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||
file = systemPath.resolve(this.trimCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||
}
|
||||
else if (process.platform === "win32") {
|
||||
if (file.startsWith("\\cygdrive\\") || file.startsWith("/cygdrive/")) {
|
||||
file = file[10] + ":" + file.substr(11); // replaces /cygdrive/c/foo/bar.txt with c:/foo/bar.txt
|
||||
if (file) {
|
||||
if (this.isSSH) {
|
||||
file = relative(this.switchCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||
file = systemPath.resolve(this.trimCWD.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
||||
}
|
||||
else if (process.platform === "win32") {
|
||||
if (file.startsWith("\\cygdrive\\") || file.startsWith("/cygdrive/")) {
|
||||
file = file[10] + ":" + file.substr(11); // replaces /cygdrive/c/foo/bar.txt with c:/foo/bar.txt
|
||||
}
|
||||
}
|
||||
}
|
||||
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