authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-04-12 06:55:12-04:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-04-12 06:55:12-04:00
log0fa1a2cb732c85a59e72a720f19bc0d69ac9b08c
tree4b5857db65268b6e3a41fc436082da7b100647b6
parent746f65f8b3ce11d67d8fd392aea8bc05a24adae6
signaturelock-open Commit is signed but in an unrecognized format.

Revert "dwarf: fix LineNumberProgram check"

- needed/needs to go through review process This reverts commit 746f65f8b3ce11d67d8fd392aea8bc05a24adae6.

2 files changed, 16 insertions(+), 1 deletions(-)

lib/std/dwarf.zig+1-1
...@@ -208,7 +208,7 @@ const LineNumberProgram = struct {...@@ -208,7 +208,7 @@ const LineNumberProgram = struct {
208 }208 }
209209
210 pub fn checkLineMatch(self: *LineNumberProgram) !?debug.LineInfo {210 pub fn checkLineMatch(self: *LineNumberProgram) !?debug.LineInfo {
211 if (self.prev_address > 0 and self.target_address >= self.prev_address and self.target_address < self.address) {211 if (self.target_address >= self.prev_address and self.target_address < self.address) {
212 const file_entry = if (self.prev_file == 0) {212 const file_entry = if (self.prev_file == 0) {
213 return error.MissingDebugInfo;213 return error.MissingDebugInfo;
214 } else if (self.prev_file - 1 >= self.file_entries.items.len) {214 } else if (self.prev_file - 1 >= self.file_entries.items.len) {
test/stack_traces.zig+15
...@@ -20,6 +20,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {...@@ -20,6 +20,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
20 ,20 ,
21 },21 },
22 .ReleaseSafe = .{22 .ReleaseSafe = .{
23 .exclude = struct {
24 pub fn exclude() bool {
25 return if (std.builtin.object_format == .elf) true else false;
26 }
27 },
23 .exclude_os = .{28 .exclude_os = .{
24 .windows, // segfault29 .windows, // segfault
25 },30 },
...@@ -69,6 +74,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {...@@ -69,6 +74,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
69 ,74 ,
70 },75 },
71 .ReleaseSafe = .{76 .ReleaseSafe = .{
77 .exclude = struct {
78 pub fn exclude() bool {
79 return if (std.builtin.object_format == .elf) true else false;
80 }
81 },
72 .exclude_os = .{82 .exclude_os = .{
73 .windows, // segfault83 .windows, // segfault
74 },84 },
...@@ -135,6 +145,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {...@@ -135,6 +145,11 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
135 ,145 ,
136 },146 },
137 .ReleaseSafe = .{147 .ReleaseSafe = .{
148 .exclude = struct {
149 pub fn exclude() bool {
150 return if (std.builtin.object_format == .elf) true else false;
151 }
152 },
138 .exclude_os = .{153 .exclude_os = .{
139 .windows, // segfault154 .windows, // segfault
140 },155 },