From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57101 invoked by alias); 21 Jun 2019 17:07:50 -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 56851 invoked by uid 89); 21 Jun 2019 17:07:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.0 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.1 spammy=6.5 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Jun 2019 17:07:48 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9CAC5AD47; Fri, 21 Jun 2019 17:07:46 +0000 (UTC) Subject: Re: [PATCH][gdb] Fix s390x -m31 build To: Tom Tromey Cc: gdb-patches@sourceware.org, Andreas Arnez References: <20190620093339.GA6388@delia> <87y31uc4a3.fsf@tromey.com> From: Tom de Vries Message-ID: Date: Fri, 21 Jun 2019 17:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <87y31uc4a3.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00438.txt.bz2 On 21-06-19 18:05, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> Fix this by changing the length modifier from 'z' to the ptrdiff_t length > Tom> modifier 't', and change the conversion specifier from 'u' to the more > Tom> appropriate 'd'. > > gdb probably shouldn't be using 'z' anyway. IIRC it causes problems on > Windows. > > How portable is %td? I do not know. Maybe check the gnulib manual and > see what they have to say about it? Anyway, this is my main concern > with this patch. > I found here ( https://www.gnu.org/software/gnulib/manual/gnulib.html ): ... Portability problems fixed by Gnulib module fprintf-posix: This function does not support size specifiers as in C99 (hh, ll, j, t, z) on some platforms: AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.24, mingw, MSVC 14, BeOS. ... > The standard gdb approach here is to use plongest / pulongest in > conjunction with %s. That avoids any problems. I'll update the patch to use that method, thanks for pointing that out. Thanks, - Tom