diff --git a/kern/conf/DUMBVM b/kern/conf/DUMBVM index 7862c64..2a19bee 100644 --- a/kern/conf/DUMBVM +++ b/kern/conf/DUMBVM @@ -3,7 +3,9 @@ include conf/conf.kern # get definitions of available options -debug # Compile with debug info. +debug # Compile with debug info and -Og. +#debugonly # Compile with debug info only (no -Og). +#options hangman # Deadlock detection. (off by default) # # Device drivers for hardware. diff --git a/kern/conf/DUMBVM-OPT b/kern/conf/DUMBVM-OPT index e878c35..115016f 100644 --- a/kern/conf/DUMBVM-OPT +++ b/kern/conf/DUMBVM-OPT @@ -7,6 +7,7 @@ include conf/conf.kern # get definitions of available options #debug # Optimizing compile (no debug). +#debugonly options noasserts # Disable assertions. # diff --git a/kern/conf/GENERIC b/kern/conf/GENERIC index 13ff40e..a726c3c 100644 --- a/kern/conf/GENERIC +++ b/kern/conf/GENERIC @@ -5,6 +5,8 @@ include conf/conf.kern # get definitions of available options debug # Compile with debug info. +#debugonly # Compile with debug info only (no -Og). +#options hangman # Deadlock detection. (off by default) # # Device drivers for hardware. diff --git a/kern/conf/GENERIC-OPT b/kern/conf/GENERIC-OPT index f78637d..7bdc740 100644 --- a/kern/conf/GENERIC-OPT +++ b/kern/conf/GENERIC-OPT @@ -7,6 +7,7 @@ include conf/conf.kern # get definitions of available options #debug # Optimizing compile (no debug). +#debugonly options noasserts # Disable assertions. # diff --git a/kern/conf/conf.kern b/kern/conf/conf.kern index 48ed457..ad58977 100644 --- a/kern/conf/conf.kern +++ b/kern/conf/conf.kern @@ -326,6 +326,9 @@ file thread/synch.c file thread/thread.c file thread/threadlist.c +defoption hangman +optfile hangman thread/hangman.c + # # Process system # diff --git a/kern/conf/config b/kern/conf/config index 01bca35..f49c4ab 100755 --- a/kern/conf/config +++ b/kern/conf/config @@ -12,7 +12,8 @@ # Recognized directives: # # file use source file -# debug turn on debug info +# debug turn on debug info and -Og +# debugonly turn on debug info without -Og # defoption define an option # optfile if option is enabled, use file # optofffile if option is disabled, use file @@ -97,6 +98,7 @@ echo "$CONFNAME" $CONFTMP | awk ' nfields["include"] = 2; nfields["file"] = 2; nfields["debug"] = 1; + nfields["debugonly"] = 1; nfields["defoption"] = 2; nfields["optfile"] = 3; nfields["optofffile"] = 3; @@ -776,6 +778,9 @@ echo -n ' files.mk' # Default: optimize. BEGIN { debugflags="-O2"; } $1=="debug" { + debugflags="-g -Og"; + } + $1=="debugonly" { debugflags="-g"; }