OSDN Git Service

Index: ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / unwind-sjlj.c
index fc22911..8d9766f 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "tconfig.h"
 #include "tsystem.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "unwind.h"
 #include "gthr.h"
 
@@ -92,15 +94,9 @@ static __gthread_key_t fc_key;
 static int use_fc_key = -1;
 
 static void
-fc_key_dtor (void *ptr)
-{
-  __gthread_key_dtor (fc_key, ptr);
-}
-
-static void
 fc_key_init (void)
 {
-  use_fc_key = __gthread_key_create (&fc_key, fc_key_dtor) == 0;
+  use_fc_key = __gthread_key_create (&fc_key, 0) == 0;
 }
 
 static void
@@ -174,6 +170,15 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
   return context->fc->data[index];
 }
 
+/* Get the value of the CFA as saved in CONTEXT.  */
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+  /* ??? Ideally __builtin_setjmp places the CFA in the jmpbuf.  */
+  return NULL;
+}
+
 void
 _Unwind_SetGR (struct _Unwind_Context *context, int index, _Unwind_Word val)
 {
@@ -208,6 +213,12 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context __attribute__((unused))
   return 0;
 }
 
+void *
+_Unwind_FindEnclosingFunction (void *pc)
+{
+  return NULL;
+}
+
 #ifndef __ia64__
 _Unwind_Ptr
 _Unwind_GetDataRelBase (struct _Unwind_Context *context __attribute__((unused)) )
@@ -251,7 +262,7 @@ uw_init_context (struct _Unwind_Context *context)
 }
 
 /* ??? There appear to be bugs in integrate.c wrt __builtin_longjmp and
-   virtual-stack-vars.  An inline version of this segfaults on Sparc.  */
+   virtual-stack-vars.  An inline version of this segfaults on SPARC.  */
 #define uw_install_context(CURRENT, TARGET)            \
   do                                                   \
     {                                                  \
@@ -274,6 +285,7 @@ uw_identify_context (struct _Unwind_Context *context)
 #define _Unwind_RaiseException         _Unwind_SjLj_RaiseException
 #define _Unwind_ForcedUnwind           _Unwind_SjLj_ForcedUnwind
 #define _Unwind_Resume                 _Unwind_SjLj_Resume
+#define _Unwind_Resume_or_Rethrow      _Unwind_SjLj_Resume_or_Rethrow
 
 #include "unwind.inc"