00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef OSCAP_DEBUG_PRIV_H_
00030 #define OSCAP_DEBUG_PRIV_H_
00031
00032 #include <assert.h>
00033 #include <stdlib.h>
00034 #include <stddef.h>
00035 #include <stdarg.h>
00036 #include "util.h"
00037 #include "public/oscap_debug.h"
00038
00039 OSCAP_HIDDEN_START;
00040
00041 #define OSCAP_DEBUGOBJ_SEXP 1
00042
00043 #ifndef _A
00044 #define _A(x) assert(x)
00045 #endif
00046
00047
00048 # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__)
00049
00061 void __oscap_dlprintf(int level, const char *file, const char *fn, size_t line, int delta_indent, const char *fmt, ...);
00062
00068 # define oscap_dlprintf(l, ...) __dlprintf_wrapper (l, __VA_ARGS__)
00069
00070 void __oscap_debuglog_object (const char *file, const char *fn, size_t line, int objtype, void *obj);
00071
00072 # define dO(type, obj) __oscap_debuglog_object(__FILE__, __PRETTY_FUNCTION__, __LINE__, type, obj)
00073
00074
00075 #define dI(...) oscap_dlprintf(DBG_I, __VA_ARGS__)
00076 #define dW(...) oscap_dlprintf(DBG_W, __VA_ARGS__)
00077 #define dE(...) oscap_dlprintf(DBG_E, __VA_ARGS__)
00078 #define dD(...) oscap_dlprintf(DBG_D, __VA_ARGS__)
00079
00080 #define dIndent(indent_change) __oscap_dlprintf(DBG_I, __FILE__, __PRETTY_FUNCTION__, __LINE__, indent_change, NULL)
00081
00082 OSCAP_HIDDEN_END;
00083
00084 #endif