Valgrind: Add gui option "Detect self-modifying code"

Setting this option to e.g. "Everywhere Except in File-backend Mappings"
allows to 'valgrind' Qt Creator itself.

Without that option the valgrind process will die if certain code paths
are executed.

Change-Id: I8888456d324a25ce092f0b0128407adf2159f496
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Nikolai Kosjar
2013-09-06 16:33:48 +02:00
committed by hjk
parent 00de61a79c
commit 548319c523
6 changed files with 213 additions and 105 deletions

View File

@@ -64,6 +64,8 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings,
m_settings, SLOT(setValgrindExecutable(QString)));
connect(m_settings, SIGNAL(valgrindExecutableChanged(QString)),
m_ui->valgrindExeChooser, SLOT(setPath(QString)));
connect(m_ui->smcDetectionComboBox, SIGNAL(currentIndexChanged(int)),
m_settings, SLOT(setSelfModifyingCodeDetection(int)));
if (Utils::HostOsInfo::isWindowsHost()) {
// FIXME: On Window we know that we don't have a local valgrind
@@ -158,6 +160,7 @@ ValgrindConfigWidget::~ValgrindConfigWidget()
void ValgrindConfigWidget::updateUi()
{
m_ui->valgrindExeChooser->setPath(m_settings->valgrindExecutable());
m_ui->smcDetectionComboBox->setCurrentIndex(m_settings->selfModifyingCodeDetection());
m_ui->enableCacheSim->setChecked(m_settings->enableCacheSim());
m_ui->enableBranchSim->setChecked(m_settings->enableBranchSim());
m_ui->collectSystime->setChecked(m_settings->collectSystime());