Commit 1a2bb70956

kcbanner <kcbanner@gmail.com>
2023-07-18 06:35:04
dwarf: write the CFA as SP before the register update, in case the SP itself is updated by a column rule
1 parent 97bda56
Changed files (1)
lib
lib/std/dwarf.zig
@@ -1810,6 +1810,7 @@ pub const DwarfInfo = struct {
             }
         }
 
+        (try abi.regValueNative(usize, context.thread_context, abi.spRegNum(context.reg_context), context.reg_context)).* = context.cfa.?;
         while (update_tail) |tail| {
             @memcpy(tail.old_value, tail.new_value);
             update_tail = tail.prev;