[gdb/symtab] Use lambda function instead of addrmap_foreach_check
authorTom de Vries <tdevries@suse.de>
Wed, 4 Aug 2021 12:29:47 +0000 (14:29 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 4 Aug 2021 12:29:47 +0000 (14:29 +0200)
commit5b3ef0a5952eaf912da343505eff9d0a29334751
treed9cd55e1760949110d1c8651126ffeed3e147e54
parentf897689c880ed1049b708e6c1f9745c8604808e3
[gdb/symtab] Use lambda function instead of addrmap_foreach_check

Use a lambda function instead of addrmap_foreach_check,
which removes the need for static variables.

Also remove unnecessary static on local var temp_obstack in test_addrmap.

gdb/ChangeLog:

2021-08-04  Tom de Vries  <tdevries@suse.de>

* addrmap.c (addrmap_foreach_check): Remove.
(array, val1, val2): Move ...
(test_addrmap): ... here.  Remove static on temp_obstack.  Use lambda
function instead of addrmap_foreach_check.
gdb/addrmap.c