Mercurial > dropbear
comparison debug.h @ 1893:180e580778df
Added DEBUG1,DEBUG2,DEBUG3 to separate functions while keeping TRACE and TRACE2.
author | HansH111 <hans@atbas.org> |
---|---|
date | Sat, 19 Mar 2022 09:01:05 +0000 |
parents | 3f80da5fe0b4 |
children | 3f87f7ff1092 |
comparison
equal
deleted
inserted
replaced
1892:3442105b2aba | 1893:180e580778df |
---|---|
46 /* A couple of flags, not usually useful, and mightn't do anything */ | 46 /* A couple of flags, not usually useful, and mightn't do anything */ |
47 | 47 |
48 /*#define DEBUG_KEXHASH*/ | 48 /*#define DEBUG_KEXHASH*/ |
49 /*#define DEBUG_RSA*/ | 49 /*#define DEBUG_RSA*/ |
50 | 50 |
51 /* you don't need to touch this block */ | 51 |
52 #if DEBUG_TRACE | 52 #if DEBUG_TRACE |
53 extern int debug_trace; | 53 extern int debug_trace; |
54 #define TRACE(X) dropbear_trace X; | 54 #endif |
55 #define TRACE2(X) dropbear_trace2 X; | 55 |
56 #else /*DEBUG_TRACE*/ | 56 /* you don't need to touch this block */ |
57 /* enable debug trace levels */ | |
58 #if (DEBUG_TRACE==1) | |
59 #define DEBUG1(X) dropbear_trace1 X; | |
60 #define DEBUG2(X) | |
61 #define DEBUG3(X) | |
57 #define TRACE(X) | 62 #define TRACE(X) |
58 #define TRACE2(X) | 63 #define TRACE2(X) |
59 #endif /*DEBUG_TRACE*/ | 64 #elif (DEBUG_TRACE==2) |
65 #define DEBUG1(X) dropbear_trace1 X; | |
66 #define DEBUG2(X) dropbear_trace2 X; | |
67 #define DEBUG3(X) | |
68 #define TRACE(X) | |
69 #define TRACE2(X) | |
70 #elif (DEBUG_TRACE==3) | |
71 #define DEBUG1(X) dropbear_trace1 X; | |
72 #define DEBUG2(X) dropbear_trace2 X; | |
73 #define DEBUG3(X) dropbear_trace3 X; | |
74 #define TRACE(X) | |
75 #define TRACE2(X) | |
76 #elif (DEBUG_TRACE==4) | |
77 #define DEBUG1(X) dropbear_trace1 X; | |
78 #define DEBUG2(X) dropbear_trace2 X; | |
79 #define DEBUG3(X) dropbear_trace3 X; | |
80 #define TRACE(X) dropbear_trace4 X; | |
81 #define TRACE2(X) | |
82 #elif (DEBUG_TRACE==5) | |
83 #define DEBUG1(X) dropbear_trace1 X; | |
84 #define DEBUG2(X) dropbear_trace2 X; | |
85 #define DEBUG3(X) dropbear_trace3 X; | |
86 #define TRACE(X) dropbear_trace4 X; | |
87 #define TRACE2(X) dropbear_trace5 X; | |
88 #endif | |
60 | 89 |
61 /* To debug with GDB it is easier to run with no forking of child processes. | 90 /* To debug with GDB it is easier to run with no forking of child processes. |
62 You will need to pass "-F" as well. */ | 91 You will need to pass "-F" as well. */ |
63 #ifndef DEBUG_NOFORK | 92 #ifndef DEBUG_NOFORK |
64 #define DEBUG_NOFORK 0 | 93 #define DEBUG_NOFORK 0 |