This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch] Fix for -var-update to use natural format to compare
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: "Daniel Jacobowitz" <drow at false dot org>
- Cc: <gdb-patches at sources dot redhat dot com>
- Date: Tue, 22 Jan 2008 10:11:37 -0500
- Subject: RE: [Patch] Fix for -var-update to use natural format to compare
> That's what happens when the thread goes on too long :-)
I try to keep my responses short, but somehow I always get carried away :-)
> We could check in all supported formats; check in the natural format;
> or go back to checking the underlying bytes. Checking in the natural
> format is appealing because it's efficient. But does the natural
> format always capture changes in any of the other formats?
I didn't find an example where checking the natural format would not work.
But that may not mean much :-)
Boolean could have been a problem (0x1, 0x2, 0x3 etc are all "true" in natural),
but it seems that for now, GDB always shows 0x1 for true.
A safer way may be to have GDB check for content difference, as it used to do
before and to also check the natural printed format for the case of char*
(to detect a change from "GDB" to "GNU").
Marc