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: -var-update using formatted value


Marc Khouzam wrote:

> 
> Nick wrote:
> 
>> "-var-update --all-values" returns the value in hex so currently I don't
>> think you need it in the output of "-var-set-format".
> 
> Can I get a clarification on what var-update is -really- supposed to do?
> 
> I say var-update should show changes when they occur on the target
> and that var-update should only be used once per varObject when a program
> stops.
> 
> You say var-update should show changes when they affect the display,
> independently of if they were caused by a content change in the target or
> a format change in GDB. In that case, var-update is used multiple times
> without the program having stepped.
> 
> What is var-update really meant to do?

I probably need to start with some background -- if that sound obvious,
just skip it. There are two important point of interactions between frontend
and GDB. First is updating all of UI state after stop. This means passing
really lots of information, so ideally (and MI is not there yet), we want
gdb to basically report to frontend, in one big response, everything that frontend
cares about that might have changed -- changes in values of variables, variables than
went into scope and left it, new threads, everything.
Second interaction point is explicit user command -- like evaluating a given
expression, setting a breakpoint, or changing variable format. The amount of data
here is limited, and we don't need to optimize this very hard.

So, -var-update reports to frontend all variables that have changed since
last resume. You can query each variable individually, but you might have 100
variables easily, and that will really get slow.

Does this make sense?

- Volodya





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