Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
attempt to get rid of all const_cast
[simgrid.git] / include / xbt / backtrace.h
1 /* Copyright (c) 2005-2016. The SimGrid Team. All rights reserved.          */
2
3 #ifndef XBT_BACKTRACE_H
4 #define XBT_BACKTRACE_H
5
6 #include <cstddef>
7
8 #include <xbt/base.h>
9
10 SG_BEGIN_DECL()
11
12 typedef void* xbt_backtrace_location_t;
13
14 /** @brief Shows a backtrace of the current location */
15 XBT_PUBLIC(void) xbt_backtrace_display_current();
16
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);
19
20 /** @brief Captures a backtrace for further use */
21 XBT_PUBLIC(size_t) xbt_backtrace_current(xbt_backtrace_location_t* loc, size_t count);
22
23 /** @brief Display a previously captured backtrace */
24 XBT_PUBLIC(void) xbt_backtrace_display(xbt_backtrace_location_t* loc, size_t count);
25
26 /** @brief Get current backtrace with libunwind */
27 XBT_PUBLIC(int) xbt_libunwind_backtrace(void** bt, int size);
28
29 SG_END_DECL()
30
31 #endif