Add `UnitId` to `EvalBreakpoint`
The `EvalBreakpoint` is used to communicate that a breakpoint was encountered during code evaluation. This `EvalBreakpoint` needs to be converted to an `InternalBreakpointId` which stores a `Module` to uniquely find the correct `Module` in the Home Package Table. The `EvalBreakpoint` used to store only a `ModuleName` which is then converted to a `Module` based on the currently active home unit. This is incorrect in the face of multiple home units, the break point could be in an entirely other home unit! To fix this, we additionally store the `UnitId` of the `Module` in `EvalBreakpoint` to later reconstruct the correct `Module` All of the changes are the consequence of extending `EvalBreakpoint` with the additional `ShortByteString` of the `UnitId`. For performance reasons, we store the `ShortByteString` backing the `UnitId` directly, avoiding marshalling overhead.
Showing
- compiler/GHC/ByteCode/Asm.hs 4 additions, 1 deletioncompiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs 6 additions, 3 deletionscompiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Types.hs 7 additions, 1 deletioncompiler/GHC/ByteCode/Types.hs
- compiler/GHC/HsToCore/Breakpoints.hs 2 additions, 1 deletioncompiler/GHC/HsToCore/Breakpoints.hs
- compiler/GHC/Runtime/Eval.hs 1 addition, 1 deletioncompiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Interpreter.hs 26 additions, 21 deletionscompiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/StgToByteCode.hs 3 additions, 2 deletionscompiler/GHC/StgToByteCode.hs
- libraries/ghci/GHCi/Message.hs 17 additions, 8 deletionslibraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/Run.hs 24 additions, 5 deletionslibraries/ghci/GHCi/Run.hs
- rts/Exception.cmm 10 additions, 6 deletionsrts/Exception.cmm
- rts/Interpreter.c 25 additions, 17 deletionsrts/Interpreter.c
Loading
Please register or sign in to comment