diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 1894dd3f4e5..3fd126a4b07 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -114,6 +114,7 @@ struct TracepointCaptureData }; const char tracepointCapturePropertyName[] = "GDB.TracepointCapture"; +const char notCompatibleMessage[] = "is not compatible with target architecture"; /////////////////////////////////////////////////////////////////////// // @@ -346,8 +347,13 @@ void GdbEngine::handleResponse(const QString &buff) // version and/or OS version used. if (data.startsWith("warning:")) { showMessage(data.mid(9), AppStuff); // Cut "warning: " - if (data.contains("is not compatible with target architecture")) + if (data.contains(notCompatibleMessage)) m_ignoreNextTrap = true; + } else if (data.startsWith("Error while mapping")) { + m_detectTargetIncompat = true; + } else if (m_detectTargetIncompat && data.contains(notCompatibleMessage)) { + m_detectTargetIncompat = false; + m_ignoreNextTrap = true; } m_pendingLogStreamOutput += data; diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index b0e60b934ac..cd3a21ffbde 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -130,6 +130,7 @@ private: ////////// General Interface ////////// bool m_rerunPending = false; bool m_ignoreNextTrap = false; + bool m_detectTargetIncompat = false; ////////// Gdb Output, State & Capability Handling //////////