From 0c3136f2311d2ad504fb0039e52c2b56ef8d1e4c Mon Sep 17 00:00:00 2001
From: Sven Tennie <sven.tennie@gmail.com>
Date: Mon, 8 May 2023 18:12:35 +0000
Subject: [PATCH] Reference StgRetFun payload by its struct field address

This is easier to grasp than relative pointer offsets.
---
 rts/Printer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/Printer.c b/rts/Printer.c
index a84d933879f6..35df79c5c67c 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -713,17 +713,17 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
             debugBelch("RET_FUN (%p) (type=%d)\n", ret_fun->fun, (int)fun_info->f.fun_type);
             switch (fun_info->f.fun_type) {
             case ARG_GEN:
-                printSmallBitmap(spBottom, sp+2,
+                printSmallBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  BITMAP_BITS(fun_info->f.b.bitmap),
                                  BITMAP_SIZE(fun_info->f.b.bitmap));
                 break;
             case ARG_GEN_BIG:
-                printLargeBitmap(spBottom, sp+2,
+                printLargeBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  GET_FUN_LARGE_BITMAP(fun_info),
                                  GET_FUN_LARGE_BITMAP(fun_info)->size);
                 break;
             default:
-                printSmallBitmap(spBottom, sp+2,
+                printSmallBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]),
                                  BITMAP_SIZE(stg_arg_bitmaps[fun_info->f.fun_type]));
                 break;
-- 
GitLab