From 8dcbfb8c704576a81a8f972454a9ed08bee92010 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 May 2018 14:45:24 +0200 Subject: demangle context type name in DBG_UNHANDLED_EXCEPTION Change-Id: I59591d0209ddf2bcf6e57a78dc7999d773b73ae3 Reviewed-on: https://gerrit.libreoffice.org/54805 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/source/debug/debug.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/source') 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 +#if defined __GLIBCXX__ +#include +#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; } -- cgit