1 /* Copyright (c) 2005-2016. The SimGrid Team. All rights reserved. */
3 #ifndef SIMGRIX_XBT_BACKTRACE_H
4 #define SIMGRIX_XBT_BACKTRACE_H
12 typedef void* xbt_backtrace_location_t;
14 /** @brief Shows a backtrace of the current location */
15 XBT_PUBLIC(void) xbt_backtrace_display_current(void);
17 /** @brief reimplementation of glibc backtrace based directly on gcc library, without implicit malloc */
18 XBT_PUBLIC(int) xbt_backtrace_no_malloc(void**bt, int size);
20 /** @brief Captures a backtrace for further use */
21 XBT_PUBLIC(size_t) xbt_backtrace_current(xbt_backtrace_location_t* loc, size_t count);
23 /** @brief Display a previously captured backtrace */
24 XBT_PUBLIC(void) xbt_backtrace_display(xbt_backtrace_location_t* loc, size_t count);
26 /** @brief Get current backtrace with libunwind */
27 XBT_PUBLIC(int) xbt_libunwind_backtrace(void** bt, int size);