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]

[PATCH 00/12] Remove some ALL_* iteration macros


This series removes various ALL_* iteration macros, in favor of C++
iterators, range adapters, and ranged for loops.  I've been wanting
this for a while, because it helps a little bit with various
experiments of mine that involve changing objfile lifetime management;
Pedro's thread iterator patch prompted me to finally do this.

The main downside of removing these macros is that it involves some
reindentation; and expanding some macros to two nested loops means a
couple somewhat ugly reformattings.

On the plus side, though, this tightens the scope of iteration
variables, which is good.  And, it removes some hairy code,
particularly the ALL_OBJSECTIONS patch.

There are still a few more such macros that could be converted.  And,
I think inf_threads_iterator could be converted to use next_iterator.
I can do some of this if there's interest.

Regression tested by the buildbot.

Tom



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