ghc-debug-client-0.2.0.0: Useful functions for writing heap analysis tools which use ghc-debug.
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Debug.Client.Query

Synopsis

Pause/Resume

pause :: Debuggee -> IO () Source #

Pause the debuggee

resume :: Debuggee -> IO () Source #

Resume the debuggee

pausePoll :: Debuggee -> IO () Source #

Like pause, but wait for the debuggee to pause itself. It currently impossible to resume after a pause caused by a poll.?????????? Is that true???? can we not just call resume????

withPause :: Debuggee -> IO a -> IO a Source #

Bracketed version of pause/resume.

General Requests

precacheBlocks :: DebugM [RawBlock] Source #

Fetch all the blocks from the debuggee and add them to the block cache

gcRoots :: DebugM [ClosurePtr] Source #

Query the debuggee for the list of GC Roots

allBlocks :: DebugM [RawBlock] Source #

Query the debuggee for all the blocks it knows about

getSourceInfo :: InfoTablePtr -> DebugM (Maybe SourceInformation) Source #

Query the debuggee for source information about a specific info table. This requires your executable to be built with -finfo-table-map.

savedObjects :: DebugM [ClosurePtr] Source #

Query the debuggee for the list of saved objects.

version :: DebugM Word32 Source #

Query the debuggee for the protocol version

Dereferencing functions

dereferenceClosure :: ClosurePtr -> DebugM SizedClosure Source #

Consult the BlockCache for the block which contains a specific closure, if it's not there then try to fetch the right block, if that fails, call dereferenceClosureDirect

dereferenceClosureDirect :: ClosurePtr -> DebugM SizedClosure Source #

Decode a closure corresponding to the given ClosurePtr You should not use this function directly unless you know what you are doing. dereferenceClosure will be much faster in general.

dereferenceStack :: StackCont -> DebugM StackFrames Source #

Deference some StackFrames from a given StackCont

dereferencePapPayload :: PayloadCont -> DebugM PapPayload Source #

Derference the PapPayload from the PayloadCont