comparison debug.h @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents deed0571cacc
children 6b89eb92f872 da095983a60b
comparison
equal deleted inserted replaced
1294:56aba7dedbea 1295:750ec4ec4cbe
37 * You'll need to run programs with "-v" to turn this on. 37 * You'll need to run programs with "-v" to turn this on.
38 * 38 *
39 * Caution: Don't use this in an unfriendly environment (ie unfirewalled), 39 * Caution: Don't use this in an unfriendly environment (ie unfirewalled),
40 * since the printing may not sanitise strings etc. This will add a reasonable 40 * since the printing may not sanitise strings etc. This will add a reasonable
41 * amount to your executable size. */ 41 * amount to your executable size. */
42 /*#define DEBUG_TRACE*/ 42 #ifndef DEBUG_TRACE
43 #define DEBUG_TRACE 0
44 #endif
43 45
44 /* All functions writing to the cleartext payload buffer call 46 /* All functions writing to the cleartext payload buffer call
45 * CHECKCLEARTOWRITE() before writing. This is only really useful if you're 47 * CHECKCLEARTOWRITE() before writing. This is only really useful if you're
46 * attempting to track down a problem */ 48 * attempting to track down a problem */
47 /*#define CHECKCLEARTOWRITE() assert(ses.writepayload->len == 0 && \ 49 /*#define CHECKCLEARTOWRITE() assert(ses.writepayload->len == 0 && \
59 61
60 /*#define DEBUG_KEXHASH*/ 62 /*#define DEBUG_KEXHASH*/
61 /*#define DEBUG_RSA*/ 63 /*#define DEBUG_RSA*/
62 64
63 /* you don't need to touch this block */ 65 /* you don't need to touch this block */
64 #ifdef DEBUG_TRACE 66 #if DEBUG_TRACE
65 #define TRACE(X) dropbear_trace X; 67 #define TRACE(X) dropbear_trace X;
66 #define TRACE2(X) dropbear_trace2 X; 68 #define TRACE2(X) dropbear_trace2 X;
67 #else /*DEBUG_TRACE*/ 69 #else /*DEBUG_TRACE*/
68 #define TRACE(X) 70 #define TRACE(X)
69 #define TRACE2(X) 71 #define TRACE2(X)