From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VfY9EgipBGpDoDYAWB0awg (envelope-from ) for ; Wed, 13 May 2026 12:38:32 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=VJJrY10a; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 38C9E1E067; Wed, 13 May 2026 12:38:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 A507F1E067 for ; Wed, 13 May 2026 12:38:31 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B80D4BBC093 for ; Wed, 13 May 2026 16:38:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B80D4BBC093 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=VJJrY10a Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 1D1964BABF03 for ; Wed, 13 May 2026 16:37:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D1964BABF03 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1D1964BABF03 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778690274; cv=none; b=mgAvvgh3Do6sEpoC1v1UM2wiQqVAdlRXjIjvoiSaC7FrtpasHNgLSmOk0JirxAI5oMqo/1hBGApQR6ToIrO0Z7ezkoz30hMXRdlkScdUbWPHJJavVIzab1pwr3lgdTnzfE8NsFP+aPfZS+RfuoI4x9a8i2CIxe9C93TsRR5eTTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778690274; c=relaxed/simple; bh=0haDU3/J0nyXw+GnSAL8cyh16vohkxPg5f2Pt4nqHsg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pMbsllMQj73WWivtTibtuIqN4W3ezYIZUEkdFKohdQ8ZgK8fADXYH6Mym7KlQ9L58ByBYnwBhIVNwk/tQqUJBZ1yjI2aS7McK6DFKjZqFFb54JQ9YDBbh2V8loftOdmTxVVE4m14Uz1Pv5X34PeCa8zDvxgmiELWr/JaaM9ANTo= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=VJJrY10a reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D1964BABF03 Received: from eig-obgw-6005b.ext.cloudfilter.net ([10.0.30.162]) by cmsmtp with ESMTPS id NBZvw0DPEjw8YNCanwEEAt; Wed, 13 May 2026 16:37:53 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id NCaWwqVoED6ICNCabwoUnH; Wed, 13 May 2026 16:37:41 +0000 X-Authority-Analysis: v=2.4 cv=DcUXqutW c=1 sm=1 tr=0 ts=6a04a8e0 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=NGcC8JguVDcA:10 a=ItBw4LHWJt0A:10 a=1XWaLZrsAAAA:8 a=mxY81KFvBD0MVEI7yV0A:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=E4tBtnsN5cwbUuZ+mHbG5WXIaKfihOX81AnCVMLUS2Y=; b=VJJrY10aTouEy/JJ7Mc0buGszY o7lUx6q0C0CnqJagDdhNJQuKmQJMsnhP+dUpG0hs23BNoRyjjM5c6DcwaKLFa6sUGKg6Zedaej/NB LYeFGn7uCwQ4s2iBmX6IIz6in; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:45558 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wNCaU-00000002b65-1W8o; Wed, 13 May 2026 10:37:35 -0600 From: Tom Tromey To: Zander Work Cc: gdb-patches@sourceware.org, guinevere@redhat.com, tom@tromey.com Subject: Re: [PATCH v2] Use "output-radix" setting to format function offsets In-Reply-To: <20260509044543.558625-2-zdw@google.com> (Zander Work's message of "Fri, 8 May 2026 21:45:44 -0700") References: <20260509044543.558625-2-zdw@google.com> X-Attribution: Tom Date: Wed, 13 May 2026 10:37:29 -0600 Message-ID: <874ikbl0za.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wNCaU-00000002b65-1W8o X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:45558 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOjaqTJYVaVdfgDKyCVkagG8SYvNo6ftfpodUdw9b7eK4SXlm6Gw+rT7opJAXnuceaqdf3QdxbiAIZgP72QGDZYAeWer/BoqVYRrvj/r9Fvz3SNE8nY1 dPc35Eau8nXS20rSKFYbStZfCEhzxzD1I92O0jDSgPM3Zcm++5ZGenFUkZeYIFsgjk1q8dEVseGczXKvwxfGhhgxuWSEvcfc0Tg= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> Zander Work writes: > Updates since v1: [...] It's normal in gdb for the commit message to describe the purpose of the patch. > +std::string > +format_pc_offset (int offset) > +{ > + std::string sign = (offset < 0) ? "-" : "+"; > + > + std::string body = int_string (offset < 0 ? -offset : offset, output_radix, > + 0, 0, 1); I don't have any objection to this but I wanted to note that using the output radix is kind of heavy, since it affects all sorts of output. That is, I tend to think a new option would be preferable. Though, unfortunately, that would be more work since it would involve more documentation at least. Another possibility is that nobody really even wants decimal here and that using hex always would be fine. I mean -- that would be fine by me but we should see if anyone feels differently. Finally, I think print_address_symbolic should probably do the same thing, i.e., it needs an update: if (offset != 0) gdb_printf (stream, "%+d", offset); thanks, Tom