diff options
| author | Augusto Noronha <anoronha@apple.com> | 2025-07-21 11:27:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 11:27:57 -0700 |
| commit | ce44f089ded833acde529dbf448732a486207d5f (patch) | |
| tree | 1c6cf86df15fae469eb96e728c1cfebdafe7517a /lldb/source/Target/Target.cpp | |
| parent | ac6e2ee39b34ec7ff5bed885c87e0d0bd16be835 (diff) | |
[lldb] Add an extra optional did_read_live_memory to Target::ReadMemory (#149620)
Target::ReadMemory may or may not read live memory, but whether it did
read from live memory or from the filecache is opaque to callers. Add an
extra out parameter to indicate whether live memory was read or not.
Diffstat (limited to 'lldb/source/Target/Target.cpp')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 7f569173eba2..86ae7dd29b76 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1987,8 +1987,11 @@ size_t Target::ReadMemoryFromFileCache(const Address &addr, void *dst, size_t Target::ReadMemory(const Address &addr, void *dst, size_t dst_len, Status &error, bool force_live_memory, - lldb::addr_t *load_addr_ptr) { + lldb::addr_t *load_addr_ptr, + bool *did_read_live_memory) { error.Clear(); + if (did_read_live_memory) + *did_read_live_memory = false; Address fixed_addr = addr; if (ProcessIsValid()) @@ -2086,6 +2089,8 @@ size_t Target::ReadMemory(const Address &addr, void *dst, size_t dst_len, if (bytes_read) { if (load_addr_ptr) *load_addr_ptr = load_addr; + if (did_read_live_memory) + *did_read_live_memory = true; return bytes_read; } } |
