From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6002 invoked by alias); 17 May 2002 17:51:07 -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 5969 invoked from network); 17 May 2002 17:51:05 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 17 May 2002 17:51:05 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9F2823E98; Fri, 17 May 2002 13:51:14 -0400 (EDT) Message-ID: <3CE54312.6010807@cygnus.com> Date: Fri, 17 May 2002 10:51:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc1) Gecko/20020429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Elena Zannoni , Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2cfi cleanup + new file References: <3CE50246.1050903@suse.cz> <15589.5531.423925.941457@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00732.txt.bz2 > Almost. If we decide to introduce a dwarf2read.h file (I think this > is a good idea) then we should also eliminate the extern's that are in > symfile.h. I.e.: > > /* From dwarf2read.c */ > extern int dwarf2_has_info (bfd * abfd); > extern void dwarf2_build_psymtabs (struct objfile *, int); > extern void dwarf2_build_frame_info (struct objfile *); > > The dwarf2_build_frame_info should definitely go in dwarf2cfi.h, since > it's coming from dwarf2cfi.c, not dwarf2read.c. Then we should add > the appropriate #include's to all the files that need these functions > (not too many, luckily) and update the makefile dependencies. > > As far as dwarf2read.h, below: > > #include "bfd.h" Already included by "defs.h". > #include "objfiles.h" > > Gdb is trying to get away from nested includes. These should go in the > files that include dwarf2read.h. Yes, see: http://sources.redhat.com/gdb/onlinedocs/gdbint_13.html#SEC111 There can be cases where one header includes another - for a typedef or enum. This fortunatly isn't one of them: "bfd.h" is already included by "defs.h". "objfile.h" can be replaced by ``struct objfile;''. And I've no idea where file_ptr is comming from. Nope, found it - "bfd.h". Good move. Don't forget the makefile :-) enjoy, Andrew