README (902B)
1 The debug module implements various runtime debugging services. It is enabled by 2 default when you build programs in debug mode (you can disable this by building 3 in release mode with the -R flag to hare(1)). It provides detailed backtraces in 4 various error conditions, including: 5 6 - Assertion failures 7 - Built-in assertions (e.g. for the "as" operator) 8 - Segmentation faults 9 - Arithmetic exceptions (e.g. divide by zero) 10 - Bus errors 11 - Stack overflows 12 13 In order to accomplish this, the debug module does some logic on @init which 14 rigs up [[rt]] with debugging hooks and installs the relevant signal handlers 15 globally. If you set your own signal handlers for terminating signals (e.g. 16 SIGFPE) that the debug module handles, they will override the debug hooks. 17 18 This module may also be used explicitly to inspect details of the running 19 program -- for instance, you can trace the call stack with [[walk]].