From 408c3a153a5541f2a2530f40f51873bb36a01c2e Mon Sep 17 00:00:00 2001 From: Hannes Domani Date: Wed, 17 Jan 2018 18:48:27 +0100 Subject: [PATCH] Valgrind: Inform about heob/dwarfstack requirements Change-Id: I86b561b474f5676568b490bdfd829f17364ea3c3 Reviewed-by: Orgad Shaneh Reviewed-by: Leena Miettinen Reviewed-by: hjk --- src/plugins/valgrind/memchecktool.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 00c49a16d6b..d007f3580fb 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -73,6 +73,7 @@ #include +#include #include #include #include @@ -792,12 +793,27 @@ void MemcheckTool::heobAction() const QString heob = QString("heob%1.exe").arg(abi.wordWidth()); const QString heobPath = dialog.path() + '/' + heob; if (!QFile::exists(heobPath)) { - const QString msg = tr("Heob: Can't find %1").arg(heob); - TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID); - TaskHub::requestPopup(); + QMessageBox::critical(Core::ICore::mainWindow(), tr("Heob"), + tr("The %1 executables must be in the appropriate location.") + .arg("Heob")); return; } + // dwarfstack + if (abi.osFlavor() == Abi::WindowsMSysFlavor) { + const QString dwarfstack = QString("dwarfstack%1.dll").arg(abi.wordWidth()); + const QString dwarfstackPath = dialog.path() + '/' + dwarfstack; + if (!QFile::exists(dwarfstackPath) + && CheckableMessageBox::doNotShowAgainInformation( + Core::ICore::mainWindow(), tr("Heob"), + tr("Heob used with MinGW projects needs the %1 DLLs for proper stacktrace resolution.") + .arg("Dwarfstack"), + ICore::settings(), "HeobDwarfstackInfo", + QDialogButtonBox::Ok | QDialogButtonBox::Cancel, + QDialogButtonBox::Ok) != QDialogButtonBox::Ok) + return; + } + // output xml file QDir wdDir(workingDirectory); const QString xmlPath = wdDir.absoluteFilePath(dialog.xmlName());