| ... | ... | @@ -411,7 +411,8 @@ pub const StackIterator = struct { |
| 411 | 411 | // When DebugInfo and a register context is available, this iterator can unwind |
| 412 | 412 | // stacks with frames that don't use a frame pointer (ie. -fomit-frame-pointer). |
| 413 | 413 | debug_info: ?*DebugInfo, |
| 414 | | dwarf_context: if (@hasDecl(os, "ucontext_t")) DW.UnwindContext else void = undefined, |
| 414 | dwarf_context: if (supports_context) DW.UnwindContext else void = undefined, |
| 415 | const supports_context = @hasDecl(os.system, "ucontext_t"); |
| 415 | 416 | |
| 416 | 417 | pub fn init(first_address: ?usize, fp: ?usize) StackIterator { |
| 417 | 418 | if (native_arch == .sparc64) { |
| ... | ... | @@ -526,7 +527,7 @@ pub const StackIterator = struct { |
| 526 | 527 | } |
| 527 | 528 | |
| 528 | 529 | fn next_internal(self: *StackIterator) ?usize { |
| 529 | | if (self.debug_info != null) { |
| 530 | if (supports_context and self.debug_info != null) { |
| 530 | 531 | if (self.next_dwarf()) |_| { |
| 531 | 532 | return self.dwarf_context.pc; |
| 532 | 533 | } else |err| { |