This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 00/12] Remove some ALL_* iteration macros
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 25 Nov 2018 09:54:27 -0700
- Subject: [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