41 unw_cursor_t cursor = { 0 };
42 unw_context_t uc = { 0 };
45 char buf[256] = { 0 };
48 printf(
"Backtrace\n");
51 unw_init_local(&cursor, &uc);
52 while (unw_step(&cursor) > 0)
54 unw_get_reg(&cursor, UNW_REG_IP, &ip);
55 unw_get_reg(&cursor, UNW_REG_SP, &sp);
56 unw_get_proc_name(&cursor, buf,
sizeof(buf), &ip);
59 printf(
" %s() ip = %lx, sp = %lx\n", buf, (
long) ip, (
long) sp);
void show_backtrace(void)
Log the program's call stack.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Some miscellaneous functions.