[project @ 1999-11-29 12:02:42 by keithw]
This commit adds the new RTS option `-xc', which prints the current cost-centre stack to stderr whenever an exception is raised. This is intended to be a debugging tool, to help trace those "Prelude.head: empty list" errors that are so frustrating to find. `-xc' is only available for programs compiled with -prof, and you probably want -auto as well to get useful information. This is currently experimental; it would be better if it only displayed the info for *uncaught* exceptions, but this is harder to implement. This commit also makes an OFTEL-inspired extension to the RTS option space. Since we've almost run out of options, `-x' is now reserved for `extended' options. `-xc' is the first of these, but that leaves '-x[0-9A-Zabd-wyz]' still to be used! The prefix `-xx' is reserved for future extension.
Showing with 54 additions and 3 deletions