dwarf2_per_bfd::index_addrmap is only used by the mapped gdb index. It should be in mapped_gdb_index instead.
Also then find_per_cu can be simplified to call into the index object.
I ended up finding a little time to implement this after all.
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2e3b7a38930730b98e41f1393f8479488debb823 commit 2e3b7a38930730b98e41f1393f8479488debb823 Author: Tom Tromey <tromey@adacore.com> Date: Thu May 30 10:39:17 2024 -0600 Move dwarf2_per_bfd::index_addrmap to mapped_gdb_index dwarf2_per_bfd::index_addrmap is only used by the .gdb_index reader, so this field can be moved to mapped_gdb_index instead. Then, cooked_index_functions::find_per_cu can be removed in favor of a method on the index object. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31821 Approved-By: Simon Marchi <simon.marchi@efficios.com>
Fixed.