From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 5DEE4385841F for ; Fri, 25 Feb 2022 20:26:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5DEE4385841F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-GS1jAa6xNrqgPfDGlTsROQ-1; Fri, 25 Feb 2022 15:25:59 -0500 X-MC-Unique: GS1jAa6xNrqgPfDGlTsROQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8690C1006AA7; Fri, 25 Feb 2022 20:25:58 +0000 (UTC) Received: from f35-zws-1 (unknown [10.2.16.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05B1C80FE5; Fri, 25 Feb 2022 20:25:57 +0000 (UTC) Date: Fri, 25 Feb 2022 13:25:55 -0700 From: Kevin Buettner To: "Metzger, Markus T" Cc: gdb-patches@sourceware.org, "H.J. Lu" Subject: Re: [PATCH v3] Support glibc multiple namespace extension Message-ID: <20220225132555.122bd92c@f35-zws-1> In-Reply-To: References: <20220210160823.35a8508e@f35-zws-1> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 25 Feb 2022 20:26:07 -0000 On Fri, 25 Feb 2022 16:53:38 +0000 "Metzger, Markus T" wrote: > Hello Kevin, > > >This is indeed wrong and leads to > > > > if (li->l_prev != prev_lm) > > { > > warning (_("Corrupted shared library list: %s != %s"), > > paddress (target_gdbarch (), prev_lm), > > paddress (target_gdbarch (), li->l_prev)); > > return 0; > > } > > > >in svr4_read_so_list(). Assigning prev_lm to zero avoided the warning for > >the first library in another namespace. I added more test cases to detect > >this reliably. > > > >I'll try organizing SVr4 DSOs in per-namespace lists. > > That works. During testing I noticed > > Invalid cast. > warning: Probes-based dynamic linker interface failed. > Reverting to original interface. > > on dlcose(). This can also be reproduced with gdb.base/unload.exp > and upstream GDB. I have not looked into this, yet. > > This is not detected by the test system and I'm not sure whether we > actually want to consider falling back to the old interface a test fail. > The invalid cast error we probably want to detect. > > I added support for detecting this invalid cast and the corrupted > library list warning in gdb_continue_to_breakpoint. > > I still need to extend the library-list-svr4 XML to cover namespaces > before I send an updated patch. I'll be out the next week so this > will take a while. > > I currently check the XML version and put everything into a special > namespace on the GDB side. We cannot use incremental updates > this way but we're backwards compatible. The final version will > support both the new format with namespaces and incremental > updates and the old format without. This sounds like good progress! I look forward to seeing your next patch... Kevin