1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

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/tracy_rpmalloc.cpp"
#include "client/TracyDxt1.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/alloc.cpp"
# include "libbacktrace/dwarf.cpp" # include "libbacktrace/dwarf.cpp"
# include "libbacktrace/elf.cpp" # include "libbacktrace/elf.cpp"

View File

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

View File

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

View File

@ -90,7 +90,7 @@ static tracy_force_inline void* Callstack( int depth )
return trace; 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 ) static tracy_force_inline void* Callstack( int depth )
{ {