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]

Re: [Patch] Fix for -var-update to use natural format to compare


On Mon, Jan 21, 2008 at 10:24:40PM -0500, Marc Khouzam wrote:
> This patch addresses a discussion titled "-var-update using formatted value" from
> the GDB mailing list.
> It modifies the variable object code to always uses the natural format to compare 
> old and new values for the -var-update command (one line change).
> It also renames the member print_value of varobj to natural_value.

I don't think this is an appropriate change.

-var-update is supposed to tell when the displayed value has changed.
If the value in the current format hasn't changed, there's no need to
refetch.  It's not about the underlying memory bytes, which is why we
changed to a string comparison.  There are various other ways to
change the underlying variable without updating the representation
(e.g. changes in padding bits).

I think you've explained this already - probably to me - but could you
do it once more, please: why do you want to keep track of the value in
all formats?  And if you're actually displaying them all
simultaneously to the user, why shouldn't they be independent varobjs?

-- 
Daniel Jacobowitz
CodeSourcery


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