File indexing completed on 2024-04-28 12:23:24
0001 /* This file is part of KDevelop 0002 Copyright 2017 Anton Anikin <anton@anikin.xyz> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 General Public License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #include "memcheck_config.h" 0021 0022 #include "memcheck_tool.h" 0023 0024 namespace Valgrind 0025 { 0026 0027 MemcheckConfig::MemcheckConfig() 0028 : XmlConfig(MemcheckTool::self()->id()) 0029 { 0030 addCmdItemString(QStringLiteral("leakResolution"), m_leakResolution, QStringLiteral("high"), QStringLiteral("leak-resolution")); 0031 addCmdItemString(QStringLiteral("showLeakKinds"), m_showLeakKinds, QStringLiteral("definite,possible"), QStringLiteral("show-leak-kinds")); 0032 addCmdItemString(QStringLiteral("leakCheckHeuristics"), m_leakCheckHeuristics, QStringLiteral("all"), QStringLiteral("leak-check-heuristics")); 0033 addCmdItemString(QStringLiteral("keepStacktraces"), m_keepStacktraces, QStringLiteral("alloc-and-free"), QStringLiteral("keep-stacktraces")); 0034 0035 auto itemInt = addCmdItemInt(QStringLiteral("freelistVol"), m_freelistVol, 20000000, QStringLiteral("freelist-vol")); 0036 itemInt->setMinValue(1); 0037 itemInt->setMaxValue(200000000); 0038 0039 itemInt = addCmdItemInt(QStringLiteral("freelistBigBlocks"), m_freelistBigBlocks, 1000000, QStringLiteral("freelist-big-blocks")); 0040 itemInt->setMinValue(0); 0041 itemInt->setMaxValue(10000000); 0042 0043 addCmdItemBool(QStringLiteral("undefValueErrors"), m_undefValueErrors, true, QStringLiteral("undef-value-errors")); 0044 addCmdItemBool(QStringLiteral("showMismatchedFrees"), m_showMismatchedFrees, true, QStringLiteral("show-mismatched-frees")); 0045 addCmdItemBool(QStringLiteral("partialLoadsOk"), m_partialLoadsOk, true, QStringLiteral("partial-loads-ok")); 0046 addCmdItemBool(QStringLiteral("trackOrigins"), m_trackOrigins, false, QStringLiteral("track-origins")); 0047 addCmdItemBool(QStringLiteral("expensiveDefinednessChecks"), m_expensiveDefinednessChecks, false, QStringLiteral("expensive-definedness-checks")); 0048 } 0049 0050 }