Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: MI: variable objects: children naming
Date: Fri, 17 Mar 2006 17:23:00 -0000	[thread overview]
Message-ID: <20060317170701.GA15128@nevyn.them.org> (raw)
In-Reply-To: <dved27$ja$1@sea.gmane.org>

On Fri, Mar 17, 2006 at 04:20:07PM +0300, Vladimir Prus wrote:
>     (gdb)
>     -var-create TMP * m
>     ^done,name="TMP",numchild="3",type="int [3]"
>     (gdb)
>     -var-list-children TMP
>     ^done,numchild="3",children=[
>         child={name="TMP.0",exp="0",numchild="0",type="int"},
>         child={name="TMP.1",exp="1",numchild="0",type="int"},
>         child={name="TMP.2",exp="2",numchild="0",type="int"}]
> 
> 
> Suppose I display this to the user as a tree. If user selects first child of
> "m" and wants to set watchpoint on it,  I need to know the full name of
> first child of "m". In C++, that would be m[0]. 
> 
> However, the information gdb prints does not allow me to compute m[0]:

Is this the only thing you need the name for, or is it useful for other
purposes in the user interface too?  (Honest question - I have no
idea.)

If watchpoints are the only reason, then you could have a variant of a
watchpoint command which took a varobj.

>   - Calling '-var-info-expression TMP.0' returns:
>         ^done,lang="C++",exp="0"
> 
> It seems like Apple version has new command -var-info-path-expression, which
> is not present in FSF version, and which supposedly will produce "m[0]".

We'd have to ask Jim for the history, but why should we do this instead
of fixing -var-info-expression?  That behavior looks pretty wrong!

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-03-17 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17 14:56 Vladimir Prus
2006-03-17 17:23 ` Daniel Jacobowitz [this message]
2006-03-17 19:42   ` Jim Ingham
2006-03-20 23:11   ` Vladimir Prus

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=20060317170701.GA15128@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /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