From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC] MI notification on register changes
Date: Tue, 06 Nov 2012 06:05:00 -0000 [thread overview]
Message-ID: <5098A88B.5070005@codesourcery.com> (raw)
In-Reply-To: <874nl3n74e.fsf@fleche.redhat.com>
On 11/06/2012 04:10 AM, Tom Tromey wrote:
> I think the implication is that nearly any change can require the front
> end to need to reset everything and so trying to make gdb differentiate
> between the various events will never work out. So, gdb might as well
> emit something very generic rather than =register-changed.
>
If GDB emits a very generic notification (for register change, memory
change, etc), I am not sure how useful it is. It would be noisy to
frondend, IMO.
Do we have to emit this notification if the frontend requests to modify
data in memory? because memory change may affect some register.
> For example, a register change can affect the variable view, the memory
> view (if the register is from some more-outer frame and the user is
> viewing the stack), the backtrace view, etc.
>
> Or, a memory change can also affect any of these, including the register
> view if the changed memory happens to be where a register is stored.
>
I agree with your points.
> So, in general, it seems the only safe thing for a front end is to just
> refresh everything on any change.
>
Not really. That is true to GDB internal states update, because GDB is
not clear what is the effect of a register change or memory change. It
is safe to reset everything, as you said. However, for notifications to
external clients, such as MI front-end, I am not sure it is a good idea
to emit such notification to MI front-end "everything will be changed"
just because GDB doesn't exactly know what will happen to the inferior.
My rationale here is like this: for the gdb internal state update, false
positive (notify observers, but nothing is changed in fact) is fine and
false negative (something is changed but observers are not notified) is
not allowed. For the external notification to clients, false negative
is fine (it is a limitation of gdb, and will only happen in some corner
cases), but false positive is noisy.
--
Yao
next prev parent reply other threads:[~2012-11-06 6:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 7:24 Yao Qi
2012-11-01 0:36 ` ping: " Yao Qi
2012-11-01 20:48 ` Tom Tromey
2012-11-02 9:56 ` Yao Qi
2012-11-02 16:42 ` Tom Tromey
2012-11-05 10:26 ` Yao Qi
2012-11-05 20:10 ` Tom Tromey
2012-11-06 6:05 ` Yao Qi [this message]
2012-11-06 20:00 ` André Pönitz
2012-11-07 15:35 ` Marc Khouzam
2012-11-07 17:01 ` Pedro Alves
2012-11-07 18:18 ` Marc Khouzam
2012-11-07 18:54 ` Tom Tromey
2012-11-07 21:09 ` André Pönitz
2012-11-09 1:47 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5098A88B.5070005@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox