diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-05-29 10:36:16 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-05-29 10:36:16 +0300 |
commit | f8048112c2398ed58fbaff8f1c0faeb052a2534a (patch) | |
tree | f18dbd50e5a1946a6d8cef2c90037aaeca00faf0 | |
parent | 60fb2b2160aa16194b74262f4df8fad5af171b0f (diff) | |
download | haskell-f8048112c2398ed58fbaff8f1c0faeb052a2534a.tar.gz |
Factor stack chunk printing out of printTSO
Makes it possible to print STACK (StgStack) objects easily in gdb
-rw-r--r-- | rts/Printer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/Printer.c b/rts/Printer.c index d184423678..46a20762f8 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -624,10 +624,14 @@ printStackChunk( StgPtr sp, StgPtr spBottom ) } } +static void printStack( StgStack *stack ) +{ + printStackChunk( stack->sp, stack->stack + stack->stack_size ); +} + void printTSO( StgTSO *tso ) { - printStackChunk( tso->stackobj->sp, - tso->stackobj->stack+tso->stackobj->stack_size); + printStack( tso->stackobj ); } /* -------------------------------------------------------------------------- |