forked from qt-creator/qt-creator
GDB: Ignore initial SIGTRAP when debugging mingw32 with gdb64
Task-number: QTCREATORBUG-26208 Change-Id: I97e37b6aaca19f20081750de003b012c9853a80c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
9032c7741a
commit
7e362326fe
@@ -365,8 +365,11 @@ void GdbEngine::handleResponse(const QString &buff)
|
|||||||
QString data = parser.readCString();
|
QString data = parser.readCString();
|
||||||
// On Windows, the contents seem to depend on the debugger
|
// On Windows, the contents seem to depend on the debugger
|
||||||
// version and/or OS version used.
|
// version and/or OS version used.
|
||||||
if (data.startsWith("warning:"))
|
if (data.startsWith("warning:")) {
|
||||||
showMessage(data.mid(9), AppStuff); // Cut "warning: "
|
showMessage(data.mid(9), AppStuff); // Cut "warning: "
|
||||||
|
if (data.contains("is not compatible with target architecture"))
|
||||||
|
m_ignoreNextTrap = true;
|
||||||
|
}
|
||||||
|
|
||||||
m_pendingLogStreamOutput += data;
|
m_pendingLogStreamOutput += data;
|
||||||
|
|
||||||
@@ -1266,11 +1269,12 @@ void GdbEngine::handleStop1(const GdbMi &data)
|
|||||||
// The bandaid here has the problem that it breaks for 'next' over a
|
// The bandaid here has the problem that it breaks for 'next' over a
|
||||||
// statement that indirectly loads shared libraries
|
// statement that indirectly loads shared libraries
|
||||||
// 6.1.2010: Breaks interrupting inferiors, disabled:
|
// 6.1.2010: Breaks interrupting inferiors, disabled:
|
||||||
// if (reason == "signal-received"
|
if (m_ignoreNextTrap && reason == "signal-received"
|
||||||
// && data.findChild("signal-name").data() == "SIGTRAP") {
|
&& data["signal-name"].data() == "SIGTRAP") {
|
||||||
// continueInferiorInternal();
|
m_ignoreNextTrap = false;
|
||||||
// return;
|
continueInferiorInternal();
|
||||||
// }
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Jump over well-known frames.
|
// Jump over well-known frames.
|
||||||
static int stepCounter = 0;
|
static int stepCounter = 0;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ private: ////////// General Interface //////////
|
|||||||
int m_nonDiscardableCount = 0;
|
int m_nonDiscardableCount = 0;
|
||||||
|
|
||||||
bool m_rerunPending = false;
|
bool m_rerunPending = false;
|
||||||
|
bool m_ignoreNextTrap = false;
|
||||||
|
|
||||||
////////// Gdb Output, State & Capability Handling //////////
|
////////// Gdb Output, State & Capability Handling //////////
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user