aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
authorEmre Kultursay <emrekultursay@google.com>2020-04-20 16:17:17 +0200
committerPavel Labath <pavel@labath.sk>2020-04-20 16:24:25 +0200
commitacae69d08c88b701e25318f8d4100f5542c44407 (patch)
tree7dac23e47ffafb1dadf06f9de3c7b895daacd976 /lldb/source/API/SBDebugger.cpp
parent9cd9f3f1b8b7bfd30f7140c4c0006be5cead3e9a (diff)
downloadllvm-acae69d08c88b701e25318f8d4100f5542c44407.zip
llvm-acae69d08c88b701e25318f8d4100f5542c44407.tar.gz
llvm-acae69d08c88b701e25318f8d4100f5542c44407.tar.bz2
[lldb] Add new LLDB setting: use-source-cache
Summary: LLDB memory-maps large source files, and at the same time, caches all source files in the Source Cache. On Windows, memory-mapped source files are not writeable, causing bad user experience in IDEs (such as errors when saving edited files). IDEs should have the ability to disable the Source Cache at LLDB startup, so that users can edit source files while debugging. Bug: llvm.org/PR45310 Reviewers: labath, JDevlieghere, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D76804
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 1aeb5e2..414d85e 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -1374,6 +1374,18 @@ bool SBDebugger::GetUseColor() const {
return (m_opaque_sp ? m_opaque_sp->GetUseColor() : false);
}
+bool SBDebugger::SetUseSourceCache(bool value) {
+ LLDB_RECORD_METHOD(bool, SBDebugger, SetUseSourceCache, (bool), value);
+
+ return (m_opaque_sp ? m_opaque_sp->SetUseSourceCache(value) : false);
+}
+
+bool SBDebugger::GetUseSourceCache() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, GetUseSourceCache);
+
+ return (m_opaque_sp ? m_opaque_sp->GetUseSourceCache() : false);
+}
+
bool SBDebugger::GetDescription(SBStream &description) {
LLDB_RECORD_METHOD(bool, SBDebugger, GetDescription, (lldb::SBStream &),
description);