[Lldb-commits] [lldb] [lldb] Make Process::ReadMemory non-virtual (PR #217148)

via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 20 17:18:54 PDT 2026


================
@@ -1603,9 +1603,9 @@ class Process : public std::enable_shared_from_this<Process>,
   /// This function will read memory from the current process's address space
   /// and remove any traps that may have been inserted into the memory.
   ///
-  /// This function is not meant to be overridden by Process subclasses, the
-  /// subclasses should implement Process::DoReadMemory(const ProcessAddress &,
-  /// void *, size_t, Status &).
+  /// Process subclasses implement Process::DoReadMemory(const ProcessAddress &,
+  /// void *, size_t, Status &) instead of this function, and override
+  /// Process::ShouldUseMemoryCache to keep their reads out of the memory cache.
   ///
   /// \param[in] vm_addr
----------------
jimingham wrote:

This name is now wrong though you didn't do that...  Calling it a `virtual load address` rather than a ProcessAddress is a bit odd.

The only reason to mention this in this PR is that I thought you should make a distinction between the address passed to ReadMemory - which might not be "fixed" and the one to DoReadMemory - which is now always fixed.

https://github.com/llvm/llvm-project/pull/217148


More information about the lldb-commits mailing list