labath added a comment. I'm wondering if this could be implemented as some kind of a separate class which you "mix" into your register context when you want to do caching. Possibly something like this:
class NRCLinux_MyArch: public NRCLinux, private RCCache::Backend { RCCache m_cache; NRCLinux_MyArch(...) : m_cache(this) {} // NRC interface ReadRegister(...) override { return m_cache.ReadRegister(...); } ... // Backend interface ReadReally(...) override { action happens here } }; That would enable individual register contexts to explicitly opt into caching, which might be cleaner in the long term, as I anticipate it will take a very long time to convert all registers contexts to the new way of doing things. ================ Comment at: lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h:25 + +#define LLDB_INVALID_REGSET UINT32_MAX + ---------------- I think using `Optional<integral>` would be better. Although, I'm not sure what are the cases where a register does not belong to any register set. ================ Comment at: lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h:64-83 + virtual Status ReadRegisterSet(uint32_t set) { + return Status("not implemented"); + } + + virtual Status WriteRegisterSet(uint32_t set) { + return Status("not implemented"); + } ---------------- I think new interfaces should use llvm::Error/Expected CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89335/new/ https://reviews.llvm.org/D89335 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits