| ... | @@ -838,7 +838,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) OpenSelfDebugInfoError!DebugI | ... | @@ -838,7 +838,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) OpenSelfDebugInfoError!DebugI |
| 838 | fn readCoffDebugInfo(allocator: mem.Allocator, coff_bytes: []const u8) !ModuleDebugInfo { | 838 | fn readCoffDebugInfo(allocator: mem.Allocator, coff_bytes: []const u8) !ModuleDebugInfo { |
| 839 | nosuspend { | 839 | nosuspend { |
| 840 | const coff_obj = try allocator.create(coff.Coff); | 840 | const coff_obj = try allocator.create(coff.Coff); |
| 841 | errdefer allocator.destroy(coff_obj); | 841 | defer allocator.destroy(coff_obj); |
| 842 | coff_obj.* = try coff.Coff.init(coff_bytes); | 842 | coff_obj.* = try coff.Coff.init(coff_bytes); |
| 843 | | 843 | |
| 844 | var di = ModuleDebugInfo{ | 844 | var di = ModuleDebugInfo{ |
| ... | @@ -1289,6 +1289,7 @@ pub const DebugInfo = struct { | ... | @@ -1289,6 +1289,7 @@ pub const DebugInfo = struct { |
| 1289 | self.allocator.destroy(mdi); | 1289 | self.allocator.destroy(mdi); |
| 1290 | } | 1290 | } |
| 1291 | self.address_map.deinit(); | 1291 | self.address_map.deinit(); |
| | 1292 | if (native_os == .windows) self.modules.deinit(self.allocator); |
| 1292 | } | 1293 | } |
| 1293 | | 1294 | |
| 1294 | pub fn getModuleForAddress(self: *DebugInfo, address: usize) !*ModuleDebugInfo { | 1295 | pub fn getModuleForAddress(self: *DebugInfo, address: usize) !*ModuleDebugInfo { |