From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15719 invoked by alias); 24 Feb 2003 15:18:47 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15708 invoked from network); 24 Feb 2003 15:18:46 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 24 Feb 2003 15:18:46 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18nMGf-0005Ds-00; Mon, 24 Feb 2003 11:19:53 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18nKNQ-0006oL-00; Mon, 24 Feb 2003 10:18:44 -0500 Date: Mon, 24 Feb 2003 15:18:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: ARI `asection' and `sec_ptr' Message-ID: <20030224151844.GA26127@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb@sources.redhat.com References: <3E59BF0E.7020708@redhat.com> <20030224142459.GA24793@nevyn.them.org> <3E5A3550.7020700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E5A3550.7020700@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00514.txt.bz2 On Mon, Feb 24, 2003 at 10:08:00AM -0500, Andrew Cagney wrote: > >On Mon, Feb 24, 2003 at 01:43:26AM -0500, Andrew Cagney wrote: > > > >>Hello, > >> > >>Assuming I'm reading the code right. BFD has the declarations: > >> > >>typedef struct sec > >>{ > >> ... > >>} asection; > >>typedef struct sec *sec_ptr; > >> > >>GDB uses all three (sec_ptr, asection, struct sec) and that makes things > >>pretty confusing. Consequently, I've added asection and sec_ptr to the > >>ARI. Instead people can use `struct sec *' which is consistent with > >>GDB's other types. > > > > > >Must you? BFD makes a conscious effort to (almost always) use > >asection* in its interfaces. If you want to reduce bfd.h includes, > >solve this one in BFD too. > > Que? Where, in the above did I mention #includes? As I pointed out, I was just guessing at reasons for the preference. Apparently I was wrong. > GDB uses all three of these vis: > > asection *foo; > sec_ptr foo; > struct sec *foo; > > so unless the developer happens to know this relationship, they can miss > some vital relationships. > > GDB's preference is `struct sec' however, yes, BFD may have other > preferences. You'll note that I've already sent out a patch to clarify > the status of `struct _bfd'. Why is GDB's preference 'struct sec', and why should GDB have a preference? This is a BFD export; I believe we should use the one which BFD prefers. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer