diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index bb8706bcac8..7f3ec9a97f3 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1340,16 +1340,15 @@ void QMessagePattern::setPattern(const QString &pattern) // make sure the function has "Message" in the name so the function is removed /* A typical backtrace in debug mode looks like: - #0 backtraceFramesForLogMessage (frameCount=5) at qlogging.cpp:1296 - #1 formatBacktraceForLogMessage (backtraceParams=..., function=0x4040b8 "virtual void MyClass::myFunction(int)") at qlogging.cpp:1344 - #2 qFormatLogMessage (type=QtDebugMsg, context=..., str=...) at qlogging.cpp:1452 - #3 stderr_message_handler (type=QtDebugMsg, context=..., message=...) at qlogging.cpp:1744 - #4 qDefaultMessageHandler (type=QtDebugMsg, context=..., message=...) at qlogging.cpp:1795 - #5 qt_message_print (msgType=QtDebugMsg, context=..., message=...) at qlogging.cpp:1840 - #6 qt_message_output (msgType=QtDebugMsg, context=..., message=...) at qlogging.cpp:1891 - #7 QDebug::~QDebug (this=, __in_chrg=) at qdebug.h:111 + #0 backtraceFramesForLogMessage (frameCount=0) at qlogging.cpp:1398 + #1 formatBacktraceForLogMessage (backtraceParams=..., function=0x5555555580b0 "virtual void MyClass::myFunction(int)") at qlogging.cpp:1525 + #2 qFormatLogMessage (type=QtDebugMsg, context=..., str=...) at qlogging.cpp:1637 + #3 qDefaultMessageHandler (type=QtDebugMsg, context=..., message=...) at qlogging.cpp:1992 + #4 qt_message_print (msgType=QtDebugMsg, context=..., message=...) at qlogging.cpp:2038 + #5 qt_message_output (msgType=QtDebugMsg, context=..., message=...) at qlogging.cpp:2077 + #6 QDebug::~QDebug (this=0x7fffffffd9b8, __in_chrg=) at qdebug.cpp:166 */ -static constexpr int TypicalBacktraceFrameCount = 8; +static constexpr int TypicalBacktraceFrameCount = 7; # if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) // force skipping the frame pointer, to save the backtrace() function some work @@ -1653,12 +1652,13 @@ Q_CONSTINIT static QBasicAtomicPointer