Breakpoint CostCenters are looked up in the wrong array
In GHC.StgToByteCode.schemeER_wrk
:
case break_info hsc_env mod current_mod current_mod_breaks of
Nothing -> pure code
Just ModBreaks {modBreaks_flags = breaks, modBreaks_module = mod_ptr} -> do
cc_arr <- getCCArray
...
= cc_arr ! tick_no
cc_arr
is the cost center array for the current module, we should be looking in modBreaks_ccs
This came up when trying to load Agda into a profiled GHCi session. I can try to produce a smaller reproducer.
/cc @torsten.schmits who introduced cross module breakpoints in !10448 (merged)