Skip to content

Commit 1494033

Browse files
bulbazordsallto
authored andcommitted
[lldb][NFC] Remove unused macro ENABLE_MEMORY_CACHING (llvm#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.
1 parent 753625d commit 1494033

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lldb/source/Target/Process.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,6 @@ using namespace lldb;
8080
using namespace lldb_private;
8181
using namespace std::chrono;
8282

83-
// Comment out line below to disable memory caching, overriding the process
84-
// setting target.process.disable-memory-cache
85-
#define ENABLE_MEMORY_CACHING
86-
87-
#ifdef ENABLE_MEMORY_CACHING
88-
#define DISABLE_MEM_CACHE_DEFAULT false
89-
#else
90-
#define DISABLE_MEM_CACHE_DEFAULT true
91-
#endif
92-
9383
class ProcessOptionValueProperties
9484
: public Cloneable<ProcessOptionValueProperties, OptionValueProperties> {
9585
public:
@@ -2297,9 +2287,7 @@ size_t Process::WriteMemory(addr_t addr, const void *buf, size_t size,
22972287
if (ABISP abi_sp = GetABI())
22982288
addr = abi_sp->FixAnyAddress(addr);
22992289

2300-
#if defined(ENABLE_MEMORY_CACHING)
23012290
m_memory_cache.Flush(addr, size);
2302-
#endif
23032291

23042292
if (buf == nullptr || size == 0)
23052293
return 0;

0 commit comments

Comments
 (0)