defaultCleanupHandler :: DynFlags -> IO a -> IO a
defaultCleanupHandler dflags inner =
-- make sure we clean up after ourselves
- later (unless (dopt Opt_KeepTmpFiles dflags) $
- do cleanTempFiles dflags
- cleanTempDirs dflags
+ later (do cleanTempFiles dflags
+ cleanTempDirs dflags
)
-- exceptions will be blocked while we clean the temporary files,
-- so there shouldn't be any difficulty if we receive further
-- more informative than the C type!
-}
+
-----------------------------------------------------------------------------
-- show a module and it's source/object filenames
where
obj_linkable = isObjectLinkable (expectJust "showModule" (hm_linkable mod_info))
+-----------------------------------------------------------------------------
+-- Breakpoint handlers
+
getBreakpointHandler :: Session -> IO (Maybe (BkptHandler Module))
getBreakpointHandler session = getSessionDynFlags session >>= return . bkptHandler
initDynLinker dflags
extendLinkEnv linkEnv
+-----------------------------------------------------------------------
+-- Jump functions
+
type SiteInfo = (String, String, SiteNumber)
jumpFunction, jumpAutoFunction :: Session -> BkptHandler Module -> Int -> [Opaque]
-> SiteInfo -> String -> b -> b
jumpFunctionM session handler (I# idsPtr) wrapped_hValues site locmsg b =
do
ids <- deRefStablePtr (castPtrToStablePtr (Ptr (int2Addr# idsPtr)))
- ASSERT (length ids == length wrapped_hValues) return ()
- let hValues = [unsafeCoerce# hv | O hv <- wrapped_hValues]
+ let hValues = unsafeCoerce# b : [unsafeCoerce# hv | O hv <- wrapped_hValues]
handleBreakpoint handler session (zip ids hValues) site locmsg b
jumpAutoFunction session handler ptr hValues siteInfo locmsg b