before fetching the type or value from an SBValue.
Won’t that make me unable to get the dynamic type afterwrds? The type seems to be cached
Not at the SBValue level
The way this works is that you set the SBValue not to prefer the dynamic value - that changes the underlying ValueObject that we ask questions of from the dynamic value to the static value
When you flip the setting, we’ll try asking the dynamic value instead of the static one
Refer to ValueImpl in SBValue.cpp to see how this works
As long as the variable we're printing remains in scope, you should be able to change your mind about what you want to fetch and we'll refresh the object. You can see this for instance in the Script interpreter:
Once the value is no longer alive in the target (e.g. it was a local and you stepped out of that local's frame) then we won't be able to fetch any more information about it and you're stuck with what you asked for.