Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: "Marc Khouzam" <marc.khouzam@ericsson.com>
Cc: <gdb@sourceware.org>
Subject: RE: -var-update using formatted value
Date: Fri, 18 Jan 2008 01:35:00 -0000	[thread overview]
Message-ID: <18320.559.863596.871051@kahikatea.snap.net.nz> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA04290E3C@ecamlmw720.eamcs.ericsson.se>

[aside - can you please fit your messages into 80 columns]

 > I guess the problem is that GDB makes the assumption that the front-end only cares about the 
 > last value retrieved by evaluate-expression. Although this is sometimes the case, other times
 > it is not.

Previously -var-evaluate-expression was needed because values weren't displayed
when variable objects were created (-var-create now includes the value field,
-var-list-children has the --all-values option).  Given that -var-update
provides a record of all changes, I'm not sure that -var-evaluate-expression is
necessary now.

 > To solve this in GDB:
 > Since both use cases are valid (at least to me), the only way I can think to solve this is 
 > to have an extra flag to var-update.  Something like [--content-changed | --displayed-value-changed]
 > It would be a separate flag than the --no-values one.
 > The front-end could then decide which behavior it wants.  
 > It's not pretty but that is all I got.
 > I know submitting a patch is the proper thing to do, but I didn't think this idea was going
 > to be accepted easily, so I'm suggesting it first.
 > 
 > To solve this in the front-end:
 > I originally thought I could always use the natural format before doing a var-update, but it is not
 > that simple since I have to use the natural format for the root but also for all of the children 
 > of that root.  So my choices are:
 > 1- don't cache (this causes the most increase in front-end-to-GDB communication)

Generally I don't think changing the format of already retrieved values is
expensive.

You said:

    GDB itself is running on a potentially slow
    processor, with a small bandwidth connection to the front-end.

Could you expand on that scenario?

 > 2- when changing the format of a varObject and getting the value, immediately set it back to natural
 >        (this will keep all varObjects, roots and children, at natural)
 > 3- before doing a -var-update on the root, set the root AND all its children to natural
 > 4- creating a variable object for each format.  This turns out not to be efficient (if I understood
 >       correctly) because each of the five varObjects will need to be var-updated and will need to go 
 >       read the raw value in memory, instead of doing this once.
 > 
 > Solutions 2 or 3 are my best choices I believe.  But it would be nice to have GDB support this.

They're quite intrusive changes for what seems like a very specialised case.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


  parent reply	other threads:[~2008-01-18  1:35 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 15:13 Marc Khouzam
2008-01-11 17:40 ` Vladimir Prus
2008-01-11 18:31   ` Marc Khouzam
2008-01-11 19:40     ` Marc Khouzam
2008-01-11 22:26     ` Nick Roberts
2008-01-11 22:53       ` Andreas Schwab
2008-01-11 22:59         ` Daniel Jacobowitz
2008-01-11 23:40           ` Nick Roberts
2008-01-11 23:52             ` Daniel Jacobowitz
2008-01-12  3:41               ` Marc Khouzam
2008-01-12  3:49                 ` Daniel Jacobowitz
2008-01-14  2:36                   ` Marc Khouzam
2008-01-15 18:43                     ` Vladimir Prus
2008-01-15 19:36                       ` Marc Khouzam
2008-01-15 20:32                         ` Vladimir Prus
2008-01-17 14:57                           ` Marc Khouzam
2008-01-17 18:05                             ` Vladimir Prus
2008-01-18  1:35                             ` Nick Roberts [this message]
2008-01-18 15:31                               ` Marc Khouzam
2008-01-18 15:41                                 ` Daniel Jacobowitz
2008-01-18 17:17                                   ` Marc Khouzam
2008-01-18 17:53                                     ` Daniel Jacobowitz
2008-01-18 19:26                                       ` Marc Khouzam
2008-01-18 21:10                                 ` Nick Roberts
2008-01-18 22:21                                   ` Marc Khouzam
2008-01-19  0:31                                     ` Nick Roberts
2008-01-19  1:46                                       ` Marc Khouzam
2008-01-19  8:27                                         ` Nick Roberts
2008-01-19 11:17                                         ` Vladimir Prus
2008-01-21 15:47                                       ` Marc Khouzam
2008-01-21 21:44                                         ` Nick Roberts
2008-01-17 23:10                           ` Nick Roberts
2008-01-19 11:06                             ` Vladimir Prus
2008-01-19 22:02                               ` Nick Roberts
2008-01-20 10:04                                 ` Vladimir Prus
2008-01-20 20:16                                   ` Nick Roberts
2008-01-20 20:28                                     ` Vladimir Prus
2008-01-21 15:15                                       ` Marc Khouzam
2008-01-21 22:35                                         ` Nick Roberts
2008-01-29 21:20                           ` Daniel Jacobowitz
2008-02-03 22:21                             ` Nick Roberts
2008-02-04  6:15                               ` Vladimir Prus
2008-01-18  0:53                     ` Nick Roberts
2008-01-18  2:13                       ` Marc Khouzam
2008-01-18 21:00                         ` Nick Roberts
2008-01-18 22:04                           ` Marc Khouzam
2008-01-14  6:34               ` Nick Roberts
2008-01-29 21:26                 ` Daniel Jacobowitz
2008-01-29 23:49                   ` Nick Roberts
2008-01-30  0:04                     ` Daniel Jacobowitz
2008-01-30  4:25                       ` 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=18320.559.863596.871051@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb@sourceware.org \
    --cc=marc.khouzam@ericsson.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