[Lldb-commits] [lldb] 7365f02 - [lldb][NFC] Remove unused macro ENABLE_MEMORY_CACHING (#142231)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 11:15:43 PDT 2025
Author: Alex Langford
Date: 2025-06-02T11:15:40-07:00
New Revision: 7365f029de77321d189bf138b73ff97502bbb77d
URL: https://github.com/llvm/llvm-project/commit/7365f029de77321d189bf138b73ff97502bbb77d
DIFF: https://github.com/llvm/llvm-project/commit/7365f029de77321d189bf138b73ff97502bbb77d.diff
LOG: [lldb][NFC] Remove unused macro ENABLE_MEMORY_CACHING (#142231)
This macro does not do what is described. The only thing it actually
does control is whether or not the process's memory cache gets flushed
when writing to an address. It does not override the setting
`target.process.disable-memory-cache`.
Instead of making it work as intended, I chose to remove the macro. I
don't see much value in being able to override the setting with a
preprocessor macro.
Added:
Modified:
lldb/source/Target/Process.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index c377feec86c16..84299f5f9a775 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -80,16 +80,6 @@ using namespace lldb;
using namespace lldb_private;
using namespace std::chrono;
-// Comment out line below to disable memory caching, overriding the process
-// setting target.process.disable-memory-cache
-#define ENABLE_MEMORY_CACHING
-
-#ifdef ENABLE_MEMORY_CACHING
-#define DISABLE_MEM_CACHE_DEFAULT false
-#else
-#define DISABLE_MEM_CACHE_DEFAULT true
-#endif
-
class ProcessOptionValueProperties
: public Cloneable<ProcessOptionValueProperties, OptionValueProperties> {
public:
@@ -2297,9 +2287,7 @@ size_t Process::WriteMemory(addr_t addr, const void *buf, size_t size,
if (ABISP abi_sp = GetABI())
addr = abi_sp->FixAnyAddress(addr);
-#if defined(ENABLE_MEMORY_CACHING)
m_memory_cache.Flush(addr, size);
-#endif
if (buf == nullptr || size == 0)
return 0;
More information about the lldb-commits
mailing list