[PATCH 0/4] Remove some uses of iterate_over_inferiors

Simon Marchi simark@simark.ca
Fri Sep 20 02:16:00 GMT 2019


On 2019-09-19 5:28 p.m., Tom Tromey wrote:
> This series removes some uses of iterate_over_inferiors in favor of
> foreach-style iteration.  I find the latter simpler both to debug and
> to read.
> 
> There are more instances of iterate_over_inferiors, and other
> iterate_over_* functions -- this series is just a starter to see
> whether others agree, so let me know what you think.
> 
> Tested on x86-64 Fedora by the buildbot.
> 
> Tom
> 
> 

Hi Tom,

This all looks good to me, I agree with the direction.

I was just wondering, why did you choose to use all_inferiors_safe in all
these cases, rather than all_inferiors?  At first sight, they don't seem
to be cases where an inferior can be deleted.  Is it maybe that it's
simpler to just use the "safe" version and there's no disadvantage to it?

Simon



More information about the Gdb-patches mailing list