[Lldb-commits] [PATCH] Fix ValueObject::GetValueDidChange; Improve test for it

Jim Ingham jingham at apple.com
Fri Mar 6 13:20:54 PST 2015

The way to understand this is since "value did change" really means "value did change since I last looked at it" you have to ask the question "what constitutes looking at something."   We have made the decision that when you make the value for a struct, you have only looked at the struct, NOT at its children.  It isn't till you poke at the children that you know what their values are - and then whether they change later on.

This is a fairly artificial definition of "when you look at a struct's children" but it is an important one, as Greg said.  If you imagine the Locals view of a debugger, which is going to show the top level view of all the locals, until the user actually chooses to disclose a struct (by some UI gesture that amounts to calling GetNumChildren & GetChildAtIndex) we don't want to pay the cost of realizing all its types, and getting all its potentially many children.

So the answers is that the "failure" you see in #1 is actually by design.  If you want to make the MI -var-update work correctly then when you hand out the variable you should get all the children internally at first.  Then it will behave as you expect it to.  But the fact that until you call GetNumChildren we don't do ANY work to fetch the children is by design, not a bug.




More information about the lldb-commits mailing list