Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, Andreas Arnez <arnez@linux.vnet.ibm.com>
Subject: Re: [PATCH][gdb] Fix s390x -m31 build
Date: Fri, 21 Jun 2019 17:07:00 -0000	[thread overview]
Message-ID: <acca8b16-4ab4-84e4-07ae-df9d43e1d08b@suse.de> (raw)
In-Reply-To: <87y31uc4a3.fsf@tromey.com>

On 21-06-19 18:05, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> 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


  reply	other threads:[~2019-06-21 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  9:33 Tom de Vries
2019-06-21 16:05 ` Tom Tromey
2019-06-21 17:07   ` Tom de Vries [this message]
2019-06-22  9:01     ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acca8b16-4ab4-84e4-07ae-df9d43e1d08b@suse.de \
    --to=tdevries@suse.de \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox