aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/cdb
diff options
context:
space:
mode:
authorAndrii Semkiv <[email protected]>2024-12-04 15:26:07 +0100
committerAndrii Semkiv <[email protected]>2024-12-10 08:08:51 +0000
commit65a3e484a905bf3fbac86784dd20ec421fbb401d (patch)
treeb57536e81ed50ac78f2929cb14283aa0aa11b188 /src/plugins/debugger/cdb
parent997c4b64d2b054a53668f7e15a6c10b068ecaa9a (diff)
Debugger: Add an option to control heap debugging
Added a checkbox (temporarily) in CDB settings page that toggles the heap debugging on Windows. Although it is "technically" a CDB option, it woks with LLDB on Windows as well. The default behavior is to keep the heap debugging off. The checkbox can still be overridden by the environment variable. Fixes: QTCREATORBUG-32102 Change-Id: I580cd0d66da38776f3a51632ede6b5f60d4d4cfd Reviewed-by: hjk <[email protected]> Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/debugger/cdb')
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 16aab0c920c..0dc2d321613 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -406,6 +406,10 @@ void CdbEngine::setupEngine()
if (!oldCdbExtensionPath.isEmpty())
inferiorEnvironment.appendOrSet(cdbExtensionPathVariableC, oldCdbExtensionPath);
+ if (!inferiorEnvironment.hasKey(Debugger::Constants::NO_DEBUG_HEAP)) {
+ const QString value = s.enableHeapDebugging() ? "0" : "1";
+ inferiorEnvironment.set(Debugger::Constants::NO_DEBUG_HEAP, value);
+ }
m_process.setEnvironment(inferiorEnvironment);
if (!sp.inferior.workingDirectory.isEmpty())
m_process.setWorkingDirectory(sp.inferior.workingDirectory);
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index ef3586e61b6..1cf5a2a2855 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -171,6 +171,7 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
m_breakEventWidget->setBreakEvents(settings().cdbBreakEvents());
+ // clang-format off
Column {
Row {
Group {
@@ -188,7 +189,8 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
s.ignoreFirstChanceAccessViolation,
s.cdbBreakOnCrtDbgReport,
s.cdbBreakPointCorrection,
- s.cdbUsePythonDumper
+ s.cdbUsePythonDumper,
+ s.enableHeapDebugging
}
}
},
@@ -209,6 +211,7 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
st
}.attachTo(this);
+ // clang-format on
}
void CdbOptionsPageWidget::apply()