This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] dwarf2cfi cleanup + new file
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Elena Zannoni <ezannoni at redhat dot com>,Michal Ludvig <mludvig at suse dot cz>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 17 May 2002 13:51:14 -0400
- Subject: Re: [RFA] dwarf2cfi cleanup + new file
- References: <3CE50246.1050903@suse.cz> <15589.5531.423925.941457@localhost.redhat.com>
> 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