oxinabox / MagneticReadHead.jl

A cassette-based debugger | The Other Debugger
MIT License
50 stars 6 forks source link

Line based breakpoints #17

Closed oxinabox closed 5 years ago

oxinabox commented 5 years ago

So we actually do have the tools to do liine based breakpoints already. It is just a matter of assembliing them.

so ir,codelocs maps from index in ir.code to index in ir.linetable. And ir.linetable basically has all the line number / file / etc stuff one could ever want.

We also need to link in to Revise.jl or CodeTracking.jl So things are correct after Revise screws wtih the line numbers See https://github.com/timholy/Revise.jl/issues/236

Overall, we need to build (possibly lasily) a map of where methods are defined. This will give us File+ Line Number -> Method. We see an overdub on that method. Then we search though ir.linetable / ir.codelocs to find the first (or last?) statement index iine that line, and we then use a Cassette @pass to insert a call to break_action there.

It is possible that it some of the parts of this would be better living in CodeTracking.jl than here.

oxinabox commented 5 years ago

closed in #23