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] long long for printf on MinGW


Mark Kettenis wrote:
Hi,

 Windows/MinGW printf does support printing of long long types, but it
 does not do using %lld etc.

This patch converts %ll (or %...ll) to %I64 as required by Windows.

What! Seven years after ISO C99 was ratified, Microsoft still ships a libc that doesn't support %ll?

I'm still using Win2K, so I don't think you can count all of those seven years. So are many of our customers and, no doubt, other users. The MSDN I have is dated 2002.


Sigh, I don't see why we need to treat MINGW special here.  We should
probably
just print an error if PRINTF_HAS_LONG_LONG isn't defined.

That's what it does, and what I don't want it to do. Why shouldn't I be able to see long long values, as supported by the target, just because I happen to use a Windows host. It isn't a difficult fixup and doesn't break or even affect any other host.


Please don't point out some other way of displaying the value, that isn't the point and is just proof that it ought to work.

Actually I think the way we support size modifiers in gdb's printf are
completely broken.  Do they refer to the host types, or the target types?

'Completely' broken or not, they work for most peoples' needs, but in this respect they don't work for Windows users' needs.


Andrew


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