Normalize TRY_CATCH exception handling block
[binutils-gdb.git] / gdb / frame-unwind.c
index e73650a91c2b0d70f0ca6082f06e8a267038408a..fcfedfdc706c0614b50538a818e86252f3511c66 100644 (file)
@@ -105,18 +105,21 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache,
     {
       res = unwinder->sniffer (unwinder, this_frame, this_cache);
     }
-  if (ex.reason < 0 && ex.error == NOT_AVAILABLE_ERROR)
+  if (ex.reason < 0)
     {
-      /* This usually means that not even the PC is available,
-        thus most unwinders aren't able to determine if they're
-        the best fit.  Keep trying.  Fallback prologue unwinders
-        should always accept the frame.  */
-      do_cleanups (old_cleanup);
-      return 0;
+      if (ex.error == NOT_AVAILABLE_ERROR)
+       {
+         /* This usually means that not even the PC is available,
+            thus most unwinders aren't able to determine if they're
+            the best fit.  Keep trying.  Fallback prologue unwinders
+            should always accept the frame.  */
+         do_cleanups (old_cleanup);
+         return 0;
+       }
+      throw_exception (ex);
     }
-  else if (ex.reason < 0)
-    throw_exception (ex);
-  else if (res)
+
+  if (res)
     {
       discard_cleanups (old_cleanup);
       return 1;