From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xDboNGl1b2kifwwAWB0awg (envelope-from ) for ; Tue, 20 Jan 2026 07:30:33 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GRAcnhXn; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C70B11E08D; Tue, 20 Jan 2026 07:30:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,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 012141E08D for ; Tue, 20 Jan 2026 07:30:32 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 6C6C34BA9003 for ; Tue, 20 Jan 2026 12:30:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C6C34BA9003 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GRAcnhXn Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id DD3714BA2E06 for ; Tue, 20 Jan 2026 12:30:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD3714BA2E06 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD3714BA2E06 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768912205; cv=none; b=GA1jnpzd2MxeG90xR5eZLECczevW0eMvGeiabcLURgs8VYCnbYhJdtbfeMROrf5wNDwA9ceDsGWmFxPlcX3sn2gjDVvj60HnT4yBAPtPrl1wzSjIYO01ql6VsY0DTvuVmk/E0mjzWU1sj33S7pKIGnIVzZP4HlmM1/h0GQeO+Go= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768912205; c=relaxed/simple; bh=5ju1nBefMdIc1vnkwU+tXy3Hdb/hwmnUNIKK2rBL9xM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=mMTdL2vqNX6mj43a9e18qRK9OzZfQLjNESHpLjsY1u9C0Wa+OW8882YIsJFPbjDqJFxYzXtaw1t7W9XqXhyh1MEUgh6uhCRPP+IKx/V8Hpelhhu+m3cQoGAynSQRP9/rL5VA0PSwvgkABnCgH+AHTjEOEGdOwtYd7KfcuEvkbho= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD3714BA2E06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768912204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t726a1dhtBJTuffud1GxBwA61fJcy6S7aqI6gftUJ04=; b=GRAcnhXngD0y8znmgxUZJj8EtHGIKsUH7km1ph4zEbBb+Rf2t8hLQiSDOTiK6Ilr+PhRLu o6FZaMAxGTsvlhGg6zbQmWSrlzfjN3taXezELJpRMj8BIi7iZEvnrWtwxPVK0SUbUHoy5V 9IS8087KoXKYgLyzS+GkqabejVPxY34= Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-xAiAjw4lOCm5etOr2191dg-1; Tue, 20 Jan 2026 07:30:01 -0500 X-MC-Unique: xAiAjw4lOCm5etOr2191dg-1 X-Mimecast-MFC-AGG-ID: xAiAjw4lOCm5etOr2191dg_1768912200 Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-2b6be90b6d1so1869975eec.1 for ; Tue, 20 Jan 2026 04:30:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768912200; x=1769517000; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=t726a1dhtBJTuffud1GxBwA61fJcy6S7aqI6gftUJ04=; b=C6gTn1jqSZYI/MKJ4VXKICkdoAm4HvNim9YFdHJng/Zo3V5/6IPpHLLZSY5sKaW8tW eIlkpXkCEMDPX710fnqzgqA+lHwBWr0mbI0gUJq9+OnXlNWqVrzX88HwaDc4nye2liLQ aYJnvsUYhpkJ/qxb/xYKWnnT7suQV5HGhzGu+mHR2fBEavYscs6aqgEESFl8f6zEGxbH Fr8c4oQFdiRarSfpUS3iMnHU8YLfLCpwbPwL3PhlfNzaBhF7BSc5V6h53hd/0dDI9RVC 75lX29hhEoDPeSbvMNqLNkF3Xpo9hxCzRA5le+Bv3cbfVkXejIdQTS7HiYM2g/xqNsBv 3Sxg== X-Forwarded-Encrypted: i=1; AJvYcCXZ/fTP85Mnz4HRB31Mw0x20eOa4jRhp02hEpsXLcxaEDlIP8thrzAxrHtgdYtIqaC2eIYjApP4aCDLnw==@sourceware.org X-Gm-Message-State: AOJu0YyQUW6hE6sB8P4DtI17B51SJwjWg6+tY55zqKiT34lTYJynH19u peD0J3fH0ByqZ3ISl+BTw66/6MQvTlblp3fbEkIQ8tYT6CnqpZKNN9pvcUjMA1B401g6xFYVkcg uKFRZmHeTaFcqnuEHB3llPpvQTw0sjWKTCERacaqJzp7bdP5lH9v3SL5khaw5SOrvtyoa3kQ= X-Gm-Gg: AZuq6aIxk3YnGZF56kOQ9UXSsBoQIRKaeNyc6h/cRR8JgTtpywdZ+kUjqtvGbAPxPUS d2kOHNtMmnje4WYCw+fMZiaaOyHnMUS9h3Rs3lzuZzaUTM6gPnfpi7J7Wcay40caLMlsE01iF0G BnWLhCJjHZsCQ+sseDcRn+H+vdhpa/7HesbybK7oubbVeqXD2hWhGyCH8IjFJYB5QncH4sw2ZVI mN5mcKr404JMKQueOAWCbOn5N8B9O2fRyNfQEpQf6Gke7qKk47ZCJQKqdlH3SS0SYhx9zhDw+OI zcyA/qw4dz3Y2fm4jkg86XSWWt+lrAM1ylUhoA8kCRybWI3FjdFpe1qws3YbDKTUeZk6tAEaUAf oCnHS6pazUbR82e5fnl2wsw== X-Received: by 2002:a05:7301:1f01:b0:2b0:4e86:814c with SMTP id 5a478bee46e88-2b6fd8fe764mr928359eec.13.1768912198625; Tue, 20 Jan 2026 04:29:58 -0800 (PST) X-Received: by 2002:a05:7301:1f01:b0:2b0:4e86:814c with SMTP id 5a478bee46e88-2b6fd8fe764mr928296eec.13.1768912196601; Tue, 20 Jan 2026 04:29:56 -0800 (PST) Received: from ?IPV6:2804:14d:8084:a5b1::1002? ([2804:14d:8084:a5b1::1002]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b3502d22sm16846273eec.10.2026.01.20.04.29.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jan 2026 04:29:55 -0800 (PST) Message-ID: <1bed1d63-c118-41f5-b690-bbe445be9af3@redhat.com> Date: Tue, 20 Jan 2026 09:29:53 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb, gdbsupport, gdbserver: add support for printf 't' length modifier To: Simon Marchi , gdb-patches@sourceware.org References: <20260112182407.622150-1-simon.marchi@polymtl.ca> <5f4ce462-c6a2-4b87-ab22-c159251678a6@polymtl.ca> From: Guinevere Larsen In-Reply-To: <5f4ce462-c6a2-4b87-ab22-c159251678a6@polymtl.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xzThTTImqN2X6LLbOx7AyB0lS21fU7v-oaqpN0Hr_V8_1768912200 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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/19/26 3:09 PM, Simon Marchi wrote: > On 1/19/26 12:29 PM, Guinevere Larsen wrote: >> On 1/12/26 3:24 PM, simon.marchi@polymtl.ca wrote: >>> From: Simon Marchi >>> >>> Tom de Vries reported [1] that a use of the `t` printf length modifier >>> (used for ptrdiff_t) breaks "set debug dwarf-die 1": >>> >>> +break -qualified main >>> Reading Reading compcomp unit at offset unit at offset 0x00x39 >>> >>> Reading comp unit at offset 0x1a8 >>> Reading comp unit at offset 0x1e9 >>> Reading comp unit at offset 0x2c5 >>> Reading comp unit at offset 0x2a2 >>> Reading comp unit at offset 0x904 >>> Unrecognized format specifier 't' in printf >>> >>> This use is in dwarf2/read.c: >>> >>> gdb_printf (gdb_stdlog, "Read die from %s@0x%tx of %s:\n", >>> m_die_section->get_name (), >>> (begin_info_ptr - m_die_section->buffer), >>> bfd_get_filename (m_abfd)); >>> >>> Add support for the `t` length modifier in format_pieces, which >>> gdb_printf ultimately uses (through ui_out::vmessage). Modify the three >>> users of format_pieces: gdb's printf command, gdb's ui_out::vmessage >>> function and gdbserver's ax_printf function. >>> >>> The implementation is mostly copied from what we do for size_t. >>> >>> Since format_pieces is also used to implement the printf command, this >>> patch brings user-visible changes. Before: >>> >>> (gdb) printf "%td\n", -123 >>> ❌️ Unrecognized format specifier 't' in printf >>> >>> After: >>> >>> (gdb) printf "%td\n", -123 >>> -123 >>> >>> [1] https://inbox.sourceware.org/gdb-patches/d4ccce34-aad5-4e3d-8fc9-efb2fc11275c@suse.de/ >>> >>> Change-Id: Ie9fce78f5f48082d8f8a9ca2847b5ae26acaa60d >>> --- >> This commit seems to have caused a regression. After this, when starting GDB without the quiet flag I get the following: >> >> 0x7ffc6b9bc520s >> Copyright (C) 2026 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later <0x7ffc6b9bc560s> >> This is free software: you are free to change and redistribute it >> There is NO WARRANTY, to the extent permitted by law. >> Type "0x7ffc6b9bc5e0s" and "0x7ffc6b9bc5a0s" for details. >> This GDB was configured as "x86_64-pc-linux-gnu". >> Type "0x7ffc6b9bc620s" for configuration details. >> For bug reporting instructions, please see: >> 0x7ffc6b9bc660s. >> >> That is, anywhere where GDB would print a styled string, we seem to be printing a pointer address instead. > > Hmm, I don't see this. I see a pink "GNU gdb (GDB) > 18.0.50.20260119-git" where you see the "0x7ffc6b9bc660s". > We will need to figure out what is different between our setups. > > Simon > Oh, oops, turns out it was my bad. I was running make on the gdb subdirectory instead of the build directory and never compiled gdbsupport Once I did that things magically started working again! Sorry about the noise -- Cheers, Guinevere Larsen It/she