Endilll wrote:

Intended usage is going to look like the following for `PointerIntPair`:
```python
class PointerIntPairProvider:
    def update(self):
        pointer_info = self.valobj.type.template_args[4] # PointerIntPairInfo
        masks = pointer_info.FindNestedType("MaskAndShiftConstants")
        if masks.IsValid():
            for enumerator in enum.enum_members:
                if enumerator.name == "PointerBitMask":
                    pointer_mask = enumerator.unsigned
                    # extract pointer using the mask
```
Fully qualified name of `PointerIntPairInfo` used in `clang::QualType` is the 
following: `llvm::PointerIntPairInfo<llvm::PointerUnion<const clang::Type*, 
const clang::ExtQuals *>, 3, 
llvm::PointerLikeTypeTraits<llvm::PointerUnion<const clang::Type *, const 
clang::ExtQuals *> > >::MaskAndShiftConstants`. I'm not sure if existing 
`SBTarget::FindFirstType()` can handle this case as well as proposed function.

I'll submit a proper API test shortly.

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

Reply via email to