[Lldb-commits] [lldb] [lldb] Prepare UnwindPlans for discontinuous functions (PR #127661)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 19 00:32:42 PST 2025


================
@@ -564,9 +557,8 @@ class UnwindPlan {
   }
 
 private:
-  typedef std::vector<RowSP> collection;
-  collection m_row_list;
-  AddressRange m_plan_valid_address_range;
+  std::map<lldb::addr_t, RowSP> m_rows;
----------------
labath wrote:

It won't work, since the order of entries is important. What I can imagine is constructing an unwind plan (in lower case, i.e. not  `UnwindPlan`) in a map object, and then passing that to an UnwindPlan constructor which will flatten it in. It would be a slightly larger change, but I think the result could be nice as it would essentially make an UnwindPlan immutable after construction. (I like immutable data structures, and unwind plans really must be immutable as they are cached)

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


More information about the lldb-commits mailing list