]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgcc/unwind.inc
libgcc: Fix up _BitInt division [PR113604]
[thirdparty/gcc.git] / libgcc / unwind.inc
index 456a5ee682f4faff74321e3b0aface59e10c8616..40381bf2dadc676320c4ad4583a3fd703092709c 100644 (file)
@@ -1,5 +1,5 @@
 /* Exception handling and frame unwind runtime interface routines. -*- C -*-
-   Copyright (C) 2001-2021 Free Software Foundation, Inc.
+   Copyright (C) 2001-2024 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -73,7 +73,7 @@ _Unwind_RaiseException_Phase2(struct _Unwind_Exception *exc,
       gcc_assert (!match_handler);
 
       uw_update_context (context, &fs);
-      _Unwind_Frames_Increment (context, frames);
+      _Unwind_Frames_Increment (exc, context, frames);
     }
 
   *frames_p = frames;
@@ -160,12 +160,13 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
 
       /* Set up fs to describe the FDE for the caller of cur_context.  */
       code = uw_frame_state_for (context, &fs);
-      if (code != _URC_NO_REASON && code != _URC_END_OF_STACK)
+      if (code != _URC_NO_REASON && code != _URC_END_OF_STACK
+         && code != _URC_NORMAL_STOP)
        return _URC_FATAL_PHASE2_ERROR;
 
       /* Unwind successful.  */
       action = _UA_FORCE_UNWIND | _UA_CLEANUP_PHASE;
-      if (code == _URC_END_OF_STACK)
+      if (code == _URC_END_OF_STACK || code == _URC_NORMAL_STOP)
        action |= _UA_END_OF_STACK;
       stop_code = (*stop) (1, action, exc->exception_class, exc,
                           context, stop_argument);
@@ -190,7 +191,7 @@ _Unwind_ForcedUnwind_Phase2 (struct _Unwind_Exception *exc,
       /* Update cur_context to describe the same frame as fs, and discard
         the previous context if necessary.  */
       uw_advance_context (context, &fs);
-      _Unwind_Frames_Increment (context, frames);
+      _Unwind_Frames_Increment (exc, context, frames);
     }
 
   *frames_p = frames;