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 0/4] Remove some uses of iterate_over_inferiors


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


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