From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kgK6K6Nsi2Jn2gcAWB0awg (envelope-from ) for ; Mon, 23 May 2022 07:14:43 -0400 Received: by simark.ca (Postfix, from userid 112) id A451E1E220; Mon, 23 May 2022 07:14:43 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tdn7L2Tr; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED 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 3EBAB1E01D for ; Mon, 23 May 2022 07:14:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA5EB38387C0 for ; Mon, 23 May 2022 11:14:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA5EB38387C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653304482; bh=tr8I1rBLHROroRmVXFtuzQxEk7T/tADypuxiHvCJQXc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=tdn7L2Tr+8a9xuS+Lzu0gpJn/S77NSF3xSl28tW/RzbTRkgbEprbzCrjD3OcCIPRW Na6myG5MhgBMkwuXSXWQ9vYpDx0R3szxTEAxAm+jJhN9bVmO/ozj7c/ShkqR23T0kP 4Z8f5TLnAc7zrJydB6CeTKUUuVE15S+4SXn3tNW8= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id D9F0D3858010 for ; Mon, 23 May 2022 11:14:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9F0D3858010 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 21C5821A99; Mon, 23 May 2022 11:14:20 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0774A139F5; Mon, 23 May 2022 11:14:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gPepAIxsi2JiGQAAMHmgww (envelope-from ); Mon, 23 May 2022 11:14:20 +0000 Message-ID: Date: Mon, 23 May 2022 13:14:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH][gdb/c] Fix printing -2147483648 Content-Language: en-US To: Andreas Schwab , Tom de Vries via Gdb-patches References: <20220518173840.GA8909@delia> <87zgjemzsu.fsf@igel.home> In-Reply-To: <87zgjemzsu.fsf@igel.home> Content-Type: text/plain; charset=UTF-8; format=flowed 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Pedro Alves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 5/18/22 21:00, Andreas Schwab wrote: > On Mai 18 2022, Tom de Vries via Gdb-patches wrote: > >> +static bool >> +fits_in_type (int n_sign, ULONGEST n, int type_bits, bool type_signed_p) > > n_sign is always 1, you can just remove it. > I ended up using this function here ( https://sourceware.org/pipermail/gdb-patches/2022-May/189313.html ) with n_sign also being -1. >> + if (have_int && have_signed && fits_in_type (1, n, int_bits, 1)) > > type_signed_p is a bool, so you should use true and false. > Ack, fixed in resubmission here ( https://sourceware.org/pipermail/gdb-patches/2022-May/189311.html ). Thanks, - Tom