44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 722d84fee5321ee6909f12c1d10b097c24ba1adc Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
|
|
Date: Sat, 22 Jan 2022 17:29:59 +0100
|
|
Subject: [PATCH] backtrace
|
|
|
|
|
|
diff --git a/src/libs/utils/qtcassert.cpp b/src/libs/utils/qtcassert.cpp
|
|
index 560df43a..87ca6fd5 100644
|
|
--- a/src/libs/utils/qtcassert.cpp
|
|
+++ b/src/libs/utils/qtcassert.cpp
|
|
@@ -40,7 +40,7 @@ void dumpBacktrace(int maxdepth)
|
|
{
|
|
if (maxdepth == -1)
|
|
maxdepth = 1000;
|
|
-#if defined(Q_OS_UNIX)
|
|
+#if defined(Q_OS_UNIX) && defined(__GLIBC__)
|
|
void *bt[1000] = {nullptr};
|
|
int size = backtrace(bt, sizeof(bt) / sizeof(bt[0]));
|
|
char **lines = backtrace_symbols(bt, size);
|
|
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
index a3a9806f..bb6cc30d 100644
|
|
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
@@ -99,7 +99,7 @@ bool Exception::warnAboutException()
|
|
#endif
|
|
}
|
|
|
|
-#ifdef Q_OS_LINUX
|
|
+#if defined(Q_OS_UNIX) && defined(__GLIBC__)
|
|
static QString getBackTrace()
|
|
{
|
|
QString backTrace;
|
|
@@ -137,7 +137,7 @@ Exception::Exception(int line, const QByteArray &function,
|
|
, m_function(QString::fromUtf8(function))
|
|
, m_file(QString::fromUtf8(file))
|
|
, m_description(description)
|
|
- #ifdef Q_OS_LINUX
|
|
+ #if defined(Q_OS_UNIX) && defined(__GLIBC__)
|
|
, m_backTrace(getBackTrace())
|
|
#endif
|
|
{
|
|
--
|
|
2.34.1
|
|
|