aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorkcbanner <kcbanner@gmail.com>2023-07-17 10:22:01 -0400
committerkcbanner <kcbanner@gmail.com>2023-07-20 22:58:16 -0400
commit97bda56306622784b2f2e4f036d817bbe5f2025e (patch)
treeecec2a45ed278bf105155049695526d9d32b4006 /lib/std/debug.zig
parent774dc2fdb75dc7f6b7e0bd2cfe947fffb9829ba1 (diff)
downloadzig-97bda56306622784b2f2e4f036d817bbe5f2025e.tar.gz
zig-97bda56306622784b2f2e4f036d817bbe5f2025e.zip
macho: don't scan all eh_frame entries, instead follow the offset from the __unwind_info directly
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 410f5db380..d2fc5b1338 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -642,7 +642,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 (macho.unwindFrame(&unwind_state.dwarf_context, unwind_info, module.base_address)) |return_address| {
+ if (macho.unwindFrame(&unwind_state.dwarf_context, unwind_info, module.eh_frame, module.base_address)) |return_address| {
return return_address;
} else |err| {
if (err != error.RequiresDWARFUnwind) return err;
@@ -2026,10 +2026,6 @@ pub const ModuleDebugInfo = switch (native_os) {
};
try DW.openDwarfDebugInfo(&di, allocator);
-
- // TODO: Don't actually scan everything, search on demand
- di.scanAllUnwindInfo(allocator, self.base_address) catch {};
-
var info = OFileInfo{
.di = di,
.addr_table = addr_table,