From: Keith Seitz <keiths@redhat.com>
To: "gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] varobj: call CHECK_TYPEDEF
Date: Thu, 24 Apr 2003 21:51:00 -0000 [thread overview]
Message-ID: <1051217215.1538.62.camel@lindt.uglyboxes.com> (raw)
In-Reply-To: <20030424201853.GA5398@nevyn.them.org>
On Thu, 2003-04-24 at 13:18, Daniel Jacobowitz wrote:
> CHECK_TYPEDEF does just about what the name suggests - it replaces a
> TYPE_CODE_TYPEDEF type with the type (TYPE_CODE_STRUCT in this case)
> that it points to. Feel free to add a comment to that effect.
Ah! Duh! :-)
> The question is whether the caller of get_type ever wants the typedef;
> depending on how it's used these calls may belong in particular
> callers, not in get_type.
Hmm. Ok, well I would think that varobj would not want the typedef. For
example, if we have, "typedef struct foo Bar" and I declare a variable
of type Bar, varobj should report the number of children as the number
of children of the struct itself, not the typedef. get_type and
get_target_type already explicitly bypass TYPE_CODE_TYPEDEF.
Now the real ambiguity is: where to put this in varobj's case? Since
get_type (and consequently get_target_type and get_type_deref) are used
all over the place, so we would want to use CHECK_TYPEDEF there. But how
to not call it when not necessary? In the case I'm currently working on,
the TYPE_CODE (type) is TYPE_CODE_PTR and TYPE_CODE (TYPE_TARGET_TYPE
(type)) is TYPE_CODE_STRUCT. Perhaps there is something else I'm
missing? (Of course, this is still how whatis_command does it...)
??
Keith
next prev parent reply other threads:[~2003-04-24 20:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-24 20:47 Keith Seitz
2003-04-24 20:52 ` Daniel Jacobowitz
2003-04-24 21:51 ` Keith Seitz [this message]
2003-04-24 21:55 ` Daniel Jacobowitz
2003-04-24 22:18 ` Keith Seitz
[not found] ` <3EA84A9B.5020308@redhat.com>
2003-04-24 22:27 ` Keith Seitz
2003-04-24 22:31 ` Andrew Cagney
2003-04-25 0:18 ` Keith Seitz
2003-04-25 2:15 ` Daniel Jacobowitz
2003-04-25 3:47 ` Andrew Cagney
2003-04-25 5:32 ` Daniel Jacobowitz
2003-06-11 20:07 ` Keith Seitz
2003-06-11 21:01 ` Andrew Cagney
2003-06-11 23:51 ` David Carlton
2003-06-12 0:28 ` Keith Seitz
2003-06-12 1:28 ` Daniel Jacobowitz
2003-06-19 19:28 ` Daniel Jacobowitz
2003-06-19 19:53 ` Daniel Jacobowitz
2003-06-19 20:33 ` Keith Seitz
2003-06-19 20:43 ` Daniel Jacobowitz
2003-06-19 21:30 ` Keith Seitz
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=1051217215.1538.62.camel@lindt.uglyboxes.com \
--to=keiths@redhat.com \
--cc=gdb-patches@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