Commit 0fa1a2cb73

Michael Dusan <michael.dusan@gmail.com>
2021-04-12 12:55:12
Revert "dwarf: fix LineNumberProgram check"
- needed/needs to go through review process This reverts commit 746f65f8b3ce11d67d8fd392aea8bc05a24adae6.
1 parent 746f65f
Changed files (2)
lib/std/dwarf.zig
@@ -208,7 +208,7 @@ const LineNumberProgram = struct {
     }
 
     pub fn checkLineMatch(self: *LineNumberProgram) !?debug.LineInfo {
-        if (self.prev_address > 0 and self.target_address >= self.prev_address and self.target_address < self.address) {
+        if (self.target_address >= self.prev_address and self.target_address < self.address) {
             const file_entry = if (self.prev_file == 0) {
                 return error.MissingDebugInfo;
             } else if (self.prev_file - 1 >= self.file_entries.items.len) {
test/stack_traces.zig
@@ -20,6 +20,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
             ,
         },
         .ReleaseSafe = .{
+            .exclude = struct {
+                pub fn exclude() bool {
+                    return if (std.builtin.object_format == .elf) true else false;
+                }
+            },
             .exclude_os = .{
                 .windows, // segfault
             },
@@ -69,6 +74,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
             ,
         },
         .ReleaseSafe = .{
+            .exclude = struct {
+                pub fn exclude() bool {
+                    return if (std.builtin.object_format == .elf) true else false;
+                }
+            },
             .exclude_os = .{
                 .windows, // segfault
             },
@@ -135,6 +145,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
             ,
         },
         .ReleaseSafe = .{
+            .exclude = struct {
+                pub fn exclude() bool {
+                    return if (std.builtin.object_format == .elf) true else false;
+                }
+            },
             .exclude_os = .{
                 .windows, // segfault
             },