[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92078)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 11:36:16 PDT 2024


================
@@ -977,35 +977,6 @@ class CommandObjectMemoryFind : public CommandObjectParsed {
   Options *GetOptions() override { return &m_option_group; }
 
 protected:
-  class ProcessMemoryIterator {
-  public:
-    ProcessMemoryIterator(ProcessSP process_sp, lldb::addr_t base)
-        : m_process_sp(process_sp), m_base_addr(base) {
-      lldbassert(process_sp.get() != nullptr);
-    }
-
-    bool IsValid() { return m_is_valid; }
-
-    uint8_t operator[](lldb::addr_t offset) {
-      if (!IsValid())
-        return 0;
-
-      uint8_t retval = 0;
-      Status error;
-      if (0 ==
-          m_process_sp->ReadMemory(m_base_addr + offset, &retval, 1, error)) {
-        m_is_valid = false;
-        return 0;
----------------
clayborg wrote:

This is efficient only because our process caches memory on its own... Otherwise reading memory 1 byte at a time would be more expensive. Not sure if we can get any speed up by reading more than one byte at a time and then using our own internal buffer.

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


More information about the lldb-commits mailing list