From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GVK9CxvytWIofQUAWB0awg (envelope-from ) for ; Fri, 24 Jun 2022 13:19:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 222821E22C; Fri, 24 Jun 2022 13:19:23 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=R/DBw111; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9DCBF1E22A for ; Fri, 24 Jun 2022 13:19:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 354053854140 for ; Fri, 24 Jun 2022 17:19:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 354053854140 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656091161; bh=HqqeQ/ZkCHpQ8Y3j4gcxNvy+/gZ/fcnbRbc6ACFnIa4=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=R/DBw11162ehv1HiDa3f4aFAwOW+HpTX0loukdrUVa04EKYKY5mfrOaqFMABF3w2w LyHwUyboMNdOaN+JIW1N5kpCwfyfq4f3f7lI55Pm3NK016N4XbBOsVQxIRjrLYNkLN l9QiEKcMwzoNdfSOllH4Kq0ExxKL86WTqnfW5SrQ= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3D1FD385AE53 for ; Fri, 24 Jun 2022 17:19:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3D1FD385AE53 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-98-0dv_ZwmxPLSV4uUteN0KGw-1; Fri, 24 Jun 2022 13:18:57 -0400 X-MC-Unique: 0dv_ZwmxPLSV4uUteN0KGw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 53D993C0E22D; Fri, 24 Jun 2022 17:18:57 +0000 (UTC) Received: from f35-zws-1 (unknown [10.2.16.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E10901410DD8; Fri, 24 Jun 2022 17:18:56 +0000 (UTC) Date: Fri, 24 Jun 2022 10:18:55 -0700 To: Markus Metzger via Gdb-patches Subject: Re: [PATCH v5 07/15] gdb, python: use gdbarch_iterate_over_objfiles_in_search_order Message-ID: <20220624101855.5f7c6ae4@f35-zws-1> In-Reply-To: <20220602132514.957983-8-markus.t.metzger@intel.com> References: <20220602132514.957983-1-markus.t.metzger@intel.com> <20220602132514.957983-8-markus.t.metzger@intel.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, 2 Jun 2022 15:25:06 +0200 Markus Metzger via Gdb-patches 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