GHC Trac Home
GHC Git Repos
Working on GHC
Mailing Lists & IRC
The GHC Team
All Feature Req's
Tickets I Created
Patches for review
New Feature Req
side by side
lines around each change
Show the changes in full context
White space changes
Apr 10, 2007 4:51:11 PM (
* When the user decides to continue execution after a breakpoint the GHCi thread fills in the `breakMVar`, thus waking up the expression thread, and then the GHCi thread waits on the `statusMVar` again. The whole process continues until eventually the expression thread completes its evaluation.
Now we turn our attention to the `RunBreak` constructor:
RunBreak :: forall a . a -> ThreadId -> BreakInfo -> IO RunResult -> RunResult
The arguments of `RunBreak` are as follows, in order from left to right:
1. a heap closure, specifically something which represents a chunk of the Stg stack (an `StgAP_STACK`, to be precise). It is inside this object that we find the values of the local variables of the breakpoint. We use a type variable here for convenience.
2. a thread ID of the expression thread. XXX Actually, we no longer use this value for anything, and it can probably be removed.
3. a `BreakInfo`, which stores information about the breakpoint, such as the module name, the tick number, and the stack offsets and identifiers of the local variables.
4. an IO action to execute when we resume execution after hitting the breakpoint. This contains code to fill and wait on the `MVars` mentioned earlier.
=== Inspecting values ===