more elaborate dumping of state on SIGQUIT to replace faulthandler