|
|
The Makefile provided with the RedBase PF component automatically uses Purify. If you are working on a non-Stanford machine and you don't have access to Purify, then comment out the CC line in the Purify section of the Makefile and uncomment out the regular version of CC. Note that even if you are developing your code on a machine that does not support Purify, we do require that you run your programs with Purify on a Stanford machine before turning them in.
You need to ensure that you source the Purify setup environment before compiling with Purify. If you're using csh, tcsh, or a variant, you can type:
source /usr/pubsw/etc/rational/purifyplus_setup.csh
Purify'd programs are run exactly as the original program. A Purify Viewer window will be created, and error messages will be displayed as Purify detects various conditions. The messages initially appear in the Viewer as one-line summaries, which may be expanded and collapsed by clicking on the arrow glyph to the left. Some messages may have further subitems for more detail. Alternatively, messages may be output in ASCII, either to a log file or to the standard error stream. ASCII messages on the error stream becomes the default if an X-window cannot be created, or if you use the option windows=no in PURIFY_FLAGS within the Makefile. Our recommendation is that if you have X, use the default (windowed) display method.
The man page on Purify is quite extensive and includes some information on how to use Purify with different debuggers. We are requiring the use of Purify before submitting your programs (and before heading to the TA for debugging help!) because we strongly believe that it will help you create code that is more robust, it will help you find many common bugs very quickly, and it will enable you to focus your programming time on tackling the interesting database implementation issues in RedBase.