home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#) debug.h 2.3 88/05/18
- *
- * Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
- * Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
- * This Module contains Proprietary Information of
- * The Santa Cruz Operation, Microsoft Corporation
- * and AT&T, and should be treated as Confidential.
- */
-
- #ifdef M_I386
- #ifdef DEBUGGER
- # ifndef DEBUG
- # define DEBUG
- # endif
- # define debugger(class) if ( debug(class, DL_HALT) ) calldebug();
- extern int calldebug();
- #else
- # define debugger(class)
- #endif
-
- #ifdef DEBUG
- # define debug(class, level) (bugbits[class] & level)
- # define dentry(class, name) if (debug(class,DL_CALL)) printf(entryfmt,name);
- # define dexit(class, name) if (debug(class,DL_CALL)) printf(exitfmt, name);
- extern char entryfmt[];
- extern char exitfmt[];
- #else
- # define debug(class, level)
- # define dentry(class, name)
- # define dexit(class, name)
- #endif
-
- /*
- * Debugging classes
- */
- #define DB_EXEC 0 /* exec system call */
- #define DB_FP 1 /* floating point */
- #define DB_MAIN 2 /* system initialization */
- #define DB_MALLOC 3 /* memory allocation */
- #define DB_MMU 4 /* memory management */
- #define DB_PHYSIO 5 /* raw I/O */
- #define DB_SIG 6 /* signals */
- #define DB_SLP 7 /* process switching */
- #define DB_TEXT 8 /* text table management */
- #define DB_TRAP 9 /* traps and faults */
- #define DB_PFAULT 10 /* page faults */
- #define DB_PGOUT 11 /* paging */
- #define DB_SCALL 12 /* system calls */
- #define DB_PHASH 13 /* filesystem page cache */
- #define DB_FORK 14 /* copy on write fork */
- #define DB_SWAP 15 /* swapping */
- #define DB_IPC 16 /* ipc msgs, sems, shm */
- #define DB_CONSOLE 17 /* console */
- #define DB_DISK 18 /* disk driver */
- #define DB_SYNC 19 /* page synchronization */
- #define DB_SWTCH 20 /* context switching */
- #define DB_STREAM 21 /* stream io */
- #define DB_LOCK 22 /* locking */
- #define DB_TAPE 23 /* tape */
- #define DB_SPARE 24 /* spare temp debugging */
- #define NDBC 25 /* number of debugging classes */
-
- /*
- * Debugging levels
- */
- #define DL_TERSE 1 /* terse output */
- #define DL_VERB 2 /* verbose output */
- #define DL_HALT 4 /* call debug() at strategic points */
- #define DL_CALL 8 /* function entry/exit trace */
-
- /*
- * Manifest constants for debugger
- */
- #define NAR 19 /* can't match anything in reg.h */
-
- extern char bugbits[];
-
- #else
-
- #define calldebug() debug(0)
- #define dentry(class, name)
- #define dexit(class, name)
-
- #endif
-