https://github.com/labath commented:

Okay, I think I understand now.

The question is about what to do with pointer to data structures with child 
providers (e.g. `std::vector<T>*`). The original "frame var" indexed the 
pointer (meaning `v[0]` was the same as dereferencing the vector -- handy 
because "frame var" didn't allow you to insert a `(*...)` at a random point in 
the expression). The DIL implementation interpreted it as "returning the first 
element of the pointed-to vector" (essentially, transparently dereferencing the 
object). After your first version of the patch changed that to match "frame 
var", it broke the ObjC test because ObjC actually expected the transparent 
dereferencing behavior (which sort of makes sense as all ObjC objects are 
pointers). This version fixes that by taking over the ObjC special-casing code 
from the original implementation.

This kind of special casing is something we wanted to avoid, but I think it's 
acceptable for now as it is just taking over existing code. We probably ought 
to fix it at some point though.

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

Reply via email to