Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: "Marc Khouzam" <marc.khouzam@ericsson.com>,
	"'André Pönitz'" <andre.poenitz@mathematik.tu-chemnitz.de>,
	"'Tom Tromey'" <tromey@redhat.com>,
	"'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>
Subject: Re: [RFC] MI notification on register changes
Date: Fri, 09 Nov 2012 01:47:00 -0000	[thread overview]
Message-ID: <509C60B4.60903@codesourcery.com> (raw)
In-Reply-To: <509A93C0.9020009@redhat.com>

On 11/08/2012 01:00 AM, Pedro Alves wrote:
> The issue is in the "contain the changed info" part.  In general, we don't have such
> info available.  So there are cases where trusting such fine-grained
> notifications will get you stale views.  For example, in the general case, if the
> user changes registers/memory, we can't assume that memory/registers didn't change.
> Some targets even have memory-mapped registers.   If GDB core shouldn't assume such
> things, then "registers changed" or "memory changed" notifications are in general

It sounds like a 'memory model' (it is not proper here, but that is the 
term I can think of), a single write to register or memory may cause 
different effects.

If we want to solve this problem in GDB side, we need a precise and 
accurate target description to address them below, don't we?

   1) modify register FOO will update memory area 0xN ~ 0xM, and vice versa,
   2) register BAR is read only, or at least some bits are.
   3) this target doesn't have these special hardware features,

> misleading.  We'd have to add notes like "note that even though we're saying only
> a register changed, everything else (memory, stack frame, whole stack, etc.)
> might have changed too, so you're better off refreshing all your views." which may
> be a bit silly.  We may be better off not giving ourselves and the frontends rope
> to hang ourselves with.

Supposing gdb has this precise target description, gdb doesn't have to 
refresh everything else, otherwise gdb has to conservatively update 
everything like what it does nowadays.  Do you agree?

-- 
Yao


      parent reply	other threads:[~2012-11-09  1:47 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
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 [this message]

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=509C60B4.60903@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=andre.poenitz@mathematik.tu-chemnitz.de \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=palves@redhat.com \
    --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