Re: [pushed] gdb: Support printf 'z' size modifier

Eli Zaretskii
2019-11-14T16:59:31Z

> Date: Thu, 14 Nov 2019 16:49:45 +0000
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> 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.