From 9927eb2c37213dce69487b467c696b3e59194c08 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 10 Feb 2015 10:17:46 +0200 Subject: [PATCH] Valgrind: Suppress messagebox on SIGTRAP for vgdb Change-Id: I5af3a3a67a9c9903337e0035733a74ad482ba197 Reviewed-by: hjk --- src/plugins/debugger/debuggerstartparameters.h | 4 ++++ src/plugins/debugger/gdb/gdbengine.cpp | 2 +- src/plugins/valgrind/memcheckengine.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index 6ef795a811f..3e6d6cfd82c 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -42,6 +42,7 @@ #include #include +#include namespace Debugger { @@ -156,6 +157,9 @@ public: 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 + // Used by Valgrind + QVector expectedSignals; + QStringList solibSearchPath; DebuggerStartMode startMode; DebuggerCloseMode closeMode; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 6ef3fe5e757..f1d58be4ee9 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1626,7 +1626,7 @@ void GdbEngine::handleStop2(const GdbMi &data) QByteArray meaning = data["signal-meaning"].data(); // Ignore these as they are showing up regularly when // stopping debugging. - if (name == stopSignal(sp.toolChainAbi)) { + if (name == stopSignal(sp.toolChainAbi) || sp.expectedSignals.contains(name)) { showMessage(_(name + " CONSIDERED HARMLESS. CONTINUING.")); } else { showMessage(_("HANDLING SIGNAL " + name)); diff --git a/src/plugins/valgrind/memcheckengine.cpp b/src/plugins/valgrind/memcheckengine.cpp index 145a04f88b0..d52e6ef6e9a 100644 --- a/src/plugins/valgrind/memcheckengine.cpp +++ b/src/plugins/valgrind/memcheckengine.cpp @@ -188,6 +188,7 @@ void MemcheckWithGdbRunControl::startDebugger() sp.displayName = QString::fromLatin1("VGdb %1").arg(valgrindPid); sp.remoteChannel = QString::fromLatin1("| vgdb --pid=%1").arg(valgrindPid); sp.useContinueInsteadOfRun = true; + sp.expectedSignals << "SIGTRAP"; QString errorMessage; RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, rc, &errorMessage);