Re: [PATCH v5 07/15] gdb, python: use gdbarch_iterate_over_objfiles_in_search_order

Kevin Buettner via Gdb-patches
2022-06-24T17:19:23Z

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

> The implementation of gdb.lookup_objfile() iterates over all objfiles and
> compares their name or build id to the user-provided search string.
>
> This will cause problems when supporting linker namespaces as the first
> objfile in any namespace will be found. Instead, use
> gdbarch_iterate_over_objfiles_in_search_order to only consider the
> namespace of gdb.current_objfile() for the search, which defaults to the
> initial namespace when gdb.current_objfile() is None.
> ---
> gdb/python/py-objfile.c | 116 +++++++++++++++++++---------------------
> gdb/python/python.c | 7 +--
> gdb/python/python.h | 6 +++
> 3 files changed, 64 insertions(+), 65 deletions(-)

Okay.

Kevin