This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c


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
  

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