Valgrind: Suppress messagebox on SIGTRAP for vgdb

Change-Id: I5af3a3a67a9c9903337e0035733a74ad482ba197
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-10 10:17:46 +02:00
committed by hjk
parent d599b4b2d3
commit 9927eb2c37
3 changed files with 6 additions and 1 deletions

View File

@@ -42,6 +42,7 @@
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <QMetaType> #include <QMetaType>
#include <QVector>
namespace Debugger { namespace Debugger {
@@ -156,6 +157,9 @@ public:
bool useContinueInsteadOfRun; // if connected to a hw debugger run is not possible but continue is used bool useContinueInsteadOfRun; // if connected to a hw debugger run is not possible but continue is used
QByteArray commandsAfterConnect; // additional commands to post after connection to debug target QByteArray commandsAfterConnect; // additional commands to post after connection to debug target
// Used by Valgrind
QVector<QByteArray> expectedSignals;
QStringList solibSearchPath; QStringList solibSearchPath;
DebuggerStartMode startMode; DebuggerStartMode startMode;
DebuggerCloseMode closeMode; DebuggerCloseMode closeMode;

View File

@@ -1626,7 +1626,7 @@ void GdbEngine::handleStop2(const GdbMi &data)
QByteArray meaning = data["signal-meaning"].data(); QByteArray meaning = data["signal-meaning"].data();
// Ignore these as they are showing up regularly when // Ignore these as they are showing up regularly when
// stopping debugging. // stopping debugging.
if (name == stopSignal(sp.toolChainAbi)) { if (name == stopSignal(sp.toolChainAbi) || sp.expectedSignals.contains(name)) {
showMessage(_(name + " CONSIDERED HARMLESS. CONTINUING.")); showMessage(_(name + " CONSIDERED HARMLESS. CONTINUING."));
} else { } else {
showMessage(_("HANDLING SIGNAL " + name)); showMessage(_("HANDLING SIGNAL " + name));

View File

@@ -188,6 +188,7 @@ void MemcheckWithGdbRunControl::startDebugger()
sp.displayName = QString::fromLatin1("VGdb %1").arg(valgrindPid); sp.displayName = QString::fromLatin1("VGdb %1").arg(valgrindPid);
sp.remoteChannel = QString::fromLatin1("| vgdb --pid=%1").arg(valgrindPid); sp.remoteChannel = QString::fromLatin1("| vgdb --pid=%1").arg(valgrindPid);
sp.useContinueInsteadOfRun = true; sp.useContinueInsteadOfRun = true;
sp.expectedSignals << "SIGTRAP";
QString errorMessage; QString errorMessage;
RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, rc, &errorMessage); RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, rc, &errorMessage);