jimingham wrote:

This looks right.  

The handling of GetAddressOf is different between the the different ValueObject 
subclasses.  It would be good to test the other major types.  Particularly 
"persistent expression results" are tricky in this regard, and it would be good 
to make sure they work.

You should be able to do that by running an expression like:

```
stop_frame.EvaluateExpression("int *$ptr = &a")
```

Then find $ptr - in Python you would use `

```
ptr_val = stop_frame.FindValues("$ptr", lldb.eValueTypeConstResult)
```

Then get its AddressOf.  Then run:

```
stop_frame.EvaluateExpression("int *$ptr = &b")
```

and  the AddressOf object you got from `$ptr` should be right just like the 
ValueObjectVariable you were using for `p`.

It would also be good to check this with ValueObjectChild by making a struct 
and making a `p` equivalent that's a member of the struct.

https://github.com/llvm/llvm-project/pull/212915
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to