On 21-06-19 19:07, Tom de Vries wrote: > 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. Committed as attached. Thanks, - Tom