Browse Source

backtrace via boost::backtrace

It seems, that for now that is only option for clang + arm64
Fixes #2488
alexey 4 years ago
parent
commit
9e12e17407
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/sphinxutils.cpp

+ 6 - 0
src/sphinxutils.cpp

@@ -2722,6 +2722,9 @@ const char * DoBacktrace ( int, int )
 }
 #endif
 
+#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED 1
+#include <boost/stacktrace.hpp>
+
 void sphBacktrace ( int iFD, bool bSafe )
 {
 	if ( iFD<0 )
@@ -2830,6 +2833,9 @@ void sphBacktrace ( int iFD, bool bSafe )
 #endif // HAVE_BACKTRACE_SYMBOLS
 #endif // !HAVE_BACKTRACE
 
+	sphSafeInfo ( iFD, "Trying boost backtrace:" );
+	sphSafeInfo ( iFD, to_string ( boost::stacktrace::stacktrace() ).c_str() );
+
 	sphSafeInfo ( iFD, "-------------- backtrace ends here ---------------" );
 
 	if ( bOk )