OSDN Git Service

2007-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / unwind.inc
index 63fba96..f905b47 100644 (file)
@@ -82,7 +82,7 @@ _Unwind_RaiseException_Phase2(struct _Unwind_Exception *exc,
 
 /* Raise an exception, passing along the given exception object.  */
 
-_Unwind_Reason_Code
+_Unwind_Reason_Code LIBGCC2_UNWIND_ATTRIBUTE
 _Unwind_RaiseException(struct _Unwind_Exception *exc)
 {
   struct _Unwind_Context this_context, cur_context;
@@ -184,8 +184,9 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
            return _URC_FATAL_PHASE2_ERROR;
        }
 
-      /* Update cur_context to describe the same frame as fs.  */
-      uw_update_context (context, &fs);
+      /* Update cur_context to describe the same frame as fs, and discard
+        the previous context if necessary.  */
+      uw_advance_context (context, &fs);
     }
 
   return code;
@@ -194,7 +195,7 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
 
 /* Raise an exception for forced unwinding.  */
 
-_Unwind_Reason_Code
+_Unwind_Reason_Code LIBGCC2_UNWIND_ATTRIBUTE
 _Unwind_ForcedUnwind (struct _Unwind_Exception *exc,
                      _Unwind_Stop_Fn stop, void * stop_argument)
 {
@@ -218,7 +219,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc,
 /* Resume propagation of an existing exception.  This is used after
    e.g. executing cleanup code, and not to implement rethrowing.  */
 
-void
+void LIBGCC2_UNWIND_ATTRIBUTE
 _Unwind_Resume (struct _Unwind_Exception *exc)
 {
   struct _Unwind_Context this_context, cur_context;
@@ -243,7 +244,7 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
 /* Resume propagation of an FORCE_UNWIND exception, or to rethrow
    a normal exception that was handled.  */
 
-_Unwind_Reason_Code
+_Unwind_Reason_Code LIBGCC2_UNWIND_ATTRIBUTE
 _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *exc)
 {
   struct _Unwind_Context this_context, cur_context;
@@ -277,7 +278,7 @@ _Unwind_DeleteException (struct _Unwind_Exception *exc)
 
 /* Perform stack backtrace through unwind data.  */
 
-_Unwind_Reason_Code
+_Unwind_Reason_Code LIBGCC2_UNWIND_ATTRIBUTE
 _Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument)
 {
   struct _Unwind_Context context;