This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] Sort #includes in gdb


Pedro> ISTR that you could point the bot at some branch instead of a patch?

Tom> I don't know but I will ask Sergio when he's back.

I think it can't be done.

Pedro> No firm opinion on comments vs no comments.

Tom> For now at least, I'm sticking with "no comments" because the lack of
Tom> comment-handling in the script means that adding comments makes the
Tom> script non-idempotent.  But, idempotency is a good quality to have,
Tom> because it means the script can be re-run at any time to fix any
Tom> "regressions" that have crept in.

I thought about this some more and I went back and implemented limited
comment-scanning, to make this work.  I think this is nicer because it
provides an in-source guide to developers saying where to add a new
#include.

I've appended the relevant bits from the rewritten objfiles.c.

Let me know what you think.

Tom

#include "defs.h"
#include "objfiles.h"

/* Standard C includes.  */
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

/* Standard C++ includes.  */
#include <vector>

/* Local non-gdb includes.  */
#include "bfd.h"
#include "hashtab.h"

/* Local subdirectory includes.  */
#include "common/pathstuff.h"

/* Local includes.  */
#include "addrmap.h"
#include "arch-utils.h"
#include "bcache.h"
#include "block.h"
#include "breakpoint.h"
#include "btrace.h"
#include "complaints.h"
#include "dictionary.h"
#include "exec.h"
#include "expression.h"
#include "gdb-stabs.h"
#include "gdb_bfd.h"
#include "gdb_obstack.h"
#include "observable.h"
#include "parser-defs.h"
#include "psymtab.h"
#include "solist.h"
#include "source.h"
#include "symfile.h"
#include "symtab.h"
#include "target.h"


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