expose print_backtrace in debug builds for the tests
This commit is contained in:
parent
acff091cad
commit
c80e156120
|
@ -47,7 +47,7 @@ extern char const* libtorrent_assert_log;
|
|||
#include <string>
|
||||
|
||||
std::string demangle(char const* name);
|
||||
void print_backtrace(char* out, int len, int max_depth = 0);
|
||||
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth = 0);
|
||||
|
||||
#if (defined __linux__ || defined __MACH__) && defined __GNUC__ && !TORRENT_USE_SYSTEM_ASSERT
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ std::string demangle(char const* name) { return name; }
|
|||
#if (defined __linux__ || (defined __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050))
|
||||
#include <execinfo.h>
|
||||
|
||||
void print_backtrace(char* out, int len, int max_depth)
|
||||
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
|
||||
{
|
||||
void* stack[50];
|
||||
int size = backtrace(stack, 50);
|
||||
|
@ -142,7 +142,7 @@ void print_backtrace(char* out, int len, int max_depth)
|
|||
#include "winbase.h"
|
||||
#include "dbghelp.h"
|
||||
|
||||
void print_backtrace(char* out, int len, int max_depth)
|
||||
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
|
||||
{
|
||||
typedef USHORT (*RtlCaptureStackBackTrace_t)(
|
||||
__in ULONG FramesToSkip,
|
||||
|
@ -196,7 +196,7 @@ void print_backtrace(char* out, int len, int max_depth)
|
|||
|
||||
#else
|
||||
|
||||
void print_backtrace(char* out, int len, int max_depth) {}
|
||||
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth) {}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue