This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: [MinGW] RFC/RFA: Get Partial Stack Traces on Windows


Ranjit Mathew writes:
 > -----BEGIN PGP SIGNED MESSAGE-----
 > Hash: SHA1
 > 
 > Andrew Haley wrote:
 > > Ranjit Mathew writes:
 > >  > - -      if ((void*)rfp < _esp || diff > 4 * 1024 || diff < 0)
 > >  > +      if (((unsigned int)rfp & 0x00000003) != 0 || (void*)rfp < _esp
 > >  > 
 > >  > > Don't use unsigned int for a pointer; instead use 
 > >  > > int __attribute__((mode(pointer))).  This is an int that is exactly the
 > >  > > same size as a pointer.
 > >  > 
 > >  > I was just following in the illustrious footsteps of Bryce. ;-)
 > > 
 > > Everything can be improved, y'know!
 > 
 > I was just kidding.

OK.  I guessed so.

 > >  > Considering that this file (sysdep/i386/backtrace.h) is x86-specific
 > >  > and is anyway full of otherwise utterly-non-portable-C stuff, does
 > >  > it matter?
 > > 
 > > It deson't affect correctness, it's just a matter of clarity.  It's
 > > effectively saying "this is a pointer that holds an int."
 > 
 > Should I add something like the following for use everywhere 

Sure.  tromey suggested that, and I agree.

 > or do you prefer something more localised to
 > "sysdep/i386/backtrace.h"?

I think tromey's suggestion of _Jv_intptr_t was better, as it
emphasizes the link with the optional intptr_t.  

Having said that, is there any need for a signed pointer?  I don't
think so.  It makes the most sense to define _Jv_uintptr_t.  But we're
in danger of arguing about what colour to paint the bicycle shed...

I've caused enough trouble already; I'm outta here!  :-)

Andrew.


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