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


On Wed, Apr 23, 2008 at 10:28:38AM +0100, Andrew STUBBS wrote:
> That said, selfishly speaking, it's overkill for _my_ problem, and I  
> don't know of any other problems in this area - apart from hosts that  
> just plain don't have long long, and you seem to suggest that gnulib  
> won't solve that?

You can't pass a long long by C varargs if your compiler doesn't
support it, and GDB won't do anything sensible anyway - LONGEST
will be a long.

> Unless I'm mistaken, the code reserves enough space for every character  
> to be in it's own nul-terminated substring, but since the minimum length  
> %-spec is two characters, that's impossible. In this specific example,  
> there would be 8 bytes reserved for the string "%lld" - enough for  
> "%\0l\0l\0d\0", but "%I64d\0" only uses 6.

Right.

Go ahead with the patch.  We can rip it out if we switch to gnulib's
printf.

-- 
Daniel Jacobowitz
CodeSourcery


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