Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Yao Qi <yao@codesourcery.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: semantics of dynamic varobj
Date: Fri, 22 Nov 2013 16:37:00 -0000	[thread overview]
Message-ID: <528F8856.9030606@redhat.com> (raw)
In-Reply-To: <87eh68e7qk.fsf@fleche.redhat.com>

On 11/22/2013 04:12 PM, Tom Tromey wrote:
> Second, dynamic varobjs have different semantics than ordinary ones, so
> they are only enabled when the client requests them.  (And, clients may
> use the "python" feature to decide this, since that's the only signal
> right now that they exist.)

I no longer have the full context, but these varobjs are also
only enabled when the client requests them (a new option
to -var-create, IIRC).  That is, a regular varobj will include both
unavailable and available fields, with unavailable fields listed as
"value=<unavailable>".  For those, which fields are listed
can be determined "statically", as usual, from the debug info.  While
this new varobj lists only the available fields, skipping the
unavailable ones.

I recall doing this on top of regular varobjs first, and then
realizing they behave just like dynamic varobjs, because we have no
random access to the children, and we also want to let the frontend
know the number of children changed when we move between trace
frames, with -var-update, and ynamic varobjs also support that.
In reality, I think we would be able to implement these new
varobjs as real dynamic python varobjs, with some sort of pretty
printer that skips these unavailable fields, though we might need
some fixes to the dynamic varobj code that were done as part of
this work (also useful for python varobjs, IIRC), and also I don't
think python is aware of unavailable values yet either.  That said,
I do prefer a native implementation.

(*) - Yao, as usual, the whole rationale for that should be
in CS's internal archives.

-- 
Pedro Alves


  reply	other threads:[~2013-11-22 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 13:14 Yao Qi
2013-11-22 13:28 ` Pedro Alves
2013-11-22 16:12 ` Tom Tromey
2013-11-22 16:37   ` Pedro Alves [this message]
2013-11-22 17:01     ` Tom Tromey
2013-11-23 13:34     ` Yao Qi

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=528F8856.9030606@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=tromey@redhat.com \
    --cc=yao@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