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]: MI -var-set-format


 
>> +To know if a variable object or any of its children has changed value in any 
>> +format instead of only the current one, the variable object and all its children
>> +should be in the natural format before issuing the @code{-var-update} command.  
>
>Sorry, I don't understand what this sentence is trying to say.  What
>does it mean ``the object should be in the natural format before
>issuing the command''?  How can an object ``be'' in some format?  

You are right about that.  I should probably refer to 'display format' instead.

>And how would its format help me know that it changed its value?

This is the tricky part.  We had a loooong thread about this but writing it in
one or two sentences was not that easy.  Maybe we should use an example?
I'll explain it in plain text and when we reach an understandable text, I'll attach
a new documentation patch.

In some cases, the displayed value of a variable object may change in some, but 
not all of the possible display formats.  For example, a variable object of 
type 'double', can change natural display from 1.1 to 1.9, while its hexadecimal 
display will remain at 0x1 in both cases.  Therefore, if the variable object has
its current display format set to 'hexadecimal', the -var-update command will not
list this object, as its current display has not changed. 

If a frontend needs -var-update to list 
variable objects for which the value has changed in any format (instead of only 
listing the ones for which the current displayed value has changed), the variable 
object and all its children should have their current display format set to natural 
before issuing the -var-update command.

[We believe that] if any formatted value changes, it guarantees that the natural
format value will also change.


Marc


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