From: Tom Tromey <tromey@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC] MI notification on register changes
Date: Mon, 05 Nov 2012 20:10:00 -0000 [thread overview]
Message-ID: <874nl3n74e.fsf@fleche.redhat.com> (raw)
In-Reply-To: <5097941F.8080604@codesourcery.com> (Yao Qi's message of "Mon, 5 Nov 2012 18:25:35 +0800")
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> I also see lval_memory on x86-64, and I am a little surprised that you
Yao> see lval_register.
[...]
Yao> and I think it is reasonable to see 'lval_memory' instead of
Yao> lval_register' here. When executing this 'set' command, the callchain
Yao> looks like,
Thanks for walking me through it.
I agree this is the intended design.
>> Second, Pedro pointed out this PR:
>> http://sourceware.org/bugzilla/show_bug.cgi?id=7574
>> ... which seems apropos. It seems that the best thing is a generic
>> "target changed" notification for the reasons mentioned there.
Yao> 'target changed' observer and 'register changed' observer serves
Yao> differently. 'target changed' observer is mostly for keeping gdb
Yao> internal states, such as regcache and frames, consistent, however,
Yao> register changed' observer is for external notifications.
Yao> AFAICS, the reason 'target changed' observer is not replaced by
Yao> memory changed' observer and 'register change' observer is that GDB
Yao> doesn't know the side effect of setting a register or a piece of
Yao> memory, so GDB conservatively uses 'target changed' observer.
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.
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.
So, in general, it seems the only safe thing for a front end is to just
refresh everything on any change.
What do you think?
Tom
next prev parent reply other threads:[~2012-11-05 20:10 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 [this message]
2012-11-06 6:05 ` Yao Qi
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=874nl3n74e.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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