Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb-patches@sources.redhat.com
Subject: Re: variable objects and registers
Date: Thu, 21 Dec 2006 08:34:00 -0000	[thread overview]
Message-ID: <17802.17932.377094.90049@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200612210942.54734.ghost@cs.msu.su>

 > >  > I've settled on -var-list. I don't think 'create' clarifies much,
 > >  > and this is not user command,
 > > 
 > > Except that it doesn't just list existing variable objects but "creates"
 > > new ones.
 > 
 > I fact, I'm not sure what duplicated
 > 
 > 	-var-list --locals 
 > 
 > should do. Create afresh, or just return already created?

Thats a fair point.  It should only create new variable objects if execution
enters a new block.  That makes -var-list a reasonable name.  In the manual I
should have said "...creates variable objects for the children if they do not
already exist.".

 > > The latter is "-stack-list-locals --make-varobjs" isn't it?  Or are you
 > > talking about variables declared within compound statements?
 > 
 > Both. -stack-list-locals --make-varobjs creates variable objects for all
 > variables in a function, including in nested blocks.

Well plain "-stack-list-locals just prints those that are in scope (as does
"info locals").  How does it differentiate between variable object for
expressions with the same name? (ISTR varobj.c hashes the name of the expression
to work out where to store it).

 > I think it might be good idea for you and I to go though Apple branch
 > grepping for all "APPLE LOCAL" markers so that we know everything they've
 > added.

Apple have made extensive changes.  I might look for specific changes if I'm
pointed towards them (as for the asynchronous event loop) but I'm not going
to look at all of it.

 > > The distinction I'm making is that var_* functions and variables are for
 > > use in MI and generally live in mi_cmd_var.c while varobj_* ones may be
 > > used by Insight and live in varobj.c
 > 
 > I don't think the difference between "var" and "varobj" in function name
 > communicates what you want, and I don't think such a coding guideline makes
 > sense for future.

Looking more closely the distinction doesn't seem to exist for variable names
which are often just var for struct varobj (presumably for brevity).  As long
as there are two separate files for variable objects (because Insight only
needs one, varobj.c), it seems a harmless and mildly useful guideline for
function names to me.



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


  reply	other threads:[~2006-12-21  8:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 10:57 Nick Roberts
2006-12-19 17:59 ` Vladimir Prus
2006-12-19 21:58   ` Nick Roberts
2006-12-20 18:39     ` Vladimir Prus
2006-12-20 20:34       ` Nick Roberts
2006-12-21  1:34         ` Nick Roberts
2006-12-21  6:34           ` Vladimir Prus
2006-12-21  7:57             ` Nick Roberts
2006-12-21  8:34               ` Vladimir Prus
2006-12-30 20:26           ` Daniel Jacobowitz
2006-12-30 20:41             ` Vladimir Prus
2006-12-30 20:50               ` Daniel Jacobowitz
2006-12-30 23:05                 ` Nick Roberts
2006-12-21  6:43         ` Vladimir Prus
2006-12-21  8:34           ` Nick Roberts [this message]
     [not found]             ` <0E190425-7C4F-4C6E-B8B3-9A3FA79F6FE3@apple.com>
2006-12-21 23:30               ` Nick Roberts
     [not found]                 ` <1B6B17FA-65DE-4CE2-9BE0-20DA74780EEA@apple.com>
2006-12-22  4:47                   ` Nick Roberts
2006-12-22  6:23                     ` Vladimir Prus
2006-12-22  6:51                       ` Nick Roberts
2006-12-22  7:30                         ` Vladimir Prus
2007-01-05  9:04             ` Vladimir Prus
  -- strict thread matches above, loose matches on Subject: below --
2006-11-29 17:21 Vladimir Prus
2006-12-05 21:16 ` Daniel Jacobowitz
2006-12-06  9:25   ` Vladimir Prus
2006-12-19 22:02     ` Daniel Jacobowitz

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=17802.17932.377094.90049@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@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