This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] [MI] Out-of-scope varObjects no longer trigger a var-update change


 > I believe a small bug slipped in the refactoring of varobj_update
 > interface from:
 > http://sourceware.org/ml/gdb-patches/2008-05/msg00106.html
 > 
 > From what I see, varobj that are not in scope don't get flagged
 > as changed, because nothing was being pushed on the result vector.
 > The attached patch fixes this.

I'm not sure that I see this.  If the variable goes out of scope then, as the
comment says, then value_of_root returns NULL.  But (*varp)->value is not NULL,
so install_new_value returns 1 and r.changed is set to 1 and r gets pushed onto
the result vector.

 > The MI part of the testsuite passed ok.
 > I have an test to trigger the bug, if you care to see it.

Yes, please post that.  The current testsuite covers varobjs that go out of
scope.  If it is a regression then there needs to be a test that covers this
mode of failure in any case.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]