Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] Remove some uses of iterate_over_inferiors
@ 2020-01-15 19:12 Simon Marchi
  2020-01-15 19:12 ` [PATCH 4/4] gdb: remove uses of iterate_over_inferiors in top.c Simon Marchi
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Simon Marchi @ 2020-01-15 19:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-17 14:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 19:12 [PATCH 0/4] Remove some uses of iterate_over_inferiors Simon Marchi
2020-01-15 19:12 ` [PATCH 4/4] gdb: remove uses of iterate_over_inferiors in top.c Simon Marchi
2020-01-15 19:12 ` [PATCH 2/4] gdb: remove use of iterate_over_inferiors in mi/mi-interp.c Simon Marchi
2020-01-16 11:29   ` Aktemur, Tankut Baris
2020-01-16 15:31     ` Simon Marchi
2020-01-17  7:52       ` Aktemur, Tankut Baris
2020-01-17 15:14         ` Simon Marchi
2020-01-15 19:18 ` [PATCH 1/4] gdb: remove use of iterate_over_inferiors in py-inferior.c Simon Marchi
2020-01-15 19:50 ` [PATCH 3/4] gdb: remove uses of iterate_over_inferiors in mi/mi-main.c Simon Marchi
2020-01-16 16:23 ` [PATCH 0/4] Remove some uses of iterate_over_inferiors Tom Tromey
2020-01-16 22:46   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox