This is the mail archive of the gdb@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: Re: -var-update using formatted value


> Why do you need "is it really changed" query?

I'm working on the Eclipse front-end to GDB for DSDP/DSF.
It offers the ability to optionally show all formats of a variable object (binary, decimal, etc)
To do this, we use -var-set-format.  And to avoid having to repeatedly query GDB for all formatted
values of a varObject, we buffer all of them in the frontend.  We only query for those values again
if the varObject has changed.

The problem is that when it is time to do a -var-update (when the program stops), the varObject may not
be set to the same format as at the time of the previous var-update.  And in that case,
-var-update will indicate a change in the value, which will cause the front-end to unnecessarily
clear its value-cache, and ask GDB again for each value.

What I originally thought was that -var-udpate will notify the front-end if the value 'really' changed.
But since it is not the case, to work around it, I do a var-set-format to natural before each var-update.  
But it seems like a bit of a hack.

I was trying to understand why the new behaviour for var-udpate, but I haven't figured out why
a front-end would benefit from having -var-update indicate that
a variable object has changed if only its printed value is different but not its actual content.

Thanks

Marc



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