Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Marc Khouzam" <marc.khouzam@ericsson.com>
To: <gdb-patches@sources.redhat.com>
Subject: RE: [Patch] Fix for -var-update to use natural format to compare
Date: Tue, 22 Jan 2008 16:38:00 -0000	[thread overview]
Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA04290E4A@ecamlmw720.eamcs.ericsson.se> (raw)
In-Reply-To: <20080122150232.GA32509@caradoc.them.org>


> I think there are actually two different problems:
> 
> 1. Given single varobj that is displayed in one format, how does one
> one if the value is "really changed". The answer here is that you don't
> get to find that -- -var-update reports only changes in displayed
> value, and since changing format is fast, nothing else is needed here.

Ok.

> 2. If UI wishes to show varobj in several formats, how does it
> figure out of *any* of formats has changed. There are two possible
> solutions:
> 
>    (a) Always keep varobj (from frontnend) in natural format, and assume 
>      that if natural format changes, all values possibly change. In this
>      case, getting a value in different format will involve switching
>      to that format and then switching back.

That is what I will do.
If it is the best thing for GDB to make this a requirement for a frontend that
wants to show mutliple formats, may I suggest that it be added to the
documentation of var-update?  A short mention that "if a frontend
wants to be notified of a change in any format, it should keep the variable
object in the natural format".

Also, if GDB requires this of frontends showing mutliple formats, it would
be nice to have -var-evaluate-expression take a format as an optional
parameter.  Then, the frontend would not need to use -var-set-format
to get a different formatted value, and could keep the variable object
in the natural format at all times.

I can provide a patch if this is a supported idea.

>    (b) Allow a varobj to have a *list* formats to show. Make
>      -var-update check all formats, make -var-evaluate-expression
>      return all formats.
> 

This seems cumbersome to me and will provide superfluous information
for case 1 above.


  parent reply	other threads:[~2008-01-22 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22  3:25 Marc Khouzam
2008-01-22  3:53 ` Daniel Jacobowitz
2008-01-22 14:43   ` Marc Khouzam
2008-01-22 15:03     ` Daniel Jacobowitz
2008-01-22 15:12       ` Marc Khouzam
2008-01-22 15:35       ` Vladimir Prus
2008-01-22 16:38       ` Marc Khouzam [this message]
2008-01-22 17:50         ` Vladimir Prus
2008-01-22 17:59           ` Daniel Jacobowitz
2008-01-23  0:33     ` Nick Roberts
2008-01-23 14:41       ` Marc Khouzam

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=6D19CA8D71C89C43A057926FE0D4ADAA04290E4A@ecamlmw720.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb-patches@sources.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