This is the mail archive of the gdb@sources.redhat.com 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: MI questions from eclipse.org


* Variable notification
  - assignment: Doing a -var-assign follow by a
    -var-update does not show any variables been change.
    Is this the behaviour?

Yes. (Didn't I get back to you on this already? I thought I had.) Any, the way varobj works, it saves a copy of GDB's internal representation for a variable. When one updates the root (-var-update), it computes a new "value" and compares against the old one.

When you assign a new value to a variable (and it succeeds), this new "value" is saved and used for subsequent comparisons (of whether anything has changed). This contrasts to how registers work, but the register stuff is wrong, IMO. :-) (This happens because MI doesn't modify its "value" for the register like varobj does.)


  - And on a more complex note, doing -data-write-memory
    to some memory and the memory was a variable object
    should -var-update notice this?

Yes. In HEAD sources it certainly does. [Aside: In mi2, this will trigger
an event telling you that something has changed. Unfortunately, we cannot tell you WHAT changed. Only that the state of the target has changed. This is necessary because there are some really goofy systems out there, like those with memory-mapped registers.]
Yes.

The upper bound on the performance is the same as single step.

Andrew



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