From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1178 invoked by alias); 2 Oct 2003 04:07:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1168 invoked from network); 2 Oct 2003 04:07:34 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 2 Oct 2003 04:07:34 -0000 Received: by zenia.home (Postfix, from userid 5433) id 950CC20766; Wed, 1 Oct 2003 23:03:07 -0500 (EST) To: Elena Zannoni Cc: David Carlton , gdb-patches@sources.redhat.com Subject: Re: [rfa] add 'parent' field to struct die_info References: <16251.4125.307628.200025@localhost.redhat.com> From: Jim Blandy Date: Thu, 02 Oct 2003 04:07:00 -0000 In-Reply-To: <16251.4125.307628.200025@localhost.redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00018.txt.bz2 Elena Zannoni writes: > May I suggest to add a comment where the structure is defined that explains > in plain English the structure/relations of the dies? How's this? 2003-10-01 Jim Blandy * dwarf2read.c (struct die_info): Doc fix. Index: gdb/dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.109 diff -c -c -F'^(' -r1.109 dwarf2read.c *** gdb/dwarf2read.c 30 Sep 2003 22:29:28 -0000 1.109 --- gdb/dwarf2read.c 2 Oct 2003 04:06:12 -0000 *************** *** 320,328 **** --- 320,335 ---- unsigned int num_attrs; /* Number of attributes */ struct attribute *attrs; /* An array of attributes */ struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ struct die_info *child; /* Its first child, if any. */ struct die_info *sibling; /* Its next sibling, if any. */ struct die_info *parent; /* Its parent, if any. */ + struct type *type; /* Cached type information */ };