This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
- From: Nick Clifton <nickc at redhat dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: binutils at sourceware dot org, Julian Seward <jseward at acm dot org>
- Date: Tue, 29 Jan 2008 16:40:15 +0000
- Subject: Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
- References: <OF60C5C71F.B6BC2012-ONC12573DF.00574810-C12573DF.00577456@onevision.de>
Hi Kai,
You used just the gnu printf style, could you add additionally the mingw
case to this patch, too?
Doh! Yes of course. That was one of the reasons why I broke the printing out
into a separate function in the first place.
I have applied the attached patch.
Cheers
Nick
binutils/ChangeLog
2008-01-29 Nick Clifton <nickc@redhat.com>
* dwarf.c (print_dwarf_vma): Use mingw field type
specifier if necessary.
Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.30
diff -c -3 -p -r1.30 dwarf.c
*** binutils/dwarf.c 29 Jan 2008 15:45:00 -0000 1.30
--- binutils/dwarf.c 29 Jan 2008 16:34:43 -0000
*************** print_dwarf_vma (dwarf_vma val, unsigned
*** 175,182 ****
--- 175,186 ----
integer value, so we print the full value into a buffer and then select
the precision we need. */
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
+ #ifndef __MSVCRT__
snprintf (buff, sizeof (buff), "%16.16llx ", val);
#else
+ snprintf (buff, sizeof (buff), "%016I64x ", val);
+ #endif
+ #else
snprintf (buff, sizeof (buff), "%16.16lx ", val);
#endif