Author: enrico
Date: Tue Oct 8 19:33:55 2013
New Revision: 192259
URL: http://llvm.org/viewvc/llvm-project?rev=192259&view=rev
Log:
<rdar://problem/14923930>
Constant ValueObjects should clear their description as well as their summary.
Rationale being that both can depend on deeper-than-constified data
so both are subject to changes in "unpredictable" ways
To see this consider repeatedly po'ing a persistent variable of a type whose
-description result changes at each invocation
Modified:
lldb/trunk/source/Core/ValueObject.cpp
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=192259&r1=192258&r2=192259&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Tue Oct 8 19:33:55 2013
@@ -171,13 +171,12 @@ ValueObject::UpdateValueIfNeeded (bool u
// we have an error or not
if (GetIsConstant())
{
- // if you were asked to update your formatters, but did not get a
chance to do it
- // clear your own values (this serves the purpose of faking a stop-id
for frozen
- // objects (which are regarded as constant, but could have changes
behind their backs
- // because of the frozen-pointer depth limit)
- // TODO: decouple summary from value and then remove this code
and only force-clear the summary
+ // if you are constant, things might still have changed behind your
back
+ // (e.g. you are a frozen object and things have changed deeper than
you cared to freeze-dry yourself)
+ // in this case, your value has not changed, but "computed" entries
might have, so you might now have
+ // a different summary, or a different object description. clear these
so we will recompute them
if (update_format && !did_change_formats)
- ClearUserVisibleData(eClearUserVisibleDataItemsSummary);
+ ClearUserVisibleData(eClearUserVisibleDataItemsSummary |
eClearUserVisibleDataItemsDescription);
return m_error.Success();
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits