[commit: ghc] master: Factor stack chunk printing out of printTSO (f804811)
git at git.haskell.org
git at git.haskell.org
Tue May 29 07:37:18 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f8048112c2398ed58fbaff8f1c0faeb052a2534a/ghc
>---------------------------------------------------------------
commit f8048112c2398ed58fbaff8f1c0faeb052a2534a
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: Tue May 29 10:36:16 2018 +0300
Factor stack chunk printing out of printTSO
Makes it possible to print STACK (StgStack) objects easily in gdb
>---------------------------------------------------------------
f8048112c2398ed58fbaff8f1c0faeb052a2534a
rts/Printer.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/rts/Printer.c b/rts/Printer.c
index d184423..46a2076 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 );
}
/* --------------------------------------------------------------------------
More information about the ghc-commits
mailing list