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: [RFC] convert a host address to a string


Joel Brobecker <brobecker@adacore.com> wrote on 08.01.2009 14:42:45:

> > Please be aware that %llx isn't valid for x86_64 windows (as it isn't 
for 
> > 32-bit standard). The options 'I' or 'I64' have to be used for those 
> > targets (at least for _WIN64).
> 
> Can you be a little more specific?
> 
> I just checked the config.h file generated by configure on
> x86_64-windows, and I found this:
> 
>     /* Define to 1 if the "%ll" format works to print long longs. */
>     #define PRINTF_HAS_LONG_LONG 1
> 
> If this is wrong, we have yet another problem.

Yes, this is wrong, at least for w64. I used the w64 compiler by this and 
it returns me for the probing code an result of -1.

The issue here is that msvcrt doesn't supports (for 32-bit and for 64-bit) 
the %ll with specifier. For msvcrt80 (or so) they introduced it IIRC, but 
this version isn't used by mingw as default runtime (because it isn't part 
of the OS itself).

Cheers,
Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.


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