diff options
| author | kcbanner <kcbanner@gmail.com> | 2024-07-10 02:25:19 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 10:46:35 -0400 |
| commit | 95d9292a7a09ed883e65510ec054619747315c48 (patch) | |
| tree | b335ce3241314861c08d8be1f8ccaa50766158d7 /lib/std/debug.zig | |
| parent | 1f6b3d16644c8727323a1512d555236afbca7d7f (diff) | |
| download | zig-95d9292a7a09ed883e65510ec054619747315c48.tar.gz zig-95d9292a7a09ed883e65510ec054619747315c48.zip | |
dwarf: use StackIterator.MemoryAccessor to check memory accesses instead of isValidMemory
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 5fc27a02f4..29294be0d9 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -610,7 +610,7 @@ pub const StackIterator = struct { var iterator = init(first_address, null); iterator.unwind_state = .{ .debug_info = debug_info, - .dwarf_context = try DW.UnwindContext.init(debug_info.allocator, context, &isValidMemory), + .dwarf_context = try DW.UnwindContext.init(debug_info.allocator, context), }; return iterator; @@ -793,7 +793,7 @@ pub const StackIterator = struct { // __unwind_info is a requirement for unwinding on Darwin. It may fall back to DWARF, but unwinding // via DWARF before attempting to use the compact unwind info will produce incorrect results. if (module.unwind_info) |unwind_info| { - if (DW.unwindFrameMachO(&unwind_state.dwarf_context, unwind_info, module.eh_frame, module.base_address)) |return_address| { + if (DW.unwindFrameMachO(&unwind_state.dwarf_context, &it.ma, unwind_info, module.eh_frame, module.base_address)) |return_address| { return return_address; } else |err| { if (err != error.RequiresDWARFUnwind) return err; @@ -804,7 +804,7 @@ pub const StackIterator = struct { } if (try module.getDwarfInfoForAddress(unwind_state.debug_info.allocator, unwind_state.dwarf_context.pc)) |di| { - return di.unwindFrame(&unwind_state.dwarf_context, null); + return di.unwindFrame(&unwind_state.dwarf_context, &it.ma, null); } else return error.MissingDebugInfo; } |
