[Libreoffice-commits] core.git: tools/source
Noel Grandin
noel.grandin at collabora.co.uk
Sat May 26 13:51:27 UTC 2018
tools/source/debug/debug.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 8dcbfb8c704576a81a8f972454a9ed08bee92010
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri May 25 14:45:24 2018 +0200
demangle context type name in DBG_UNHANDLED_EXCEPTION
Change-Id: I59591d0209ddf2bcf6e57a78dc7999d773b73ae3
Reviewed-on: https://gerrit.libreoffice.org/54805
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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;
}
More information about the Libreoffice-commits
mailing list