aboutsummaryrefslogtreecommitdiff
path: root/std/debug/index.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-08-28 18:55:51 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-08-28 18:55:51 -0400
commit833477abf5a7df2c8861a2df11fae2105016e087 (patch)
tree7e9a842a7331433fa21d4850245ee01965fbada2 /std/debug/index.zig
parent41723f842c713af5e78a120c374732671a3317c2 (diff)
downloadzig-833477abf5a7df2c8861a2df11fae2105016e087.tar.gz
zig-833477abf5a7df2c8861a2df11fae2105016e087.zip
fix unresolved path preventing PDB loading
Diffstat (limited to 'std/debug/index.zig')
-rw-r--r--std/debug/index.zig12
1 files changed, 8 insertions, 4 deletions
diff --git a/std/debug/index.zig b/std/debug/index.zig
index 2828f42a8b..38d60a6818 100644
--- a/std/debug/index.zig
+++ b/std/debug/index.zig
@@ -393,15 +393,19 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo {
try coff_file.loadHeader();
- var path: [windows.MAX_PATH]u8 = undefined;
- const len = try coff_file.getPdbPath(path[0..]);
- std.debug.warn("pdb path {}\n", path[0..len]);
+ var path_buf: [windows.MAX_PATH]u8 = undefined;
+ const len = try coff_file.getPdbPath(path_buf[0..]);
+ const raw_path = path_buf[0..len];
+ std.debug.warn("pdb raw path {}\n", raw_path);
+
+ const path = try os.path.resolve(allocator, raw_path);
+ std.debug.warn("pdb resolved path {}\n", path);
var di = DebugInfo{
.pdb = undefined,
};
- try di.pdb.openFile(allocator, path[0..len]);
+ try di.pdb.openFile(allocator, path);
var pdb_stream = di.pdb.getStream(pdb.StreamType.Pdb) orelse return error.InvalidDebugInfo;
std.debug.warn("pdb real filepos {}\n", pdb_stream.getFilePos());