[Lldb-commits] [PATCH] Improve ValueObject::GetValueDidChange test; Add a comment for it

Ilia K ki.stfu at gmail.com
Tue Mar 10 09:11:32 PDT 2015


Hello Jim,

I prepared a review for these changes. See http://reviews.llvm.org/D8206.

Thanks,
Ilia

On Sat, Mar 7, 2015 at 3:51 AM, <jingham at apple.com> wrote:

> Yes, that comment doesn't really explain anything, I think it will just be
> confusing.  OTOH, saying "If you call this on a newly created ValueObject,
> it will always return false" might have helped you out, and would be a
> generally useful thing to know.
>
> Jim
>
> > On Mar 6, 2015, at 4:30 PM, Ilia K <ki.stfu at gmail.com> wrote:
> >
> > Hello Jim,
> >
> >  I don't see how the "It will only be valid the second time" comments
> help anything.  ValueDidChange can only mean "is it different from the last
> time you looked at it" since we aren't actually tracking all variable
> values in the program...  So by definition, the return from ValueDidChange
> is arbitrary the first time you look at an object.
> > I assumed that ValueDidChange is tracking value since it was created.It
> isn't obvious for me when I can use GetValueDidChange. I think this comment
> will help other people that think like me.
> >
> > That might be a better comment, since it says what actually happens, if
> you think a comment is needed here.
> > If you think that it's obvious I can remove it. Now I'm familiar with
> that and I don't need them.
> >
> > Thanks,
> > Ilia
> >
> >
> > On Sat, Mar 7, 2015 at 1:53 AM, Jim Ingham <jingham at apple.com> wrote:
> > I don't see how the "It will only be valid the second time" comments
> help anything.  ValueDidChange can only mean "is it different from the last
> time you looked at it" since we aren't actually tracking all variable
> values in the program...  So by definition, the return from ValueDidChange
> is arbitrary the first time you look at an object.
> >
> > Since we have to choose something, we set it to "false" when you first
> look at a value.  That is actually the correct choice because then a UI
> that is using ValueDidChange to drive the choice to color variables that
> have changed since the last stop in this frame won't set them all to the
> changed color the first time we hit the frame - which wouldn't be very
> useful.
> >
> > That might be a better comment, since it says what actually happens, if
> you think a comment is needed here.
> >
> >
> > REPOSITORY
> >   rL LLVM
> >
> > http://reviews.llvm.org/D8103
> >
> > EMAIL PREFERENCES
> >   http://reviews.llvm.org/settings/panel/emailpreferences/
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150310/e0a02f78/attachment.html>


More information about the lldb-commits mailing list