Commit d17af5f
committed
fix: Look for active breaks in right ModBreaks
In `getActiveBreakpoints`, we were incorrectly looking up the occurence
module of an internal breakpoint id (`getBreakSourceMod`) on the
`InternalModBreaks` of a different module (`readIModBreaksMaybe` of the
argument module, not the internal breakpoint id one)!
That is just plain incorrect...
The `activeBreakpoints` map stores the active internal-breakpoint-ids.
To get the active breakpoints at module A, we find the *occurrence
module* for every internal breakpoint id in `activeBreakpoints` and keep
the ones whose occurrence module matches the argument module (recall: a
breakpoint defined in B may be inlined in A, which means
`getBreakSourceMod` will return `A` -- and that's what we want to match
against the argument module)
(See also Note [ModBreaks vs InternalModBreaks] and Note [Breakpoint identifiers] in GHC)
Fixes #2971 parent 5fdce54 commit d17af5f
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments