Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "J. Johnston" <jjohnstn@redhat.com>,
	gdb-patches@sources.redhat.com, alain@qnx.com
Subject: Re: Patch for gdb/mi problem 702
Date: Mon, 21 Oct 2002 18:40:00 -0000	[thread overview]
Message-ID: <3DB4ACA8.9080106@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0210031616490.1509-100000@valrhona.uglyboxes.com>

> On Thu, 3 Oct 2002, J. Johnston wrote:
> 
> 
>> The following fixes a problem with -var-assign whereby an assignment
>> of a new value is not seen by a subsequent -var-update.  The
>> underlying varobj_update call looks to see if there is a difference
>> between the current value and a refreshed value.  Since varobj_set_value
>> actually changes both the internal value and the actual value, varobj_update
>> does not add the variable to the changelist.
> 
> 
> The real question is: is it really necessary for an assignment to show up 
> in the udpate list. IMO, it doesn't matter, because the caller will know if 
> the assignment succeeded or failed. If it failed, it'll have an error 
> message from MI. Otherwise, it knows that it worked and all it needs to do 
> is fetch the value of this variable (to get the right display format) and
> update the displayed value on the screen. There's no reason to do an 
> update, which is not a cheap operation.
> 
> I really don't know what to make of this. I don't think this is really 
> necessary. It seems like a substitute for error checking.
> 
> Perhaps Alain can comment on why this is necessary with Eclipse?

To play the devil's devil advocate ...

Consider a memory mapped register with sticky bits (no I'm not just 
making this up, I recently got asked this exact question - I've a vague 
recollection of complaints about gdb's current behavior in this regard).

I think ``the right thing'' is:

- the expression evaluation writes the value all the way through to the 
target
- gdb invalidates everything - memory and register caches, varobj
- gdb evaluates all variable objects including that just written value.
- -var-update lists all values that changed

The result could even be that that the modified variable didn't change 
because that modified variable is truely ``stuck'' or that some of the 
modified value is restored.

So what does the MI and the patch do in this case?

Andrew



  parent reply	other threads:[~2002-10-22  1:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03 16:06 J. Johnston
2002-10-03 17:22 ` Keith Seitz
2002-10-04  9:57   ` J. Johnston
2002-10-04 10:12     ` Keith Seitz
2002-10-04 10:26       ` Alain Magloire
2002-10-04 12:26       ` J. Johnston
2002-10-04 14:35         ` Keith Seitz
2002-10-23 15:20           ` J. Johnston
2002-10-23 15:39             ` Andrew Cagney
2002-10-23 16:58               ` J. Johnston
2002-10-23 15:43             ` Andrew Cagney
2002-11-08 14:08               ` J. Johnston
2002-11-09 14:02                 ` Eli Zaretskii
2002-11-11  9:12                   ` J. Johnston
2002-10-21 18:40   ` Andrew Cagney [this message]
2002-10-22 14:54     ` J. Johnston
     [not found] <200210041725.NAA27681@node1.ott.qnx.com>
2002-10-04 10:51 ` Keith Seitz

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=3DB4ACA8.9080106@redhat.com \
    --to=ac131313@redhat.com \
    --cc=alain@qnx.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jjohnstn@redhat.com \
    --cc=keiths@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