aboutsummaryrefslogtreecommitdiff
path: root/user/include/weenix/debug.h
blob: a30641e9f106dd96e0fc8fcd885902db100b3403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "stdio.h"

int debug(const char *str);

#define dbg(fmt, args...)                                                    \
    do                                                                       \
    {                                                                        \
        char temp[2048];                                                     \
        snprintf(temp, sizeof(temp), "%s:%d %s(): " fmt, __FILE__, __LINE__, \
                 __func__, ##args);                                          \
        debug(temp);                                                         \
    } while (0);