aboutsummaryrefslogtreecommitdiff
path: root/common/debug.h
blob: c9af5fec8a8f9f319a4c421460c035691a7970e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _DEBUG_H
#define _DEBUG_H

extern const char *sec_state_str;

#ifdef DEBUG
#define DEBUG_MSG(_str, ...) \
    printf("\n[DEBUG] %s (%s): " _str, __FUNCTION__, (sec_state_str)?sec_state_str:"MISSING", ##__VA_ARGS__)
#define DEBUG_ARG
#else
#define DEBUG_MSG(_str, ...)
#define DEBUG_ARG __attribute__ ((unused))
#endif

#endif