[commit: ghc] wip/tdammers/T11066: Factor stack chunk printing out of printTSO (1be0f50)

git at git.haskell.org git at git.haskell.org
Wed May 30 10:46:29 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/tdammers/T11066
Link       : http://ghc.haskell.org/trac/ghc/changeset/1be0f5090af1d75458e4b200d1ae2c5a57766a04/ghc

>---------------------------------------------------------------

commit 1be0f5090af1d75458e4b200d1ae2c5a57766a04
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


>---------------------------------------------------------------

1be0f5090af1d75458e4b200d1ae2c5a57766a04
 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