From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id 15CE63858D39 for ; Thu, 10 Mar 2022 17:30:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15CE63858D39 Received: by mail-il1-x12e.google.com with SMTP id l1so4243854ilv.3 for ; Thu, 10 Mar 2022 09:30:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gqCKU1pgnR+gjxlD6+dDoQUR9UGQFvgNtaAZA1o7RHA=; b=dVRyVeqcG6OZdIiGHrMnzz6RvYVjBEilqC5/+9yT4kpcfEBaLOqAp/baYmWBbaBv5g qukb59j+RnlgnWIQVRTtNzT1fj3QEhvPBkUsBOGO9L9cvAcZ3SXiUGXEZzAvkGKkXJqS vPsJrjE4ksBiVTz9GJE06i3JZMVlWLR0KRyquVq4GxE0rE1nzziHkIVziD4kxVX40Zmn Ok4usqqR6EyngGF/BmUuDiQ6iw3AD7krLUMhgv7XGPZepyMMj86CPkpdJb4pY/nmnS4F sEazix/TPHDShTrLHIk/qWLX5o6itzq9ixj6677xepyFn/1e0WEz5lhyRG91m85L5w4G ijOw== X-Gm-Message-State: AOAM531ksd7/klvSEMt/wL1qkBHFX3KwpAkyQKV78nCiafsJW82ETXPx JxMMISsEKOL9m56jqbNOkRJQ+Q== X-Google-Smtp-Source: ABdhPJxJUR8Oqv02DHaEbja16ak6IZx+0esyEQQ8WHom52cTYt6GpmSQVBOGXKlS5Ks2p5JI235zKA== X-Received: by 2002:a05:6e02:180d:b0:2c7:733a:f11d with SMTP id a13-20020a056e02180d00b002c7733af11dmr67347ilv.23.1646933406264; Thu, 10 Mar 2022 09:30:06 -0800 (PST) Received: from murgatroyd (75-166-141-253.hlrn.qwest.net. [75.166.141.253]) by smtp.gmail.com with ESMTPSA id e17-20020a5d8ad1000000b00644d51bbffcsm3031512iot.36.2022.03.10.09.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 09:30:06 -0800 (PST) From: Tom Tromey To: Andreas Schwab Cc: Tom Tromey via Gdb-patches , Andrew Burgess , Tom Tromey Subject: Re: [PATCH] Change how "print/x" displays floating-point value References: <20220217212957.1747537-1-tromey@adacore.com> <874k4xdqwl.fsf@redhat.com> <87k0dsqg47.fsf@tromey.com> <87zgmovzr9.fsf@igel.home> X-Attribution: Tom Date: Thu, 10 Mar 2022 10:30:05 -0700 In-Reply-To: <87zgmovzr9.fsf@igel.home> (Andreas Schwab's message of "Fri, 18 Feb 2022 18:41:14 +0100") Message-ID: <87czitogv6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: Thu, 10 Mar 2022 17:30:08 -0000 >>>>> "Andreas" == Andreas Schwab writes: >> +print >> + Printing of floating-point values with base-modifying formats like >> + /x has been changed to display the underlying bytes of the value in >> + the desired base. This was GDB's documented behavior, but was never >> + implemented correctly. Andreas> How does that handle padding? I don't know, can you say more? >> + # See PR gdb/16242 for this. >> + gdb_test "print/d 1.5f" " = 1069547520" >> + gdb_test "print/u 1.5f" " = 1069547520" >> + gdb_test "print/x 1.5f" " = 0x3fc00000" >> + gdb_test "print/t 1.5f" " = 111111110000000000000000000000" >> + gdb_test "print/o 1.5f" " = 07760000000" Andreas> That assumes a particular representation of the float type that depends Andreas> on the target. Yeah. I don't know what targets this will fail for. I could restrict it to x86 or skip it on some, if I knew which ones mattered. Tom