New debug options.

This commit is contained in:
Geoffrey Challen 2017-02-09 09:48:06 -05:00
parent 5f8b9f7ff4
commit 8435ba6436
6 changed files with 16 additions and 2 deletions

View File

@ -3,7 +3,9 @@
include conf/conf.kern # get definitions of available options 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. # Device drivers for hardware.

View File

@ -7,6 +7,7 @@
include conf/conf.kern # get definitions of available options include conf/conf.kern # get definitions of available options
#debug # Optimizing compile (no debug). #debug # Optimizing compile (no debug).
#debugonly
options noasserts # Disable assertions. options noasserts # Disable assertions.
# #

View File

@ -5,6 +5,8 @@
include conf/conf.kern # get definitions of available options include conf/conf.kern # get definitions of available options
debug # Compile with debug info. debug # Compile with debug info.
#debugonly # Compile with debug info only (no -Og).
#options hangman # Deadlock detection. (off by default)
# #
# Device drivers for hardware. # Device drivers for hardware.

View File

@ -7,6 +7,7 @@
include conf/conf.kern # get definitions of available options include conf/conf.kern # get definitions of available options
#debug # Optimizing compile (no debug). #debug # Optimizing compile (no debug).
#debugonly
options noasserts # Disable assertions. options noasserts # Disable assertions.
# #

View File

@ -326,6 +326,9 @@ file thread/synch.c
file thread/thread.c file thread/thread.c
file thread/threadlist.c file thread/threadlist.c
defoption hangman
optfile hangman thread/hangman.c
# #
# Process system # Process system
# #

View File

@ -12,7 +12,8 @@
# Recognized directives: # Recognized directives:
# #
# file <filename> use source file # file <filename> use source file
# debug turn on debug info # debug turn on debug info and -Og
# debugonly turn on debug info without -Og
# defoption <sym> define an option # defoption <sym> define an option
# optfile <sym> <file> if option <sym> is enabled, use file <file> # optfile <sym> <file> if option <sym> is enabled, use file <file>
# optofffile <sym> <file> if option <sym> is disabled, use file <file> # optofffile <sym> <file> if option <sym> is disabled, use file <file>
@ -97,6 +98,7 @@ echo "$CONFNAME" $CONFTMP | awk '
nfields["include"] = 2; nfields["include"] = 2;
nfields["file"] = 2; nfields["file"] = 2;
nfields["debug"] = 1; nfields["debug"] = 1;
nfields["debugonly"] = 1;
nfields["defoption"] = 2; nfields["defoption"] = 2;
nfields["optfile"] = 3; nfields["optfile"] = 3;
nfields["optofffile"] = 3; nfields["optofffile"] = 3;
@ -776,6 +778,9 @@ echo -n ' files.mk'
# Default: optimize. # Default: optimize.
BEGIN { debugflags="-O2"; } BEGIN { debugflags="-O2"; }
$1=="debug" { $1=="debug" {
debugflags="-g -Og";
}
$1=="debugonly" {
debugflags="-g"; debugflags="-g";
} }