Question about a comment in _Jv_StackTrace::UnwindTraceFn

Dave Korn dave.korn.cygwin@googlemail.com
Fri May 22 06:02:00 GMT 2009


Dave Korn wrote:

> The solution is now obvious, but not easy.  I'll be off in the corner with
> a copy of the Dwarf spec for a while, learning how to hand-craft CIEs and
> FDEs and all those things.  If anyone knows of a handy tool or shortcut
> that can help me with that task, please drop me a reply, because I don't
> know of any option apart from doing it manually.

  That wasn't so bad.  The quick way turned out to be to read enough of the
spec to be able to hand-parse and understand the x64/sysv.S FDE CFI lists, and
then apply the equivalent annotations to the win32 versions.  This fixed the
testcase I was debugging, so I've rebuilt (not re-bootstrapped, just rebuilt
the target libs after reconfiguring in $objdir/i686-pc-cygwin/libffi) and am
putting the attached patch through a libjava/libffi testrun.  FTR, the results
before this patch were:

                === libjava Summary ===

# of expected passes            2392
# of unexpected failures        96
# of untested testcases         84

                === libffi Summary ===

# of expected passes            1374
# of unexpected failures        27

  Assuming we see nothing but improvements, OK for head?

libjava/ChangeLog:

	* prims.cc (_Jv_CreateJavaVM):  Don't set runtimeInitialized
	until initialization is fully complete.

libffi/ChangeLog:

	* configure.ac:  Also check if assembler supports pc-relative
	relocs on X86_WIN32 targets.
	* configure:  Regenerate.
	* src/x86/win32.S (ffi_prep_args):  Declare extern, not global.
	(_ffi_call_SYSV):  Add missing function type symbol .def and
	add EH markup labels.
	(_ffi_call_STDCALL):  Likewise.
	(_ffi_closure_SYSV):  Likewise.
	(_ffi_closure_raw_SYSV):  Likewise.
	(.eh_frame):  Add hand-crafted EH data.

    cheers,
      DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libffi-win32-eh-markup.diff
Type: text/x-c
Size: 8250 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20090522/bada699a/attachment.bin>


More information about the Java-patches mailing list