================
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
                     if -count <= key < count:
                         key %= count
                         return self.sbvalue.GetChildAtIndex(key)
+                elif isinstance(key, str):
+                    if child := self.sbvalue.GetChildMemberWithName(key):
+                        return child
+                    # Support base classes, which are children but not members.
+                    for child in self.sbvalue:
+                        if child.name == key:
+                            return child
----------------
jimingham wrote:

This is fine by me, though at some point it would be convenient (and symmetric) 
to come back and add base class accessors.  My only objection to the original 
patch was that using the `child` property for member access was confusing.  
`member` is clear.

https://github.com/llvm/llvm-project/pull/118814
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to