This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] Remove some uses of iterate_over_inferiors
- From: Simon Marchi <simark at simark dot ca>
- To: Tom Tromey <tom at tromey dot com>, Simon Marchi <simon dot marchi at efficios dot com>
- Cc: gdb-patches at sourceware dot org, "Aktemur, Tankut Baris" <tankut dot baris dot aktemur at intel dot com>
- Date: Thu, 16 Jan 2020 17:31:52 -0500
- Subject: Re: [PATCH 0/4] Remove some uses of iterate_over_inferiors
- References: <20200115191222.28208-1-simon.marchi@efficios.com> <87r1zzs8qz.fsf@tromey.com>
On 2020-01-16 10:48 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> Today, it's very easy to iterate over inferiors using a range-based for
> Simon> loop combined with all_inferiors. I think it gives simpler and easier
> Simon> to understand code than iterate_over_inferiors, which uses a void
> Simon> pointer to pass data from the caller. I noticed that there were very
> Simon> few uses of iterate_over_inferiors left, so I think we could convert
> Simon> them to range-based for loop and get rid of it.
>
> I sent some patches like this a while back, but never got around to
> finishing the series, so I never checked them in.
>
> https://sourceware.org/ml/gdb-patches/2019-09/msg00381.html
>
> These all look fine to me and I think you should push them.
>
> You wrote one patch I didn't (and I think you did more in mi-main.c
> too?), and I wrote one you didn't; I'll resurrect that one and push it
> once yours are in:
>
> https://sourceware.org/ml/gdb-patches/2019-09/msg00383.html
>
> Tom
>
Wow, I had completely forgotten about it!
Your patch for target.c is no longer needed, that call has been removed by
Pedro's multi-target patch.
I can merge my series. I'll just wait for a response from Baris on my
new version of patch #2.
Simon