[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 9 13:29:28 PDT 2024
================
@@ -33,6 +34,23 @@ class PostMortemProcess : public Process {
FileSpec GetCoreFile() const override { return m_core_file; }
protected:
+ typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange;
+ typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, FileRange>
+ VMRangeToFileOffset;
+ typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, uint32_t>
+ VMRangeToPermissions;
+
+ virtual const uint8_t *PeekMemory(lldb::addr_t low, lldb::addr_t high,
+ size_t &size) = 0;
----------------
clayborg wrote:
> It is sufficient to return an empty ArrayRef. Also, that is what all other APIs use in lldb. I will keep it the return type as llvm::ArrayRef<uint8_t> but let me know if you do want me to use std::optional.
If returning a empty `llvm::ArrayRef<uint8_t>` is enough for us to be able to fall back to `ReadMemory` then this is fine.
https://github.com/llvm/llvm-project/pull/102536
More information about the lldb-commits
mailing list