attempt to trouble shoot missing backtraces on linux

This commit is contained in:
arvidn 2015-06-20 16:36:23 -04:00
parent adc63d2b88
commit 3755a77a64
5 changed files with 13 additions and 7 deletions

View File

@ -151,7 +151,8 @@ rule linking ( properties * )
result += <library>tcmalloc ;
}
if <toolset>gcc in $(properties)
if ( <toolset>gcc in $(properties)
|| <toolset>clang in $(properties) )
&& <target-os>linux in $(properties)
&& ( <variant>debug in $(properties)
|| <asserts>on in $(properties)
@ -162,7 +163,7 @@ rule linking ( properties * )
{
# for backtraces in assertion failures
# which only works on ELF targets with gcc
result += <linkflags>-export-dynamic <cxxflags>-rdynamic ;
result += <linkflags>-export-dynamic <linkflags>-rdynamic ;
}
if <boost>source in $(properties)

View File

@ -226,7 +226,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_HAVE_FDATASYNC 1
#endif // ANDROID
#if __amd64__ || __i386__
#if defined _GLIBC_ && ( defined __x86_64__ || defined __i386 \
|| defined _M_X64 || defined _M_IX86 )
#define TORRENT_USE_EXECINFO 1
#endif
@ -275,7 +276,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_USE_PWRITEV 1
// ==== SOLARIS ===
#elif defined sun || defined __sun
#elif defined sun || defined __sun
#define TORRENT_SOLARIS
#define TORRENT_COMPLETE_TYPES_REQUIRED 1
#define TORRENT_USE_IFCONF 1

View File

@ -207,7 +207,10 @@ TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
#else
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
{ out[0] = 0; }
{
out[0] = 0;
strncat(out, "<not supported>", len)
}
#endif

View File

@ -102,6 +102,7 @@ void sig_handler(int sig)
strcat(stack_text, __FUNCTION__);
#else
stack_text[0] = 0;
strcat(stack_text, "<stack traces disabled>");
#endif
char const* sig_name = 0;
switch (sig)
@ -125,7 +126,7 @@ void sig_handler(int sig)
output_test_log_to_terminal();
exit(138);
exit(128 + sig);
}
void print_usage(char const* executable)

View File

@ -135,7 +135,7 @@ void run_test(std::string const& url, int size, int status, int connected
std::cerr << time_now_string() << " expected-size: " << size << std::endl;
std::cerr << time_now_string() << " error_code: " << g_error_code.message() << std::endl;
TEST_CHECK(connect_handler_called == connected);
TEST_CHECK(handler_called == 1);
TEST_CHECK(handler_called == 1);
TEST_CHECK(data_size == size || size == -1);
TEST_CHECK(!ec || g_error_code == *ec);
TEST_CHECK(http_status == status || status == -1);