aboutsummaryrefslogtreecommitdiff
path: root/lib/std/pdb.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-04-21 10:46:04 +0200
committerJakub Konka <kubkon@jakubkonka.com>2022-04-21 11:48:15 +0200
commit28ca203b7132ba0513a3854bd3bcbd0ee9bca067 (patch)
treeeabc9d3522d89fe8d050197bd6dc1c8a14c349a5 /lib/std/pdb.zig
parent96c1314443bdf26442a2c9fdffa03f2afffbcb8e (diff)
downloadzig-28ca203b7132ba0513a3854bd3bcbd0ee9bca067.tar.gz
zig-28ca203b7132ba0513a3854bd3bcbd0ee9bca067.zip
debug: fix resource (de)allocation for Elf and Coff targets
With this change, it is now possible to safely call `var di = std.debug.openSelfDebugInfo(gpa)`. Calling then `di.deinit()` on the object will correctly free all allocated resources. Ensure we store the result of `mmap` with correct alignment.
Diffstat (limited to 'lib/std/pdb.zig')
-rw-r--r--lib/std/pdb.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/std/pdb.zig b/lib/std/pdb.zig
index 03f78cb179..88ae849109 100644
--- a/lib/std/pdb.zig
+++ b/lib/std/pdb.zig
@@ -764,7 +764,6 @@ pub const Pdb = struct {
const flags = @ptrCast(*LineNumberEntry.Flags, &line_num_entry.Flags);
return debug.LineInfo{
- .allocator = self.allocator,
.file_name = source_file_name,
.line = flags.Start,
.column = column,