Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sources.redhat.com
Subject: Re: RFC: MI - Detecting change of string contents with variable objects
Date: Thu, 04 Jan 2007 20:50:00 -0000	[thread overview]
Message-ID: <20070104205039.GH24634@nevyn.them.org> (raw)
In-Reply-To: <17821.25837.573239.858406@kahikatea.snap.net.nz>

On Fri, Jan 05, 2007 at 09:34:53AM +1300, Nick Roberts wrote:
>  > Otherwise the patch seems fine, if it tests OK, but I'm still a little
>  > nervous about it.  For example, you'll call val_print on a struct
>  > or array to see if it's changed.  Depending on things like "set print
>  > elements", that might not print out the whole string.  This is
>  > probably a behavior change.  Is it a harmless one?  If it is, then
>  > should we be sharing the code with c_value_of_variable that avoids
>  > printing structs, unions, and arrays, and never mark them as changed
>  > unless their types change?
> 
> The function val_print is already used for -var-evaluate-expression.

Not in the case I was talking about.  -var-evaluate-expression calls
varobj_get_value, which calls c_value_of_variable, and will return
"{...}" for a struct.  Won't it?

> AFAICS "set print elements" has no effect on variable objects,
> perhaps because val_print is only called on the leaves but I can see
> that using it might expose MI to the vagaries of CLI.  Currently,
> however, string changes don't get reported at all, without the user
> changing configuration values.

"set print elements" will affect the output of character pointers, but
that's not really what I'm worried about - you're now going to print
out most of an array or struct when comparing print_value.

1. Can always set print_value to what c_value_of_variable would return?

2. Currently I believe we will mark an array varobj as updated in
-var-update if any of its children change.  I'm not sure if we'll do
that any more after your patch, e.g. if something beyond the limit of
"set print elements" changes.  So, do you think any front end relies on
the parent being marked updated if any of its children are?  Vlad,
any opinion?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-01-04 20:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18  2:42 Nick Roberts
2006-12-18  7:01 ` Vladimir Prus
2006-12-18  8:15   ` Nick Roberts
2006-12-18  8:36     ` Vladimir Prus
2006-12-18 13:38       ` Daniel Jacobowitz
2006-12-18 21:57         ` Nick Roberts
2006-12-21 15:25           ` Vladimir Prus
2006-12-21 22:28             ` Nick Roberts
2006-12-22  6:16               ` Vladimir Prus
2006-12-22  7:16                 ` Nick Roberts
2006-12-22  7:23                   ` Vladimir Prus
2007-01-03 22:46           ` Daniel Jacobowitz
2007-01-04  4:13             ` Nick Roberts
2007-01-04  4:20               ` Daniel Jacobowitz
2007-01-04  6:10                 ` Nick Roberts
2007-01-04 19:40                   ` Daniel Jacobowitz
2007-01-04 20:35                     ` Nick Roberts
2007-01-04 20:50                       ` Daniel Jacobowitz [this message]
2007-01-04 21:00                         ` Vladimir Prus
2007-01-05  4:46                           ` Nick Roberts
2007-01-05 14:49                             ` Daniel Jacobowitz
2007-01-05 21:54                               ` Nick Roberts
2007-01-06  7:07                                 ` Vladimir Prus
2007-01-08 15:51                                 ` Daniel Jacobowitz
2007-01-08 21:30                                   ` Nick Roberts
2007-01-08 21:41                                     ` Daniel Jacobowitz
2007-01-04 20:57                       ` Vladimir Prus
2007-01-05  2:26                         ` Nick Roberts
2007-01-04 21:05                   ` Vladimir Prus
2007-01-05  1:09                     ` Nick Roberts
2007-01-05 14:44                       ` Daniel Jacobowitz
2007-01-05 14:49                         ` Vladimir Prus
2007-01-05 16:04                       ` Jim Blandy

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=20070104205039.GH24634@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=nickrob@snap.net.nz \
    /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