Re: [PATCH v5 13/15] gdb, symtab: inline find_quick_global_symbol_language

Kevin Buettner via Gdb-patches
2022-06-25T00:16:33Z

On Thu, 2 Jun 2022 15:25:12 +0200
Markus Metzger via Gdb-patches <gdb-patches@sourceware.org> wrote:

> There is only one use of find_quick_global_symbol_language that calls it
> for the special symbol "main".
>
> Inline the function as it is probably not correct in the general case
> where we may have multiple instances of global symbols with the same name
> but different languages in different libraries in different linker
> namespaces.
>
> Further, change the objfiles iteration into a call to
> gdbarch_iterate_over_objfiles_in_search_order, which would only search the
> initial linker namespace, where we expect "main" to be located.

Okay.

Kevin