diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2014-05-13 16:23:11 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2014-05-13 16:23:11 +0000 |
commit | 54fde020ccdc4bbb163fb6d481743342d9ee2deb (patch) | |
tree | fbcc4f4a9f2fcf4816b6055b5e2b235c10e3d758 /libgcc | |
parent | af2db4c5770b07d6278207cf43d65c3bf7bad36f (diff) | |
download | gcc-54fde020ccdc4bbb163fb6d481743342d9ee2deb.tar.gz |
Enable Java on Cygwin-64
Currently it is not possible to build GCC's libjava support on Cygwin-64.
This patch fixes the current build-problems on Cygwin-64 and the most
fundamental bugs on that platform.
Note you must still add --enable-threads=posix to successfully build the
java language support.
boehm-gc/ChangeLog:
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* include/gc_config_macros.h (GC_PTHREADS): Use __CYGWIN__ instead
of __CYGWIN32__ here.
* win32_threads.c (GC_push_all_stacks): Push all X86_64 registers.
(GC_get_thread_stack_base): Get the stack base for X86_64.
libffi/ChangeLog:
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* src/java_raw_api.c: Remove if !defined(FFI_NO_RAW_API).
* src/x86/ffi.c: Add if defined(__CYGWIN__).
* src/x86/win64.S (ffi_closure_win64, ffi_call_win64): Added
handling for FFI_TYPE_UINT64, FFI_TYPE_POINTER and FFI_TYPE_INT.
Added SEH information. Fixed formatting.
libgcc/ChangeLog:
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
* unwind-seh.c (_Unwind_Backtrace): Uncommented, finished
implementation.
libjava/ChangeLog:
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* configure.host: Added handling for x86_64-*-cygwin/mingw.
* boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if
GC_WIN32_THREADS is defined.
* java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface
to source_interface.
libjava/classpath/ChangeLog:
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* native/fdlibm/mprec.c (_REENT_CHECK_MP, _REENT_MP_FREELIST,
_REENT_MP_P5S, __ULong, __Long): Undefine previous definitions.
From-SVN: r210386
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/unwind-seh.c | 42 |
2 files changed, 23 insertions, 24 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index dd908743091..13036945556 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * unwind-seh.c (_Unwind_Backtrace): Uncommented, finished + implementation. + 2014-05-12 Georg-Johann Lay <avr@gjlay.de> * config/arm/bpabi-lib.h (License): Add GCC Runtime Library Exception. diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c index b4a3ca1e34b..c8187b37a16 100644 --- a/libgcc/unwind-seh.c +++ b/libgcc/unwind-seh.c @@ -431,43 +431,40 @@ _Unwind_DeleteException (struct _Unwind_Exception *exc) /* Perform stack backtrace through unwind data. */ _Unwind_Reason_Code -_Unwind_Backtrace(_Unwind_Trace_Fn trace ATTRIBUTE_UNUSED, - void *trace_argument ATTRIBUTE_UNUSED) +_Unwind_Backtrace(_Unwind_Trace_Fn trace, + void *trace_argument) { -#if 0 UNWIND_HISTORY_TABLE ms_history; CONTEXT ms_context; struct _Unwind_Context gcc_context; + DISPATCHER_CONTEXT disp_context; memset (&ms_history, 0, sizeof(ms_history)); memset (&gcc_context, 0, sizeof(gcc_context)); + memset (&disp_context, 0, sizeof(disp_context)); ms_context.ContextFlags = CONTEXT_ALL; RtlCaptureContext (&ms_context); - gcc_context.disp.ContextRecord = &ms_context; - gcc_context.disp.HistoryTable = &ms_history; + gcc_context.disp = &disp_context; + gcc_context.disp->ContextRecord = &ms_context; + gcc_context.disp->HistoryTable = &ms_history; while (1) { - gcc_context.disp.ControlPc = ms_context.Rip; - gcc_context.disp.FunctionEntry - = RtlLookupFunctionEntry (ms_context.Rip, &gcc_context.disp.ImageBase, + gcc_context.disp->ControlPc = ms_context.Rip; + gcc_context.disp->FunctionEntry + = RtlLookupFunctionEntry (ms_context.Rip, &gcc_context.disp->ImageBase, &ms_history); - if (gcc_context.disp.FunctionEntry) - { - gcc_context.disp.LanguageHandler - = RtlVirtualUnwind (0, gcc_context.disp.ImageBase, ms_context.Rip, - gcc_context.disp.FunctionEntry, &ms_context, - &gcc_context.disp.HandlerData, - &gcc_context.disp.EstablisherFrame, NULL); - } - else - { - ms_context.Rip = *(ULONG_PTR *)ms_context.Rsp; - ms_context.Rsp += 8; - } + if (!gcc_context.disp->FunctionEntry) + return _URC_END_OF_STACK; + + gcc_context.disp->LanguageHandler + = RtlVirtualUnwind (0, gcc_context.disp->ImageBase, ms_context.Rip, + gcc_context.disp->FunctionEntry, &ms_context, + &gcc_context.disp->HandlerData, + &gcc_context.disp->EstablisherFrame, NULL); /* Call trace function. */ if (trace (&gcc_context, trace_argument) != _URC_NO_REASON) @@ -477,8 +474,5 @@ _Unwind_Backtrace(_Unwind_Trace_Fn trace ATTRIBUTE_UNUSED, if (ms_context.Rip == 0) return _URC_END_OF_STACK; } -#else - return _URC_END_OF_STACK; -#endif } #endif /* __SEH__ && !defined (__USING_SJLJ_EXCEPTIONS__) */ |