[Git][ghc/ghc][wip/decode_cloned_stack] 2 commits: Printer: Add missing frame support
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Wed Apr 19 06:37:21 UTC 2023
Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC
Commits:
54f91e6a by Sven Tennie at 2023-04-19T06:26:09+00:00
Printer: Add missing frame support
- - - - -
e42e2f82 by Sven Tennie at 2023-04-19T06:36:41+00:00
Printer: More readable RET_FUN code
- - - - -
1 changed file:
- rts/Printer.c
Changes:
=====================================
rts/Printer.c
=====================================
@@ -279,6 +279,45 @@ printClosure( const StgClosure *obj )
break;
}
+ case CATCH_RETRY_FRAME:
+ {
+ StgCatchRetryFrame* frame = (StgCatchRetryFrame*)obj;
+ debugBelch("CATCH_RETRY_FRAME(");
+ printPtr((StgPtr)GET_INFO((StgClosure *)frame));
+ debugBelch(",");
+ printPtr((StgPtr)frame->first_code);
+ debugBelch(",");
+ printPtr((StgPtr)frame->alt_code);
+ debugBelch(")\n");
+ break;
+ }
+
+ case CATCH_STM_FRAME:
+ {
+ StgCatchSTMFrame* frame = (StgCatchSTMFrame*)obj;
+ debugBelch("CATCH_STM_FRAME(");
+ printPtr((StgPtr)GET_INFO((StgClosure *)frame));
+ debugBelch(",");
+ printPtr((StgPtr)frame->code);
+ debugBelch(",");
+ printPtr((StgPtr)frame->handler);
+ debugBelch(")\n");
+ break;
+ }
+
+ case ATOMICALLY_FRAME:
+ {
+ StgAtomicallyFrame* frame = (StgAtomicallyFrame*)obj;
+ debugBelch("ATOMICALLY_FRAME(");
+ printPtr((StgPtr)GET_INFO((StgClosure *)frame));
+ debugBelch(",");
+ printPtr((StgPtr)frame->code);
+ debugBelch(",");
+ printPtr((StgPtr)frame->result);
+ debugBelch(")\n");
+ break;
+ }
+
case UNDERFLOW_FRAME:
{
StgUnderflowFrame* u = (StgUnderflowFrame*)obj;
@@ -531,6 +570,9 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
case UPDATE_FRAME:
case CATCH_FRAME:
+ case CATCH_RETRY_FRAME:
+ case CATCH_STM_FRAME:
+ case ATOMICALLY_FRAME:
case UNDERFLOW_FRAME:
case STOP_FRAME:
printClosure((StgClosure*)sp);
@@ -664,17 +706,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+3,
+ printSmallBitmap(spBottom, &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+3,
+ printLargeBitmap(spBottom, &ret_fun->payload,
GET_FUN_LARGE_BITMAP(fun_info),
GET_FUN_LARGE_BITMAP(fun_info)->size);
break;
default:
- printSmallBitmap(spBottom, sp+3,
+ printSmallBitmap(spBottom, &ret_fun->payload,
BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]),
BITMAP_SIZE(stg_arg_bitmaps[fun_info->f.fun_type]));
break;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3dd9506c142071a615a5d9b9478b0327477490e9...e42e2f82e63ebd350dedfc1815f89e4a009d8506
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3dd9506c142071a615a5d9b9478b0327477490e9...e42e2f82e63ebd350dedfc1815f89e4a009d8506
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230419/d139d22e/attachment-0001.html>
More information about the ghc-commits
mailing list