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:
 > > What happens with -findirect-dispatch?
 > 
 > The stack-trace changes to:
 > - --------------------------- 8< ---------------------------
 > Exception in thread "main" java.lang.Exception: I don't like you!
 >    at java.lang.VMThrowable.fillInStackTrace(a.exe)
 >    at java.lang.Throwable.<init>(a.exe)
 > - --------------------------- 8< ---------------------------
 > 
 > However, I don't think the BC-ABI works on Windows as of
 > now - I was actually expecting an ICE or a segfault somewhere
 > and was quite surprised when neither of them happened. :-)

OK.  Fair enough.

 > 
 > - -      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!

 > 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."

Andrew.


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