From db794de6205212ab22feb5c79cc0f07b312f4043 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 27 Aug 2025 10:33:19 +0200 Subject: gpgsm: Change the debug flags used with --debug-level basic to expert. * sm/gpgsm.c (set_debug): Do not set the IPC debug flag when using some debug-levels. --- doc/gpgsm.texi | 9 +++++---- sm/gpgsm.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi index 5bba67d6a..7dab314be 100644 --- a/doc/gpgsm.texi +++ b/doc/gpgsm.texi @@ -801,8 +801,8 @@ The option has an effect only on Windows. @item --debug-level @var{level} @opindex debug-level -Select the debug level for investigating problems. @var{level} may be -a numeric value or by a keyword: +Select the debug level for investigating problems. @var{level} may be +a numeric value or a keyword: @table @code @item none @@ -824,8 +824,9 @@ only enabled if the keyword is used. @end table How these messages are mapped to the actual debugging flags is not -specified and may change with newer releases of this program. They are -however carefully selected to best aid in debugging. +specified and may change with newer releases of this program. This is +a legacy option; in general it is better to select specific debug +flags using the @option{--debug}. @item --debug @var{flags} @opindex debug diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 4614938c2..319002b07 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -777,11 +777,11 @@ set_debug (void) else if (!strcmp (debug_level, "none") || (numok && numlvl < 1)) opt.debug = 0; else if (!strcmp (debug_level, "basic") || (numok && numlvl <= 2)) - opt.debug = DBG_IPC_VALUE; + opt.debug = DBG_MEMSTAT_VALUE; else if (!strcmp (debug_level, "advanced") || (numok && numlvl <= 5)) - opt.debug = DBG_IPC_VALUE|DBG_X509_VALUE; + opt.debug = DBG_MEMSTAT_VALUE|DBG_X509_VALUE; else if (!strcmp (debug_level, "expert") || (numok && numlvl <= 8)) - opt.debug = (DBG_IPC_VALUE|DBG_X509_VALUE + opt.debug = (DBG_MEMSTAT_VALUE|DBG_X509_VALUE |DBG_CACHE_VALUE|DBG_CRYPTO_VALUE); else if (!strcmp (debug_level, "guru") || numok) { -- cgit v1.2.3