#ifndef TP_DEBUG_H
#define TP_DEBUG_H
#include "rtapi.h"
#ifdef TP_DEBUG
#define tp_debug_print(...) rtapi_print(__VA_ARGS__)
#elif defined(UNIT_TEST)
#include <stdio.h>
#define tp_debug_print(...) printf(__VA_ARGS__)
#else
#define tp_debug_print(...)
#endif
#define tp_debug_json_double(varname_) tp_debug_print("%s: %g, ", #varname_, varname_)
#define tp_debug_json_start(fname_) tp_debug_print("%s: {", #fname_)
#define tp_debug_json_end() tp_debug_print("}\n")
#ifdef TP_PROFILE
#define STATIC
#else
#define STATIC static
#endif
#ifdef TC_DEBUG
#define tc_debug_print(...) rtapi_print(__VA_ARGS__)
#else
#define tc_debug_print(...)
#endif
#ifdef TP_POSEMATH_DEBUG
#define tp_posemath_debug(...) rtapi_print(__VA_ARGS__)
#else
#define tp_posemath_debug(...)
#endif
#ifdef TP_INFO_LOGGING
#define tp_info_print(...) rtapi_print(__VA_ARGS__)
#else
#define tp_info_print(...)
#endif
int gdb_fake_catch(int condition);
int gdb_fake_assert(int condition);
#endif