Use libbacktrace on BSD.

This commit is contained in:
Bartosz Taudul 2019-11-21 19:50:46 +01:00
parent bf778e2989
commit c7a22cc1ff
4 changed files with 7 additions and 5 deletions

View File

@ -24,7 +24,7 @@
#include "client/tracy_rpmalloc.cpp"
#include "client/TracyDxt1.cpp"
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 6
# include "libbacktrace/alloc.cpp"
# include "libbacktrace/dwarf.cpp"
# include "libbacktrace/elf.cpp"

View File

@ -17,7 +17,7 @@
# ifdef _MSC_VER
# pragma warning( pop )
# endif
#elif TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3
#elif TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 6
# include "../libbacktrace/backtrace.hpp"
# include <dlfcn.h>
# include <cxxabi.h>
@ -312,7 +312,7 @@ CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
return { &cb, 1 };
}
#elif TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3
#elif TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 6
enum { MaxCbTrace = 16 };

View File

@ -19,8 +19,10 @@
# else
# define TRACY_HAS_CALLSTACK 2
# endif
#elif defined __APPLE__ || defined BSD
#elif defined __APPLE__
# define TRACY_HAS_CALLSTACK 4
#elif defined BSD
# define TRACY_HAS_CALLSTACK 6
#endif
#endif

View File

@ -90,7 +90,7 @@ static tracy_force_inline void* Callstack( int depth )
return trace;
}
#elif TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4
#elif TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
static tracy_force_inline void* Callstack( int depth )
{