next up previous contents
Next: Attaching files to MOSS.EXE Up: Building MOSS Previous: MOSS directory structure

Compile-time options

 

As mentioned above, you can turn on various internal assertions and debugging features by adding -enable-debug to MOSS's configure command line (which causes the symbol DEBUG to be defined while compiling MOSS). However, if you compile with debugging enabled, all the additional assertions and checks compiled in may make the MOSS executable grow too big for the 64K small-model program size limit under DOS (i386-moss-ld will report an error message while creating the DOS executable). If this happens, just disable DPMI or VCPI support (or both) as described below, depending on the DOS environment you're testing in, and the executable should then be small enough. (We know of a fairly straightforward way to get rid of the 64K size limit on the MOSS executable, but we haven't implemented it yet; contact us on the MOSS mailing list if you would like to do this.)

There are several other compile-time configuration options you can set; they are located in the source file moss/kernel/raw/config.h. The ENABLE_DPMI and ENABLE_VCPI options enable DPMI and VCPI support, respectively; the ENABLE_RGDB option enables remote source-level debugging.

ENABLE_CODE_CHECK is an option only used for debugging MOSS itself; it turns on a kludge whereby MOSS copies its entire code segment elsewhere on startup and checks it on exit (and at any other times you call the code_check() function) to detect code trashing bugs. This is particularly useful for MOSS itself because it is not possible to unmap page 0 of MOSS's ``address space'' to catch null pointer references and such, or to make the text segment read-only, as is normally done with Un*x executables and 32-bit programs running under MOSS. You should probably leave this option disabled unless you're into serious MOSS development.



Bryan Ford