This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] dwarf2cfi cleanup + new file



> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]