From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QeQ5CJxHhWLR9QYAWB0awg (envelope-from ) for ; Wed, 18 May 2022 15:23:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 148371E220; Wed, 18 May 2022 15:23:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8EDC01E00D for ; Wed, 18 May 2022 15:23:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9537383D81E for ; Wed, 18 May 2022 19:23:06 +0000 (GMT) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by sourceware.org (Postfix) with ESMTPS id CA65038485B7 for ; Wed, 18 May 2022 19:15:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA65038485B7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f53.google.com with SMTP id u3so4013605wrg.3 for ; Wed, 18 May 2022 12:15:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=TSg2wMVaQL2bmw6siUKEuNCk7pn6s9JoT6VPIWamdFo=; b=aRnAPuNnCWhM2HYk4r8xPMnOB/J0h9SZFknIRbAssqYEBYxnQ/cUmwmaKti/F/Ndtm 3hDncAHOtZkMw3/RkkWwSZWvL8O2xNRweUnv/lruPtcED3dTGn9aahkG9O9cDHQEHm+j bOidZbKvh7SRphuoQ//fZGA/E223eFFLADgbI+5epmbVGcrcZDQwwrMvBCbrhSaJiZlw s70tQfGQ7FailuU1OXYe7JsMzHjorbh+z3BjGls5IysHf2DARi9RaysP12jNT9lQ4fWx I/T7aZTT1V0EDe8gF4DDU6ZRuFKuJY9QyrPCI0+XcABOqjhBZN60IXON6Om2oJOa+Vvf dFMg== X-Gm-Message-State: AOAM532FoifE6aEccaXZAcFFP0NyF7xKiIC9KD36o5HrRaTIb59tYnmp KN2DVq8hOjjkx7Jr83RQvZ8= X-Google-Smtp-Source: ABdhPJwt/d1elFRpr2KGt9nd0O4Mz/oh908QxjLXj7LGO+3yti3tNODEXodVoXTflZ4QIWiVI2/yTQ== X-Received: by 2002:a05:6000:1a8d:b0:20c:68ed:7449 with SMTP id f13-20020a0560001a8d00b0020c68ed7449mr999565wry.124.1652901337608; Wed, 18 May 2022 12:15:37 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id c3-20020adfa703000000b0020d012692dbsm3344476wrd.18.2022.05.18.12.15.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 12:15:36 -0700 (PDT) Message-ID: <99bf2d3c-21ec-ab66-897f-b690194797de@palves.net> Date: Wed, 18 May 2022 20:15:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH][gdb/c] Fix printing -2147483648 Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20220518173840.GA8909@delia> From: Pedro Alves In-Reply-To: <20220518173840.GA8909@delia> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-05-18 18:38, Tom de Vries wrote: > + if { [c_like $lang] } { > + set val -2147483648 > + if { $sizeof_long_long == 4 } { > + set re $re_overflow > + } else { > + set re $val > + } > + gdb_test "p $val" $re > + } Could you add ptype tests too? As is, is plausible for GDB to manage to print the expected value, but incorrectly pick long long instead of long, for example.