janestreet / magic-trace

magic-trace collects and displays high-resolution traces of what a process is doing
https://magic-trace.org
MIT License
4.58k stars 87 forks source link

Proper OCaml exception tracking #204

Closed Xyene closed 2 years ago

Xyene commented 2 years ago

This is accomplished by having an OCaml compiler patch that tracks where it emits pushtrap, poptrap, and entertrap directives. We can then walk them as we execute the program to figure out the state of the OCaml exception stack.

The old stacktrace-based approach is maintained for binaries that are compiled without this section.