[Lldb-commits] [lldb] [lldb] Look up register set children by their own name too (PR #223857)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 16 00:33:59 PDT 2026


================
@@ -138,18 +138,27 @@ ValueObjectRegisterSet::LookupChildWithName(llvm::StringRef name) {
 
   // See if the register exists at all in any set.
   const RegisterInfo *reg_info = m_reg_ctx_sp->GetRegisterInfoByName(name);
-  if (!reg_info)
-    return {};
 
-  // See if this register is in this register set.
+  // See if this register is in this register set, falling back to the name as
+  // written. The generic name may alias a register in another set while this
+  // set has a register of that exact name.
+  std::optional<std::pair<size_t, const RegisterInfo *>> name_match;
+  std::optional<std::pair<size_t, const RegisterInfo *>> alt_name_match;
----------------
DavidSpickett wrote:

Do you need to track both or could you have one match object?

The only thing that cares which one is set is the return statement, that's why I suggest this.

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


More information about the lldb-commits mailing list