From: Luis F. P. de C. <lu...@cs...> - 2002-05-20 20:14:33
|
Hi all, I spent some time in the last couple of weeks trying to clean up the various DEBUG_*-dependent code XSB has, in order to have a better interface for enabling debug messages. The solution I've come up is, admittedly, not the best, but it's what I could do without spending too much time on it. ;) I've created four different switches for the configuration process, namely: --enable-debug - compiles with debug info (-g on gcc, for instance), but without enabling any DEBUG_* related code (so the code is essentially the same as when compiled without debug, in an attempt to facilitate reproducing bugs from a debugger). --enable-debug-verbose - basically, enables the xsb_dbgmsg macro, thus enabling debug messages to be shown. Incidentally, I've made this macro to receive a "log level" that is set at runtime, changing the verboseness of the system. --enable-debug-vm - enables the disassembler, WAM-profiler, etc. --enable-debug-assertions - enables several assertions that were already in the system, under different #ifdef's. The rationale is the following: --enable-debug should not change the code being compiled, only allowing for a debugger to be used on it. --enable-debug-verbose should only enable informative messages. --enable-debug-vm incorporate debugging facilities at the virtual machine level. And --enable-debug-assertions compiles a "safe" system, with assertions to check for several invariants. If there are no objections to this, I'll commit these changes by tomorrow. Comments? -Luis |