]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Clean up iterate_over_symtabs
authorTom Tromey <tom@tromey.com>
Sun, 28 Sep 2025 04:29:24 +0000 (22:29 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 9 Oct 2025 21:32:02 +0000 (15:32 -0600)
commita736ff7d886dbcc85026264c3ce11c125a8409b2
tree515c72957da1034c499f12c97c971f5bdc2b69e7
parent7d06ed71b84985102ed3a054884f1f6accec883f
Clean up iterate_over_symtabs

After the "search via psyms" series, there's no need for
iterate_over_symtabs to first check the expanded symtabs -- the
callback will now be called for every relevant symtab, including ones
that were already expanded before the search.

Cleaning this up enables some other cleanups.  In particular,
iterate_over_some_symtabs is not needed in its current form, so here
I've renamed it, made it static, and made it search just a single
compunit symtab.

While there I cleaned up the "invert" logic in
objfile::map_symtabs_matching_filename.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30738
Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
gdb/symfile-debug.c
gdb/symtab.c
gdb/symtab.h