This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/4] Remove some uses of iterate_over_inferiors
- From: Simon Marchi <simon dot marchi at efficios dot com>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at efficios dot com>
- Date: Wed, 15 Jan 2020 14:12:18 -0500
- Subject: [PATCH 0/4] Remove some uses of iterate_over_inferiors
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4B03323CDD8
Today, it's very easy to iterate over inferiors using a range-based for
loop combined with all_inferiors. I think it gives simpler and easier
to understand code than iterate_over_inferiors, which uses a void
pointer to pass data from the caller. I noticed that there were very
few uses of iterate_over_inferiors left, so I think we could convert
them to range-based for loop and get rid of it.
This patch series removes the uses that are in the files I can build
easily, I can take care of the rest later.
Simon Marchi (4):
gdb: remove use of iterate_over_inferiors in py-inferior.c
gdb: remove use of iterate_over_inferiors in mi/mi-interp.c
gdb: remove uses of iterate_over_inferiors in mi/mi-main.c
gdb: remove uses of iterate_over_inferiors in top.c
gdb/mi/mi-interp.c | 40 +++++++++-------------
gdb/mi/mi-main.c | 73 +++++++++++++++-------------------------
gdb/python/py-inferior.c | 24 ++++++-------
gdb/top.c | 51 +++++++++++-----------------
4 files changed, 72 insertions(+), 116 deletions(-)
--
2.25.0