#define DPRINTF(x...)
#endif
+void ha_backtrace_to_stderr(void);
+
/* Let's make DEBUG_STRESS equal to zero if not set or not valid, or to
* 1 if set. This way it is always set and should be easy to use in "if ()"
* statements without requiring ifdefs, while remaining compatible with
# define DEBUG_STRICT_ACTION 3 // enable crash on match
#endif
-#define DUMP_TRACE() do { extern void ha_backtrace_to_stderr(void); ha_backtrace_to_stderr(); } while (0)
-
/* First, let's try to handle some arch-specific crashing methods. We prefer
* the macro to the function because when opening the core, the debugger will
* directly show the calling point (e.g. the BUG_ON() condition) based on the
const char *msg; \
if (sizeof("" __VA_ARGS__) > 1) \
complain(NULL, "\nABORT at " file ":" #line ": " __VA_ARGS__ "\n", 1); \
- DUMP_TRACE(); \
+ ha_backtrace_to_stderr(); \
msg = "\n" \
"Hint: when reporting this bug to developers, please check if a core file was\n" \
" produced, open it with 'gdb', issue 'bt' to produce a backtrace for the\n" \
const char *msg; \
if (sizeof("" __VA_ARGS__) > 1) \
complain(NULL, "\nABORT at " file ":" #line ": " __VA_ARGS__ "\n", 1); \
- DUMP_TRACE(); \
+ ha_backtrace_to_stderr(); \
msg = "\n" \
"Hint: when reporting this bug to developers, please check if a core file was\n" \
" produced, open it with 'gdb', issue 'bt' to produce a backtrace for the\n" \
if (crash & 1) \
ABORT_NOW(); \
else \
- DUMP_TRACE(); \
+ ha_backtrace_to_stderr(); \
} while (0)
/* This one is equivalent except that it only emits the message once by
if (crash & 1) \
ABORT_NOW(); \
else \
- DUMP_TRACE(); \
+ ha_backtrace_to_stderr(); \
} while (0)
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx);
void ha_thread_dump_one(struct buffer *buf, int is_caller);
void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump);
-void ha_backtrace_to_stderr(void);
void ha_panic(void);
void ha_stuck_warning(void);