Analyzer: Slim down AnalyzerStartParameters

* SysRoot can always be determined from kit.
* Pass around RunMode as extra parameter
  not as part of AnalyzerStartParameters.
  That's closer to the pattern used elsewhere.
* Environment was always initialized from the runconfig's
  EnvironmentAspect. The tools can do that directly.
* Provide setter for display name for cases where
  it is not equal to RunConfiguration::displayName

Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
hjk
2016-01-06 11:40:52 +01:00
parent 3120692092
commit 8150209ff7
29 changed files with 177 additions and 219 deletions

View File

@@ -30,6 +30,7 @@
****************************************************************************/
#include "memcheckengine.h"
#include "memchecktool.h"
#include "valgrindprocess.h"
#include "valgrindsettings.h"
#include "xmlprotocol/error.h"
@@ -56,8 +57,8 @@ namespace Valgrind {
namespace Internal {
MemcheckRunControl::MemcheckRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
: ValgrindRunControl(sp, runConfiguration)
RunConfiguration *runConfiguration, Core::Id runMode)
: ValgrindRunControl(sp, runConfiguration, runMode)
{
connect(&m_parser, &XmlProtocol::ThreadedParser::error,
this, &MemcheckRunControl::parserError);
@@ -135,7 +136,7 @@ QStringList MemcheckRunControl::suppressionFiles() const
MemcheckWithGdbRunControl::MemcheckWithGdbRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
: MemcheckRunControl(sp, runConfiguration)
: MemcheckRunControl(sp, runConfiguration, MEMCHECK_WITH_GDB_RUN_MODE)
{
connect(&m_runner, &Memcheck::MemcheckRunner::started,
this, &MemcheckWithGdbRunControl::startDebugger);