From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id COdsOfdBaWl2PwUAWB0awg (envelope-from ) for ; Thu, 15 Jan 2026 14:37:27 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=oJDIvuEf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DB9191E08D; Thu, 15 Jan 2026 14:37:27 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 4734A1E08D for ; Thu, 15 Jan 2026 14:37:27 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id CE09C4BA2E26 for ; Thu, 15 Jan 2026 19:37:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE09C4BA2E26 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=oJDIvuEf Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 1C7AC4BA2E1D for ; Thu, 15 Jan 2026 19:37:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C7AC4BA2E1D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C7AC4BA2E1D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768505821; cv=none; b=ShUB2SV0rbLAzNiBt1IoCsqBVg40/0TAo2X8ZBEa/w9NByksz2OdFoeNC3vH/3Ui662Wi6NHlEgcu4HelYrc2x2RQWwfHbrvxLHX8jKqYamD8W93hOKYyObxXxKTvr9gn0UhkuT3whzpXzNd1bb/5YV1CqA7FV1nG+Bg5JcVT2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768505821; c=relaxed/simple; bh=W98QPC2LRUcAhCzDNG9dTAV+l/YbYocefCQ3OvUesMM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=RMBKWftpg3anUdltSIqREDbIu3mMxb2WQqW3KhsDvqpGzFRFiV/qGFkYQE6XQmWMK9H52KcxRH2aE6zRhflsNHgSeuOa1hGQz4OWhkMmdPRnZDQWJ5MasEbU5GjIGDPAY/BDfnT23jWYOexO+MFRsfOc1EVfbhiHjRo/6weqWvI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C7AC4BA2E1D Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 60FJat56154472 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jan 2026 14:36:59 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 60FJat56154472 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1768505820; bh=ueQ8rlBNJHep1869vMMx9GuOGVp7sJPv+RK0G++y6gk=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=oJDIvuEfU15oEKibLJNFx4qkpY+uw7+a48NmZHyZyO4/V1nSQRKLSyZI9vlGM4pgL FmeeBuOwfpLqhcwWZIDYEORyYJBDxNTDDblivxOPOGxk4vE1eHzKf9R5LC+focnbsF kj2ohf6/v+2aR/Wgz0yMb40mZg1a2vQTOIiAdlcEDU86V9rIMD0H5XPqlrlHRUWu2P WmEe2POQS0ev5pYzu0D8LMEe76pvRL/iXulJuaSICBn5hd7XpV9lVRuzvfzK7YOsZ/ goO8ZuycOMGlp66IJhXSCoYXcprcPFHNsEAzShPFsPDtqzbV76GRF06gytQYyWAucy zIqv2lH7uO4fA== Received: by simark.ca (Postfix) id 3B8AE1E08D; Thu, 15 Jan 2026 14:36:55 -0500 (EST) Message-ID: Date: Thu, 15 Jan 2026 14:36:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb, gdbsupport, gdbserver: add support for printf 't' length modifier To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260112182407.622150-1-simon.marchi@polymtl.ca> <87sec6el1v.fsf@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87sec6el1v.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 15 Jan 2026 19:36:55 +0000 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 On 1/15/26 2:24 PM, Tom Tromey wrote: >>>>>> "Simon" == simon marchi writes: > > Simon> Add support for the `t` length modifier in format_pieces, which > Simon> gdb_printf ultimately uses (through ui_out::vmessage). Modify the three > Simon> users of format_pieces: gdb's printf command, gdb's ui_out::vmessage > Simon> function and gdbserver's ax_printf function. > > Thanks. > > These modifiers are one of the clearest reasons that printf should be > replaced. I think we should generally avoid them. We've already got > plongest, etc; which seem safer. See commit a1537331 (the "other > direction") but there's also commit a5adb8f3 and probably more. > > Anyway, it's ok. > Approved-By: Tom Tromey > > Tom I think the reason for plongest is more that LONGEST can vary from build to build. We could otherwise have PRILONGEST / PRIULONGEST / etc macros, just like there is PRIu64 & co. But yeah if we do a move nowadays, it would make more sense to move to std::format/{fmt}. I pushed the patch, thanks. Simon