[PATCH 0/4] Remove some uses of iterate_over_inferiors

Simon Marchi simark@simark.ca
Thu Jan 16 22:46:00 GMT 2020


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



More information about the Gdb-patches mailing list