1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove DSTACK support (#6346)

Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
This commit is contained in:
Loïc Blot 2017-08-30 08:09:41 +02:00 committed by GitHub
parent 43f9e948a1
commit bd6b90359c
22 changed files with 1 additions and 327 deletions

View file

@ -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
*/