This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [Windows] fix format string for 64 bit var in gdbserver


> From: Mike Frysinger <vapier@gentoo.org>
> Date: Sat, 17 Jul 2010 05:37:43 -0400
> 
> On Friday, July 16, 2010 16:10:23 Ozkan Sezer wrote:
> > For windows targets, (x86_64-w64-mingw32, i686-w64-mingw32)
> > gcc complains:
> >=20
> > ../../../gdb-cvs/gdb/gdbserver/server.c: In function 'handle_query':
> > ../../../gdb-cvs/gdb/gdbserver/server.c:1542: warning: unknown
> > conversion type character 'l' in format
> > ../../../gdb-cvs/gdb/gdbserver/server.c:1542: warning: too many
> > arguments for format
> > ../../../gdb-cvs/gdb/gdbserver/server.c:1566: warning: unknown
> > conversion type character 'l' in format
> > ../../../gdb-cvs/gdb/gdbserver/server.c:1566: warning: too many
> > arguments for format
> >=20
> > This is due to the fact that MS printf doesn't support %lld, it uses
> > its own %I64d which gcc already knows about. The attached patch
> > changes that. OK for apply?
> 
> ugh, no.  why not use a sane define like PRIx64 from inttypes.h ?

"sane" isn't the word I'd use.  Not only do I find them to make printf
format strings to become unreadable, they also cause i18n issues.

<rant>
How on earth can people take this 64-bit Windows crap seriously?
Choosing LLP64 over LP64 when has been de de-facto standard for well
over a decade is, well, a bit odd.  But if "long long", which was
standardized with C99, is your only 64-bit integer type, but your
printf doesn't understand the C99 standard %ll format specifier,
you're shipping a crippled system.  To me that screams "we don't care
about portable software".  And my answer to that would be that I don't
care about Microsoft Windows.
</rant>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]