#ifndef _DEBUG_H_4cd7a20d_ #define _DEBUG_H_4cd7a20d_ /* * APIs exported by debug.c. These are, not surprisingly, mostly * debugging assist. */ #include "structs.h" /* * This is designed to be the signal handler routine for fatal signals. * It writes out a heck.debug (or, if that cannot be fopen()ed, * /tmp/heck.debug) containing a lot of state - enough, I hope, to * find and fix the bug post-mortem. It then tries to drop core. * * One exception: if the signal is SIGQUIT, it does all this in a * forked child, after which the parent carries on. */ extern void debugsig(int sig); /* * Given a MONST *, checks that it's in a sane location. */ extern void debug_checkm(MONST *); /* * Sets the signal handler for SIGQUIT, SIGILL, SIGEMT, SIGFPE, SIGBUS, * SIGSEGV, SIGSYS, and SIGPIPE to point to debugsig (see above). */ extern void debugcatch(void); /* * This is an interactive facility which lets the user inspect the * state of the entire dungeon, with time frozen. */ extern void probe(void); /* * This describes the topology of the dungeon in terms of stairs and * connected blobs. The idea is to see to what extent there are * things like "this piece of level 4 is accessible only by going via * levels 5 and 6". The display is not as clear as one might wish, * but the information is present in a much more compact form than * that displayed by probe(). */ extern void structure(void); #endif