Commit 0ace906477

Alex Rønne Petersen <alex@alexrp.com>
2025-10-14 09:28:09
std.os.windows.CONTEXT: add sp field to getRegs() result for x86
1 parent 70c21fd
Changed files (1)
lib
lib/std/os/windows.zig
@@ -4229,8 +4229,8 @@ pub const CONTEXT = switch (native_arch) {
         SegSs: DWORD,
         ExtendedRegisters: [512]BYTE,
 
-        pub fn getRegs(ctx: *const CONTEXT) struct { bp: usize, ip: usize } {
-            return .{ .bp = ctx.Ebp, .ip = ctx.Eip };
+        pub fn getRegs(ctx: *const CONTEXT) struct { bp: usize, ip: usize, sp: usize } {
+            return .{ .bp = ctx.Ebp, .ip = ctx.Eip, .sp = ctx.Esp };
         }
     },
     .x86_64 => extern struct {