[Lldb-commits] [PATCH] D111136: [lldb] [DynamicRegisterInfo] Support iterating over Registers()

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 5 08:19:51 PDT 2021


mgorny added inline comments.


================
Comment at: lldb/include/lldb/Target/DynamicRegisterInfo.h:82
+  llvm::iterator_range<reg_collection::iterator> Registers() {
+    return llvm::iterator_range<reg_collection::iterator>(m_regs);
+  }
----------------
ted wrote:
> mgorny wrote:
> > labath wrote:
> > > Could this return const iterators? It seems we already have some non-const accessors, but I'd rather not propagate that..
> > It can't — we're using these iterators to augment register infos ;-).
> Maybe make a non-const protected, and a const public, so random plugin #37 can't modify register info?
That would work for me; however, we'd have to make `ABI` and `DynamicRegisterInfo` `friend`s then. @labath, what do you thik?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111136/new/

https://reviews.llvm.org/D111136



More information about the lldb-commits mailing list