summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/debug/debug.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 440c73418ed9..220d577be52d 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -41,6 +41,10 @@
#include <tools/diagnose_ex.h>
+#if defined __GLIBCXX__
+#include <cxxabi.h>
+#endif
+
#ifdef DBG_UTIL
struct DebugData
@@ -97,6 +101,11 @@ void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunc
if ( exception.Context.is() )
{
const char* pContext = typeid( *exception.Context.get() ).name();
+#if defined __GLIBCXX__
+ // demangle the type name, not necessary under windows, we already get demangled names there
+ int status;
+ pContext = abi::__cxa_demangle( pContext, nullptr, nullptr, &status);
+#endif
sMessage += "\n context: ";
sMessage += pContext;
}