From: David Carlton <carlton@math.stanford.edu>
To: Keith Seitz <keiths@redhat.com>
Cc: Andrew Cagney <ac131313@redhat.com>,
"gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>,
Daniel Jacobowitz <drow@mvista.com>
Subject: Re: [RFA] varobj: call CHECK_TYPEDEF
Date: Wed, 11 Jun 2003 23:51:00 -0000 [thread overview]
Message-ID: <ro1d6hk5g4q.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <1055362509.1571.63.camel@lindt.uglyboxes.com>
On 11 Jun 2003 13:15:10 -0700, Keith Seitz <keiths@redhat.com> said:
> So where do we stand with this?
I've just gone and looked over the thread and at Keith's patch; I
think the idea is sound, but the implementation isn't. The comments
at the top of get_type say that it's supposed to skip past typedefs,
so calling CHECK_TYPEDEF certainly seems legitimate. But
CHECK_TYPEDEF calls check_typedef, which already goes through chains
of typedefs, so you can get rid of the loop in get_type. So I would
rewrite get_type as follows:
static struct type *
get_type (struct varobj *var)
{
struct type *type;
type = var->type;
if (type != NULL)
CHECK_TYPEDEF (type);
return type;
}
And I don't think you should change get_type_deref at all, but you
should change get_target_type as follows:
static struct type *
get_target_type (struct type *type)
{
if (type != NULL)
{
type = TYPE_TARGET_TYPE (type);
if (type != NULL)
CHECK_TYPEDEF (type);
}
return type;
}
(I do wonder a bit if all of those "type != NULL" checks are
necessary, but that's a separate question.)
I'm not qualified to approve these patches, but the idea seems obvious
to me.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2003-06-11 23:51 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
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 [this message]
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=ro1d6hk5g4q.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=keiths@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