This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Behaviour of invalid varobjs
> > Are there any real situations where you would want to create a variable
> > object of a constant? If not, then, apart from ensuring that such objects
> > don't crash GDB, I don't think this is an urgent issue.
>
> That's testcase example. Replace **0 with "**some_pointer" and you have a
> real use-case.
OK, I didn't realise that. Constants and variables are treated differently:
try "-var-create - * *0" and "-var-create - * *some_pointer" when
some_pointer = 0x0.
Going back to your original e-mail:
Before I go changing code, do everybody agree that:
1. The output of -var-create should either have no "value"
field at all, or value="", as is used in some other context.
I prefer value="" as it would be consistent with the status quo.
2. The output of -var-update should not include anything.
I agree.
Also, we probably should include in_scope="false" in output of
-var-create, but I'm not quite sure.
I don't see why.
--
Nick http://www.inet.net.nz/~nickrob