X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdebug.h;h=1faeece8db56a06eee10b9f8d3547bfc25a6a1c4;hb=5e61f64ce259fe0b23cbb377b44e90a0fbc820d7;hp=088ec0b879bf3605ede65afa886b8765075b98ae;hpb=921151d97a2fb2238ab514324fb95e2732248b96;p=oweals%2Fminetest.git diff --git a/src/debug.h b/src/debug.h index 088ec0b87..1faeece8d 100644 --- a/src/debug.h +++ b/src/debug.h @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include -#include +#include #include "gettime.h" #include "log.h" @@ -83,36 +83,6 @@ NORETURN extern void sanity_check_fn( void debug_set_exception_handler(); -/* - DebugStack -*/ - -#define DEBUG_STACK_SIZE 50 -#define DEBUG_STACK_TEXT_SIZE 300 - -extern void debug_stacks_print_to(std::ostream &os); -extern void debug_stacks_print(); - -struct DebugStack; -class DebugStacker -{ -public: - DebugStacker(const char *text); - ~DebugStacker(); - -private: - DebugStack *m_stack; - bool m_overflowed; -}; - -#define DSTACK(msg) \ - DebugStacker __debug_stacker(msg); - -#define DSTACKF(...) \ - char __buf[DEBUG_STACK_TEXT_SIZE]; \ - snprintf(__buf, DEBUG_STACK_TEXT_SIZE, __VA_ARGS__); \ - DebugStacker __debug_stacker(__buf); - /* These should be put into every thread */