mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Remove unused debug flags and add "dns" and "network".
* g10/options.h (DBG_CARD_IO_VALUE, DBG_CARD_IO): Remove. * g10/gpg.c (debug_flags): Remove "cardio". * agent/agent.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove. * agent/gpg-agent.c (debug_flags): Remove "command". * scd/scdaemon.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove. * scd/scdaemon.c (debug_flags): Remove "command". * dirmngr/dirmngr.h (DBG_DNS_VALUE, DBG_DNS): New. (DBG_NETWORK_VALUE, DNG_NETWORK): New. * dirmngr/dirmngr.c (debug_flags): Add "dns" and "network". -- Note that "dns" and "network" are not yet used but will soon be added to dirmngr. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e77b924fec
commit
e384405b6e
@ -168,7 +168,6 @@ struct
|
||||
|
||||
|
||||
/* Bit values for the --debug option. */
|
||||
#define DBG_COMMAND_VALUE 1 /* debug commands i/o */
|
||||
#define DBG_MPI_VALUE 2 /* debug mpi details */
|
||||
#define DBG_CRYPTO_VALUE 4 /* debug low level crypto */
|
||||
#define DBG_MEMORY_VALUE 32 /* debug memory allocation stuff */
|
||||
@ -178,7 +177,6 @@ struct
|
||||
#define DBG_IPC_VALUE 1024 /* Enable Assuan debugging. */
|
||||
|
||||
/* Test macros for the debug option. */
|
||||
#define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE)
|
||||
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
|
||||
#define DBG_MEMORY (opt.debug & DBG_MEMORY_VALUE)
|
||||
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
|
||||
|
@ -251,7 +251,6 @@ static ARGPARSE_OPTS opts[] = {
|
||||
/* The list of supported debug flags. */
|
||||
static struct debug_flags_s debug_flags [] =
|
||||
{
|
||||
{ DBG_COMMAND_VALUE, "command" },
|
||||
{ DBG_MPI_VALUE , "mpi" },
|
||||
{ DBG_CRYPTO_VALUE , "crypto" },
|
||||
{ DBG_MEMORY_VALUE , "memory" },
|
||||
@ -520,10 +519,9 @@ set_debug (void)
|
||||
else if (!strcmp (debug_level, "basic") || (numok && numlvl <= 2))
|
||||
opt.debug = DBG_IPC_VALUE;
|
||||
else if (!strcmp (debug_level, "advanced") || (numok && numlvl <= 5))
|
||||
opt.debug = DBG_IPC_VALUE|DBG_COMMAND_VALUE;
|
||||
opt.debug = DBG_IPC_VALUE;
|
||||
else if (!strcmp (debug_level, "expert") || (numok && numlvl <= 8))
|
||||
opt.debug = (DBG_IPC_VALUE|DBG_COMMAND_VALUE
|
||||
|DBG_CACHE_VALUE);
|
||||
opt.debug = (DBG_IPC_VALUE | DBG_CACHE_VALUE);
|
||||
else if (!strcmp (debug_level, "guru") || numok)
|
||||
{
|
||||
opt.debug = ~0;
|
||||
|
@ -480,6 +480,8 @@ gnupg_compare_version (const char *a, const char *b)
|
||||
* supplied variable is updated by the parsed flags.
|
||||
*
|
||||
* If STRING is NULL the enabled debug flags are printed.
|
||||
*
|
||||
* See doc/DETAILS for a summary of used debug options.
|
||||
*/
|
||||
int
|
||||
parse_debug_flag (const char *string, unsigned int *debugvar,
|
||||
|
@ -257,6 +257,8 @@ static struct debug_flags_s debug_flags [] =
|
||||
{ DBG_MEMSTAT_VALUE, "memstat" },
|
||||
{ DBG_HASHING_VALUE, "hashing" },
|
||||
{ DBG_IPC_VALUE , "ipc" },
|
||||
{ DBG_DNS_VALUE , "dns" },
|
||||
{ DBG_NETWORK_VALUE, "network" },
|
||||
{ DBG_LOOKUP_VALUE , "lookup" },
|
||||
{ 77, NULL } /* 77 := Do not exit on "help" or "?". */
|
||||
};
|
||||
|
@ -136,19 +136,23 @@ struct
|
||||
|
||||
#define DBG_X509_VALUE 1 /* debug x.509 parsing */
|
||||
#define DBG_CRYPTO_VALUE 4 /* debug low level crypto */
|
||||
#define DBG_DNS_VALUE 16 /* debug DNS calls. */
|
||||
#define DBG_MEMORY_VALUE 32 /* debug memory allocation stuff */
|
||||
#define DBG_CACHE_VALUE 64 /* debug the caching */
|
||||
#define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
|
||||
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
|
||||
#define DBG_IPC_VALUE 1024 /* debug assuan communication */
|
||||
#define DBG_NETWORK_VALUE 2048 /* debug network I/O. */
|
||||
#define DBG_LOOKUP_VALUE 8192 /* debug lookup details */
|
||||
|
||||
#define DBG_X509 (opt.debug & DBG_X509_VALUE)
|
||||
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
|
||||
#define DBG_DNS (opt.debug & DBG_DNS_VALUE)
|
||||
#define DBG_MEMORY (opt.debug & DBG_MEMORY_VALUE)
|
||||
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
|
||||
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
|
||||
#define DBG_IPC (opt.debug & DBG_IPC_VALUE)
|
||||
#define DBG_NETWORK (opt.debug & DBG_NETWORK_VALUE)
|
||||
#define DBG_LOOKUP (opt.debug & DBG_LOOKUP_VALUE)
|
||||
|
||||
/* A simple list of certificate references. */
|
||||
|
37
doc/DETAILS
37
doc/DETAILS
@ -1328,6 +1328,43 @@ Status codes are:
|
||||
|
||||
|
||||
|
||||
* Debug flags
|
||||
|
||||
This tables gives the flag values for the --debug option along with
|
||||
the alternative names used by the components.
|
||||
|
||||
| | gpg | gpgsm | agent | scd | dirmngr | g13 | wks |
|
||||
|-------+---------+---------+---------+---------+---------+---------+---------|
|
||||
| 1 | packet | x509 | | | x509 | mount | mime |
|
||||
| 2 | mpi | mpi | mpi | mpi | | | parser |
|
||||
| 4 | crypto | crypto | crypto | crypto | crypto | crypto | crypto |
|
||||
| 8 | filter | | | | | | |
|
||||
| 16 | iobuf | | | | dns | | |
|
||||
| 32 | memory | memory | memory | memory | memory | memory | memory |
|
||||
| 64 | cache | cache | cache | cache | cache | | |
|
||||
| 128 | memstat | memstat | memstat | memstat | memstat | memstat | memstat |
|
||||
| 256 | trust | | | | | | |
|
||||
| 512 | hashing | hashing | hashing | hashing | hashing | | |
|
||||
| 1024 | ipc | ipc | ipc | ipc | ipc | ipc | ipc |
|
||||
| 2048 | | | | cardio | network | | |
|
||||
| 4096 | clock | | | reader | | | |
|
||||
| 8192 | lookup | | | | lookup | | |
|
||||
| 16384 | extprog | | | | | | extprog |
|
||||
|
||||
Description of some debug flags:
|
||||
|
||||
- cardio :: Used by scdaemon to trace the APDUs exchange with the
|
||||
card.
|
||||
- clock :: Show execution times of certain functions.
|
||||
- crypto :: Trace crypto operations.
|
||||
- hashing :: Create files with the hashed data.
|
||||
- ipc :: Trace the Assuan commands.
|
||||
- mpi :: Show the values of the MPIs.
|
||||
- reader :: Used by scdaemon to trace card reader related code. For
|
||||
example: Open and close reader.
|
||||
|
||||
|
||||
|
||||
* Miscellaneous notes
|
||||
|
||||
** v3 fingerprints
|
||||
|
@ -913,7 +913,6 @@ static struct debug_flags_s debug_flags [] =
|
||||
{ DBG_MEMSTAT_VALUE, "memstat" },
|
||||
{ DBG_TRUST_VALUE , "trust" },
|
||||
{ DBG_HASHING_VALUE, "hashing" },
|
||||
{ DBG_CARD_IO_VALUE, "cardio" },
|
||||
{ DBG_IPC_VALUE , "ipc" },
|
||||
{ DBG_CLOCK_VALUE , "clock" },
|
||||
{ DBG_LOOKUP_VALUE , "lookup" },
|
||||
|
@ -300,7 +300,6 @@ struct {
|
||||
#define DBG_TRUST_VALUE 256 /* debug the trustdb */
|
||||
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
|
||||
#define DBG_IPC_VALUE 1024 /* debug assuan communication */
|
||||
#define DBG_CARD_IO_VALUE 2048 /* debug smart card I/O. */
|
||||
#define DBG_CLOCK_VALUE 4096
|
||||
#define DBG_LOOKUP_VALUE 8192 /* debug the key lookup */
|
||||
#define DBG_EXTPROG_VALUE 16384 /* debug external program calls */
|
||||
@ -314,7 +313,6 @@ struct {
|
||||
#define DBG_TRUST (opt.debug & DBG_TRUST_VALUE)
|
||||
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
|
||||
#define DBG_IPC (opt.debug & DBG_IPC_VALUE)
|
||||
#define DBG_CARD_IO (opt.debug & DBG_CARD_IO_VALUE)
|
||||
#define DBG_IPC (opt.debug & DBG_IPC_VALUE)
|
||||
#define DBG_CLOCK (opt.debug & DBG_CLOCK_VALUE)
|
||||
#define DBG_LOOKUP (opt.debug & DBG_LOOKUP_VALUE)
|
||||
|
@ -165,7 +165,6 @@ static ARGPARSE_OPTS opts[] = {
|
||||
/* The list of supported debug flags. */
|
||||
static struct debug_flags_s debug_flags [] =
|
||||
{
|
||||
{ DBG_COMMAND_VALUE, "command" },
|
||||
{ DBG_MPI_VALUE , "mpi" },
|
||||
{ DBG_CRYPTO_VALUE , "crypto" },
|
||||
{ DBG_MEMORY_VALUE , "memory" },
|
||||
@ -328,10 +327,9 @@ set_debug (const char *level)
|
||||
else if (!strcmp (level, "basic") || (numok && numlvl <= 2))
|
||||
opt.debug = DBG_IPC_VALUE;
|
||||
else if (!strcmp (level, "advanced") || (numok && numlvl <= 5))
|
||||
opt.debug = DBG_IPC_VALUE|DBG_COMMAND_VALUE;
|
||||
opt.debug = DBG_IPC_VALUE;
|
||||
else if (!strcmp (level, "expert") || (numok && numlvl <= 8))
|
||||
opt.debug = (DBG_IPC_VALUE|DBG_COMMAND_VALUE
|
||||
|DBG_CACHE_VALUE|DBG_CARD_IO_VALUE);
|
||||
opt.debug = (DBG_IPC_VALUE|DBG_CACHE_VALUE|DBG_CARD_IO_VALUE);
|
||||
else if (!strcmp (level, "guru") || numok)
|
||||
{
|
||||
opt.debug = ~0;
|
||||
|
@ -65,7 +65,6 @@ struct
|
||||
} opt;
|
||||
|
||||
|
||||
#define DBG_COMMAND_VALUE 1 /* debug commands i/o */
|
||||
#define DBG_MPI_VALUE 2 /* debug mpi details */
|
||||
#define DBG_CRYPTO_VALUE 4 /* debug low level crypto */
|
||||
#define DBG_MEMORY_VALUE 32 /* debug memory allocation stuff */
|
||||
@ -76,7 +75,6 @@ struct
|
||||
#define DBG_CARD_IO_VALUE 2048
|
||||
#define DBG_READER_VALUE 4096 /* Trace reader related functions. */
|
||||
|
||||
#define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE)
|
||||
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
|
||||
#define DBG_MEMORY (opt.debug & DBG_MEMORY_VALUE)
|
||||
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user