[Lldb-commits] [lldb] [LLDB][SBSaveCore] Add selectable memory regions to SBSaveCore (PR #105442)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 22 10:53:02 PDT 2024


================
@@ -101,6 +103,18 @@ bool SaveCoreOptions::ShouldThreadBeSaved(lldb::tid_t tid) const {
   return m_threads_to_save.count(tid) > 0;
 }
 
+bool SaveCoreOptions::HasSpecifiedThreads() const {
+  return !m_threads_to_save.empty();
+}
+
+void SaveCoreOptions::AddMemoryRegionToSave(const lldb_private::MemoryRegionInfo &region) {
+  m_regions_to_save.Insert(region.GetRange(), /*combine=*/true);
+}
+
+const MemoryRanges &SaveCoreOptions::GetCoreFileMemoryRanges() const {
----------------
clayborg wrote:

Do we want a `SaveCoreOptions::FinalizeMemoryRanges()` method to break the ranges up by permission boundaries?

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


More information about the lldb-commits mailing list