From: Jim Blandy <jimb@redhat.com>
To: David Carlton <carlton@kealia.com>
Cc: gdb-patches@sources.redhat.com, Elena Zannoni <ezannoni@redhat.com>
Subject: Re: [rfa] add 'parent' field to struct die_info
Date: Tue, 30 Sep 2003 22:13:00 -0000 [thread overview]
Message-ID: <vt24qyund25.fsf@zenia.home> (raw)
In-Reply-To: <yf2brt2nssx.fsf@hawaii.kealia.com>
David Carlton <carlton@kealia.com> writes:
> This patch adds a 'parent' field to struct die_info. There's no way
> to get that information out of our current data structures, and it is
> necessary for nested type support: die A might reference a type die B
> via DW_AT_specification, and to correctly deal with the possibility
> that B might be a nested type, we'll have to know B's parent (if any).
> (See the thread starting in
> <http://sources.redhat.com/ml/gdb/2003-05/msg00173.html>.) I was
> going to do this as part of a big nested type patch, but I figured
> Elena was going to ask me to commit this part separately anyways. :-)
> (But I would appreciate it if you could review it quickly: it's
> simple.)
>
> While I was at it, I replaced the existing 'has_children' and 'next'
> fields by 'child' and 'sibling' fields: it seems clearer to me that
> way. The result of this is that the function 'sibling_die' isn't
> really pulling its weight any more; I left it in there for now,
> though.
Looks great --- please commit.
Adding the parent pointer is great. But I also really appreciate the
child/sibling rearrangement... the way it stands is really confusing,
and I think this is much more intuitive.
It doesn't seem to me like the 'abbrev' field of 'struct die_info' is
being used for anything very important; removing that would bring
'struct die_info' back to the size it has now.
I wonder if there isn't a clearer way to read the trees. The
read_die_and_children / read_die_and_siblings pair is harder for me to
understand than it seems like it should be. But the burden is on me
to show that there's a better way...
next prev parent reply other threads:[~2003-09-30 22:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-30 16:29 David Carlton
2003-09-30 22:13 ` Jim Blandy [this message]
2003-09-30 22:54 ` David Carlton
2003-10-01 17:24 ` Elena Zannoni
2003-10-02 4:07 ` Jim Blandy
2003-10-02 15:44 ` Elena Zannoni
2003-10-02 15:57 ` Jim Blandy
2003-10-02 16:00 ` Elena Zannoni
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=vt24qyund25.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=carlton@kealia.com \
--cc=ezannoni@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