Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Frederic RISS <frederic.riss@st.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Greg Watson <g.watson@computer.org>,
	        Vladimir Prus <vladimir@codesourcery.com>,
	        gdb-patches@sources.redhat.com
Subject: Re: MI: frozen variable objects
Date: Thu, 16 Nov 2006 16:26:00 -0000	[thread overview]
Message-ID: <1163694319.3219.216.camel@localhost.localdomain> (raw)
In-Reply-To: <20061116155504.GA11539@nevyn.them.org>

On Thu, 2006-11-16 at 10:55 -0500, Daniel Jacobowitz wrote:
> Why should the GUI have a separate data structure for the value in a
> manipulatable form?  I suspect that some GUIs only keep it around as a
> string, for display.  Then if the user wants a radix switch, the
> easiest way is to tell GDB (-var-set-format).

[Not directly related to the varobj-freezing topic: I think that GUIs
had a better time doing exactly what you say rather than doing it in a
"I know better than the debugger"-way. I've already been quite irritated
with Eclipse doing endianness swapping by itself in its memory view.]

> > The interesting part seems to be the one that hasn't been submited yet
> > about GDB auto-freezing some values due to archtectural requirements.
> > The debugger has architectural knowledge and it shouldn't be necessary
> > to duplicate it in the GUI.
> 
> Exactly.  My original sketch for this stuff had an XML file that we
> passed from the target directly to the GUI, but that duplicates a
> certain amount of work between GDB and the GUI, and between GUIs.
> 
> > I agree with your general point though. Maybe the functionality
> > shouldn't be in the debugger, but the information should be available to
> > the GUI... through varobj properties maybe? Of course this means that
> > the GUIs have to known about and respect this information.
> 
> And what about people who actually use the command line GDB?  That was
> the argument that tipped the scales for me in favor of this approach.
> It allows the varobj mechanism to be consistent with what we want the
> GDB CLI to offer to the user.

Of course things should be consistent between frontends... but I think
that could be argument _against_ the varobj-freezing. If we take a look
at your example:

> struct regs
> {
>   int InterruptStatus;
>   int Config;
>   int ClockVal;
> } *regs;
> 
> Maybe Config is a static register, ClockVal is a continually updating
> read-only timer, and InterruptStatus is a read-sensitive value where
> reading acknowledges any reported interrupt (this is not uncommon). If
> the user does "print/x *regs", and GDB can determine that yes, regs is
> really pointing to some hardware registers that GDB knows about, it
> would be awesome for GDB to say:
> 
> $1 = { InterruptStatus = <read-sensitive>, Config = 0x8000,
>        ClockVal = 0x1212 }

The CLI doesn't use varobjs to display values. Vladimir's change
wouldn't directly help here. Maybe the framework for doing exactly that
should land first and then the UI. I suspect that if CLI is modified to
generate an output like you describe, MI would get something similar as
a side-effect, wouldn't it? 

Fred.



  reply	other threads:[~2006-11-16 16:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 12:48 Vladimir Prus
2006-11-16 13:58 ` Greg Watson
2006-11-16 15:25   ` Frederic RISS
2006-11-16 15:55     ` Daniel Jacobowitz
2006-11-16 16:26       ` Frederic RISS [this message]
2006-11-16 16:34         ` Daniel Jacobowitz
2006-11-17 15:21       ` Greg Watson
2006-11-16 18:55     ` Vladimir Prus
2006-11-16 21:36       ` Frédéric Riss
2006-11-17  6:17         ` Vladimir Prus
2006-11-17  8:54           ` Frederic RISS
2006-11-16 18:47   ` Vladimir Prus
2006-11-17 15:09     ` Greg Watson
2006-11-17 15:15       ` Daniel Jacobowitz
2006-11-17 15:26         ` Greg Watson
2006-11-17 15:33           ` Daniel Jacobowitz
2006-11-17 15:41             ` Greg Watson
2006-11-17 15:45               ` Daniel Jacobowitz
2006-11-17 18:16               ` Daniel Jacobowitz
2006-11-17 15:35         ` Greg Watson
2006-11-17 15:27       ` Vladimir Prus
2006-11-16 21:53 Nick Roberts
2006-11-16 22:00 ` Daniel Jacobowitz
2006-11-16 23:07   ` Nick Roberts
2006-11-17 15:19     ` Daniel Jacobowitz
2006-11-17 20:52       ` Nick Roberts
2006-11-17 21:05         ` Daniel Jacobowitz
2006-11-17 23:12           ` Nick Roberts
2006-11-18 11:00           ` Eli Zaretskii
2006-11-17  6:25 ` Vladimir Prus
2006-11-17 18:14 ` Daniel Jacobowitz
2006-11-18  6:59 Nick Roberts

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=1163694319.3219.216.camel@localhost.localdomain \
    --to=frederic.riss@st.com \
    --cc=drow@false.org \
    --cc=g.watson@computer.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@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