diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-07-04 02:42:52 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-07-04 02:42:52 -0600 |
commit | c566cd0e4a7d9424a95c7d7c16f861e458bee8f1 (patch) | |
tree | b2c604c2e35621be166e0e8a902cc0dd291e4948 | |
parent | f720e89f631da58c355ead60b35225e43d0d9d33 (diff) | |
download | alpine-c566cd0e4a7d9424a95c7d7c16f861e458bee8f1.tar.xz |
* When building Alpine, the option --disable-debug will only affect if
its binary is compiled with debug, and not the ability of alpine to
generate internal debug. Alpine will not write debug files unless
started with the option -d, so for example "alpine -d 2" will generate
a debug file at level 2, but just issuing the alpine command will not
write any debug to a file.
-rw-r--r-- | alpine/arg.c | 1 | ||||
-rw-r--r-- | alpine/osdep/debuging.c | 2 | ||||
-rwxr-xr-x | configure | 15 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | pith/pine.hlp | 6 | ||||
-rw-r--r-- | pith/state.h | 1 |
6 files changed, 22 insertions, 13 deletions
diff --git a/alpine/arg.c b/alpine/arg.c index 25419b30..57c39fca 100644 --- a/alpine/arg.c +++ b/alpine/arg.c @@ -1165,6 +1165,7 @@ process_debug_str(char *debug_str) } } + if(usage >= 0) ps_global->write_debug_file++; if(!new_style_debug_arg){ #ifdef CSRIMALLOC ps_global->debug_malloc = diff --git a/alpine/osdep/debuging.c b/alpine/osdep/debuging.c index 47a056bf..f7a29716 100644 --- a/alpine/osdep/debuging.c +++ b/alpine/osdep/debuging.c @@ -74,7 +74,7 @@ init_debug(void) char newfname[MAXPATH+1], filename[MAXPATH+1], *dfile = NULL; int i, fd; - if(!(debug || ps_global->debug_imap || ps_global->debug_tcp)) + if(!((debug || ps_global->debug_imap || ps_global->debug_tcp) && ps_global->write_debug_file)) return; for(i = ps_global->debug_nfiles - 1; i > 0; i--){ @@ -1578,7 +1578,7 @@ Optional Features: --enable-dmalloc Enable dmalloc debugging --enable-osx-universal-binaries Produce universal binaries under OS X [[default=no]] - --disable-debug Exclude debug messages from source + --disable-debug Exclude debug from the binary --disable-optimization Exclude optimizing compiler flags --disable-mouse Disable mouse support --enable-quotas Enable disk quota checking on startup @@ -15157,12 +15157,6 @@ fi if test x$enable_debug != "xno" ; then AM_CFLAGS="$AM_CFLAGS -g" - -$as_echo "#define DEBUG 1" >>confdefs.h - - -$as_echo "#define DEBUGJOURNAL 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -15170,6 +15164,13 @@ else $as_echo "no" >&6; } fi +$as_echo "#define DEBUG 1" >>confdefs.h + + +$as_echo "#define DEBUGJOURNAL 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking option: optimization is enabled" >&5 $as_echo_n "checking option: optimization is enabled... " >&6; } # Check whether --enable-optimization was given. diff --git a/configure.ac b/configure.ac index c93f7690..118f0ae5 100644 --- a/configure.ac +++ b/configure.ac @@ -224,16 +224,18 @@ AC_ARG_WITH(web-bin, dnl disable debug, turned on by default AC_MSG_CHECKING([option: debugging is enabled]) -AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug],[Exclude debug messages from source])) +AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug],[Exclude debug from the binary])) if test x$enable_debug != "xno" ; then AM_CFLAGS="$AM_CFLAGS -g" - AC_DEFINE([DEBUG], [1], [Compile in debugging]) - AC_DEFINE([DEBUGJOURNAL], [1], [Display debug messages in journal]) AC_MSG_RESULT([yes]) else -dnl ??? set AM_CFLAGS to optimize ??? AC_MSG_RESULT([no]) fi +dnl we want debug messages to be compiled into the binary, but only write to a file +dnl upon user request. +AC_DEFINE([DEBUG], [1], [Compile in debugging]) +AC_DEFINE([DEBUGJOURNAL], [1], [Display debug messages in journal]) + dnl disable optimization, on by default AC_MSG_CHECKING([option: optimization is enabled]) diff --git a/pith/pine.hlp b/pith/pine.hlp index 08f02ceb..777b53f5 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 480 2020-07-03 11:34:14 +Alpine Commit 481 2020-07-04 02:42:49 ============= h_news ================= <HTML> <HEAD> @@ -227,6 +227,10 @@ problems you find with this release. is almost equivalent to being a shortcut to "unselect all messages, and select again". The difference is that cancelling this command will not unselect all currently selected messages. Suggested by Holger Trapp. + +<LI> Alpine will not write debug files unless started with the option -d, + so for example "alpine -d 2" will generate a debug file at level 2, + but just issuing the alpine command will not write any debug to a file. </UL> <P> diff --git a/pith/state.h b/pith/state.h index 3fec3691..24bc8909 100644 --- a/pith/state.h +++ b/pith/state.h @@ -130,6 +130,7 @@ struct pine { char *html_dir; HTML_LOG_S *html_dir_list; + unsigned write_debug_file:1; /* should we write debug to a file */ unsigned signal_in_progress:1; /* we are handling a signal */ unsigned mangled_footer:1; /* footer needs repainting */ unsigned mangled_header:1; /* header needs repainting */ |