1 /* Copyright (c) 2005-2016. The SimGrid Team. All rights reserved. */
6 #include <xbt/backtrace.h>
8 #include "src/internal_config.h"
12 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_backtrace, xbt, "Backtrace");
16 /** @brief show the backtrace of the current point (lovely while debuging) */
17 void xbt_backtrace_display_current(void)
19 const std::size_t size = 10;
20 xbt_backtrace_location_t bt[size];
21 size_t used = xbt_backtrace_current(bt, size);
22 xbt_backtrace_display(bt, used);
25 #if HAVE_BACKTRACE && HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
26 # include "src/xbt/backtrace_linux.cpp"
28 # include "src/xbt/backtrace_dummy.cpp"