Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Document fixed/floating variable objects and thread-id.
Date: Wed, 23 Apr 2008 18:00:00 -0000	[thread overview]
Message-ID: <u7ieoa2gw.fsf@gnu.org> (raw)
In-Reply-To: <E1JocB1-0001XW-Eh@zigzag.lvk.cs.msu.su>

> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Wed, 23 Apr 2008 14:26:14 +0400
> 
> > void foo (int i)
> > {
> > ...
> > }
> > 
> > void bar (int i)
> > {
> > ...
> > }
> > 
> > 
> > If you create a fixed varobj in 'bar', then each time you updating, new value of
> > bar's i will be read. If you create a floating varobj in 'bar', then if you update
> > it while still in bar, new value of bar's i will be read. If you update it in foo,
> > then the value of foo's i will be used.
> > 
> > So while for fixed varobj's update fetches new value of 'i', for floating varobjs
> > we also decide which 'i' to use each time.
> 
> Eli,
> does the above make the code behaviour clear enough for you to suggest better doc
> working, or you want something else clarified?

Sorry, I somehow was certain I replied to you back then, but I see now
that I didn't.

More to the point, I cannot say that I have a clear understanding of
the issue.  In what other situations will fixed and floating varobjs
behave differently?  Are we talking about any situation where
identically named variables have different binding to memory
addresses, depending on scope and context?  Like, for example,
identically named members of different C++ classes?  Or are we talking
about something else?

Also, why does such behavior make sense?  That is, why would I want an
object whose value depends on semi-random factors?  E.g., if the
inferior stopped at a watchpoint, the context is unpredictable, and
then so is the value of a floating varobj, if I understand you
correctly.  How is this helpful?


  reply	other threads:[~2008-04-23 17:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  9:32 Vladimir Prus
2008-04-04 11:47 ` Eli Zaretskii
2008-04-09 13:49   ` Vladimir Prus
2008-04-09 15:21     ` Eli Zaretskii
2008-04-09 17:06       ` Vladimir Prus
2008-04-09 18:04         ` Eli Zaretskii
2008-04-09 20:37           ` Vladimir Prus
2008-04-09 21:25             ` Eli Zaretskii
2008-04-09 22:17               ` Vladimir Prus
2008-04-23 11:52                 ` Vladimir Prus
2008-04-23 18:00                   ` Eli Zaretskii [this message]
2008-04-26 17:44                     ` Vladimir Prus
2008-04-26 18:45                       ` Eli Zaretskii
2008-04-04 13:08 ` Daniel Jacobowitz
2008-04-04 13:44 ` Pedro Alves

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=u7ieoa2gw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=vladimir@codesourcery.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