From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7RFmKI1k6WTgMwsAWB0awg (envelope-from ) for ; Fri, 25 Aug 2023 22:33:49 -0400 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=HbwKYlGU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 95ACD1E0C2; Fri, 25 Aug 2023 22:33:49 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7F7F31E028 for ; Fri, 25 Aug 2023 22:33:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C227D385842E for ; Sat, 26 Aug 2023 02:33:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C227D385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693017226; bh=dMJSO5QU+4lWNMliM73t4q29tmiM1SBgTrC/RgLegXQ=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=HbwKYlGU42UjWL/4NmHj1BO+0uzOZ8l9U44LuO/HQkIYrkFqzGRTCupq/gI4ucOPt FmbPajh6sabZE9qcStONX5iMe0Vml0TN5qCvD0n5pDnL3/Rk4dA9QRcKZ7yIGyYF7Z wVO9cRdueYJsq5yWQmO6eb03yuPFrfxpASyQaKAE= 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 7E57F3858D37 for ; Sat, 26 Aug 2023 02:33:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E57F3858D37 Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-624-93-Ye96gO_-I9Xo7bP-aXw-1; Fri, 25 Aug 2023 22:33:19 -0400 X-MC-Unique: 93-Ye96gO_-I9Xo7bP-aXw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E0E6A2999B20; Sat, 26 Aug 2023 02:33:18 +0000 (UTC) Received: from f37-zws-nv (unknown [10.22.32.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1DD9C1602B; Sat, 26 Aug 2023 02:33:18 +0000 (UTC) Date: Fri, 25 Aug 2023 19:33:17 -0700 To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Use get_frame_address_in_block in print_frame Message-ID: <20230825193317.698943d7@f37-zws-nv> In-Reply-To: <20230804173635.392319-1-tom@tromey.com> References: <20230804173635.392319-1-tom@tromey.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , 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 Fri, 4 Aug 2023 11:36:35 -0600 Tom Tromey wrote: > The author of 'mold' pointed out that with a certain shared library, > gdb would fail to find the shared library's name in 'bt'. > > The function in question appeared at the end of the .so's .text > segment and ended with a call to 'abort'. > > This turned out to be a classic case of calling get_frame_pc when > get_frame_address_in_block is needed -- the former will be off-by-one > for purposes of finding the enclosing function or shared library. > > The included test fails without the patch on my system. However, I > imagine it can't be assumed to reliably fail. Nevertheless it seemed > worth doing. > > Regression tested on x86-64 Fedora 38. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29074 LGTM. Reviewed-by: Kevin Buettner