This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[Patch] [MI] Out-of-scope varObjects no longer trigger a var-update change
- From: nickrob at snap dot net dot nz (Nick Roberts)
- To: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sat, 2 May 2009 00:00:03 +1200
- Subject: [Patch] [MI] Out-of-scope varObjects no longer trigger a var-update change
- References: <6D19CA8D71C89C43A057926FE0D4ADAA0759C401@ecamlmw720.eamcs.ericsson.se>
> 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