From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: MI: variable objects: children naming
Date: Fri, 17 Mar 2006 14:56:00 -0000 [thread overview]
Message-ID: <dved27$ja$1@sea.gmane.org> (raw)
Hello!
I've trying to figure out if I should use variable objects in KDevelop, and
run into some issue.
Assume that 'm' is a variable of type array of something. Here's a sample
session:
(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]:
- that name is not present anywhere in the output
- I can't do it myself, because I don't know that 'm' is an
array, at least without manually parsing the 'type' field.
- 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]".
Would it be good to port it? Any other suggestiions?
- Volodya
next reply other threads:[~2006-03-17 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-17 14:56 Vladimir Prus [this message]
2006-03-17 17:23 ` Daniel Jacobowitz
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='dved27$ja$1@sea.gmane.org' \
--to=ghost@cs.msu.su \
--cc=gdb@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