Commit 52b85020 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #1450: asynchronous exceptions are now printed by +RTS -xc

parent 6ea3a1ac
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "Updates.h" #include "Updates.h"
#include "STM.h" #include "STM.h"
#include "Sanity.h" #include "Sanity.h"
#include "Profiling.h"
#if defined(mingw32_HOST_OS) #if defined(mingw32_HOST_OS)
#include "win32/IOManager.h" #include "win32/IOManager.h"
#endif #endif
...@@ -852,6 +853,18 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception, ...@@ -852,6 +853,18 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
debugTrace(DEBUG_sched, debugTrace(DEBUG_sched,
"raising exception in thread %ld.", (long)tso->id); "raising exception in thread %ld.", (long)tso->id);
#if defined(PROFILING)
/*
* Debugging tool: on raising an exception, show where we are.
* See also Exception.cmm:raisezh_fast.
* This wasn't done for asynchronous exceptions originally; see #1450
*/
if (RtsFlags.ProfFlags.showCCSOnException)
{
fprintCCS_stderr(tso->prof.CCCS);
}
#endif
// mark it dirty; we're about to change its stack. // mark it dirty; we're about to change its stack.
dirtyTSO(tso); dirtyTSO(tso);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment