From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126757 invoked by alias); 14 Nov 2019 17:09:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 126740 invoked by uid 89); 14 Nov 2019 17:09:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:172.16.0 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Nov 2019 17:09:39 +0000 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 xAEH9LKk009418 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 12:09:26 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca xAEH9LKk009418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1573751368; bh=DIsAZqwjVtSjPX/SctX1T3MvE8CeR1Xzh9jHWj4+gAY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=CNw+SRJ9kYXwK2+Ws8EGeRRbJSk0sF9QCsOKfxjX9O/xKMJryXm7f7/aGH424i8Lh vrTuabDfP8z1z7j55I3sD6GnAzGypWrSsyfqH93kgwQka7dPfCoOa+FromOAvp6buT Kg0ZAQdQ4T6XrZ3ikr7EDEfi6+v3FBrI1KB2eRPU= Received: from [172.16.0.155] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B72541E60A; Thu, 14 Nov 2019 12:09:20 -0500 (EST) Subject: Re: [pushed] gdb: Support printf 'z' size modifier To: Eli Zaretskii , Andrew Burgess Cc: tromey@sourceware.org, palves@redhat.com, brobecker@adacore.com, kevinb@redhat.com, gdb-patches@sourceware.org References: <20191112235315.5BD6728171@gnutoolchain-gerrit.osci.io> <83y2wi62jp.fsf@gnu.org> <20191114164945.GP11037@embecosm.com> <83pnhu4co3.fsf@gnu.org> From: Simon Marchi Message-ID: <4b637fa7-666c-4a80-8627-a6efefd6ec2a@polymtl.ca> Date: Thu, 14 Nov 2019 17:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <83pnhu4co3.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00400.txt.bz2 On 2019-11-14 11:59 a.m., Eli Zaretskii wrote: >> Date: Thu, 14 Nov 2019 16:49:45 +0000 >> From: Andrew Burgess >> Cc: noreply@gnutoolchain-gerrit.osci.io, simon.marchi@polymtl.ca, >> tromey@sourceware.org, palves@redhat.com, brobecker@adacore.com, >> kevinb@redhat.com, gdb-patches@sourceware.org >> >> I guess there are a couple of solutions: >> >> 1. Remove all uses of %z from GDB, and back out the %z support, or >> >> 2. Have GDB translate %z into some other suitable format specifier >> for targets where %z is not supported. >> >> Below is a patch that tries to take the second approach. > > Hmm... isn't it better to simply add -D__USE_MINGW_ANSI_STDIO=1 to the > cpp flags when building with MinGW? I don't think there are versions > of MinGW that don't support that macro. > > The effect of that macro is to link against a MinGW library that > provides replacement implementations for *printf functions, and the > replacements do support %z. > Apaprently, the __USE_MINGW_ANSI_STDIO macro has been marked as deprecated (IIUC, to incite people not to define it directly), and I found this thread [1] on the mingw-users mailing list where you asked the maintainer to reconsider this decision. What is the status on that? If defining __USE_MINGW_ANSI_STDIO is not the right way of enabling this feature, then what is? What is the status of this? Simon [1] https://osdn.net/projects/mingw/lists/archive/users/2019-January/thread.html#199 Subject "Deprecation of __USE_MINGW_ANSI_STDIO"