Skip to content
Snippets Groups Projects
Commit afb686a8 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan
Browse files

printClosure: slightly improve MVAR printing

Reviewers: bgamari, erikd, simonmar

Reviewed By: bgamari

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D4541
parent c00b6d20
No related branches found
No related tags found
No related merge requests found
......@@ -331,7 +331,29 @@ printClosure( const StgClosure *obj )
case MVAR_DIRTY:
{
StgMVar* mv = (StgMVar*)obj;
debugBelch("MVAR(head=%p, tail=%p, value=%p)\n", mv->head, mv->tail, mv->value);
debugBelch("MVAR(head=");
if ((StgClosure*)mv->head == &stg_END_TSO_QUEUE_closure) {
debugBelch("END_TSO_QUEUE");
} else {
debugBelch("%p", mv->head);
}
debugBelch(", tail=");
if ((StgClosure*)mv->tail == &stg_END_TSO_QUEUE_closure) {
debugBelch("END_TSO_QUEUE");
} else {
debugBelch("%p", mv->tail);
}
debugBelch(", value=");
if ((StgClosure*)mv->value == &stg_END_TSO_QUEUE_closure) {
debugBelch("END_TSO_QUEUE");
} else {
debugBelch("%p", mv->value);
}
debugBelch(")\n");
break;
}
......@@ -358,7 +380,7 @@ printClosure( const StgClosure *obj )
case WEAK:
debugBelch("WEAK(");
debugBelch(" key=%p value=%p finalizer=%p",
debugBelch("key=%p value=%p finalizer=%p",
(StgPtr)(((StgWeak*)obj)->key),
(StgPtr)(((StgWeak*)obj)->value),
(StgPtr)(((StgWeak*)obj)->finalizer));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment