This is the mail archive of the cygwin-apps mailing list for the Cygwin 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/rebase] Make rebase 64 bit capable (was Re: [patch/rebase] Make imagehelper 64-bit capable)


On Jul  7 23:18, Charles Wilson wrote:
> On 7/7/2011 3:48 PM, Eric Blake wrote:
> > On 07/07/2011 01:43 PM, Corinna Vinschen wrote:
> >> -    printf ("%-47s base 0x%08lx size 0x%08lx\n",
> >> +    printf (
> >> +#if defined (__CYGWIN__) || defined (__MSYS__)
> >> +	    "%-47s base 0x%08llx size 0x%08lx\n",
> >> +#else
> >> +	    "%-47s base 0x%08I64x size 0x%08lx\n",
> >> +#endif
> > 
> > Do we need the #ifdef, or can we get away with including <inttypes.h>
> > and doing:
> > 
> > printf ("%-47s base 0x%08" PRIx64 " size 0x%08lx\n")
> > 
> > and let PRIx64 take care of the ll vs. I64 spelling?
> 
> Should be ok.  IMO, we don't care about trying to compile imagehelper or
> rebase with MSVC (where inttypes.h doesn't exist).  More importantly,
> however, now that img_info_t.base is a ULONG64, the field width should
> be extended to 0x%016 shouldn't it?

I don't like to print a 16 digits wide address for 32 bit DLLs.  The
0x%08 prints 32 bit address always with 8 digits, and only 64 bit
addresses beyond the 32 bit address space with more digits.

I can change that in my database patch so that 32 bit DLLs are
always printed with 8 digits and 64 bit DLLs always with 16 digits.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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