summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-25 14:45:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-26 15:51:07 +0200
commit8dcbfb8c704576a81a8f972454a9ed08bee92010 (patch)
tree94a2962aeb7d6d0a38f634f35234bdd1b49c0fdc /tools/source
parent8c1470787f42b20cd12a3f32798edc5d7233ad9d (diff)
demangle context type name in DBG_UNHANDLED_EXCEPTION
Change-Id: I59591d0209ddf2bcf6e57a78dc7999d773b73ae3 Reviewed-on: https://gerrit.libreoffice.org/54805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-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;
}