[gdbsupport] Add sequential_for_each
authorTom de Vries <tdevries@suse.de>
Thu, 14 Jul 2022 15:01:52 +0000 (17:01 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 14 Jul 2022 15:01:52 +0000 (17:01 +0200)
commit18a5766d09c262878018af26ecbada38d7262b4d
tree2f6ea5678f09fcde5ad091fe4033a2ed960082ac
parente24500cbab783d42656d3b745947c98d7d5bdd83
[gdbsupport] Add sequential_for_each

Add a sequential_for_each alongside the parallel_for_each, which can be used
as a drop-in replacement.

This can be useful when debugging multi-threading behaviour, and you want to
limit multi-threading in a fine-grained way.

Tested on x86_64-linux, by using it instead of the parallel_for_each in
dwarf2_build_psymtabs_hard.
gdbsupport/parallel-for.h