[Lldb-commits] [lldb] [lldb][Minidump Parser] Implement a range data vector for minidump memory ranges (PR #136040)

Miro Bucko via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 17 11:33:57 PDT 2025


================
@@ -429,62 +429,64 @@ MinidumpParser::GetExceptionStreams() {
 
 std::optional<minidump::Range>
 MinidumpParser::FindMemoryRange(lldb::addr_t addr) {
-  Log *log = GetLog(LLDBLog::Modules);
+  if (m_memory_ranges.IsEmpty())
+    PopulateMemoryRanges();
+
+  MemoryRangeVector::Entry *entry = m_memory_ranges.FindEntryThatContains(addr);
+  if (!entry)
+    return std::nullopt;
+
+  return entry->data;
+}
 
+void MinidumpParser::PopulateMemoryRanges() {
+  Log *log = GetLog(LLDBLog::Modules);
   auto ExpectedMemory = GetMinidumpFile().getMemoryList();
----------------
mbucko wrote:

const

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


More information about the lldb-commits mailing list