Imported Upstream version 1.2
[platform/upstream/libunwind.git] / src / unwind / RaiseException.c
index 66a681d..cdf134a 100644 (file)
@@ -1,6 +1,6 @@
 /* libunwind - a platform-independent unwind library
    Copyright (C) 2003-2004 Hewlett-Packard Co
-       Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+        Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
 This file is part of libunwind.
 
@@ -47,36 +47,36 @@ _Unwind_RaiseException (struct _Unwind_Exception *exception_object)
   while (1)
     {
       if ((ret = unw_step (&context.cursor)) <= 0)
-       {
-         if (ret == 0)
-           {
-             Debug (1, "no handler found\n");
-             return _URC_END_OF_STACK;
-           }
-         else
-           return _URC_FATAL_PHASE1_ERROR;
-       }
+        {
+          if (ret == 0)
+            {
+              Debug (1, "no handler found\n");
+              return _URC_END_OF_STACK;
+            }
+          else
+            return _URC_FATAL_PHASE1_ERROR;
+        }
 
       if (unw_get_proc_info (&context.cursor, &pi) < 0)
-       return _URC_FATAL_PHASE1_ERROR;
+        return _URC_FATAL_PHASE1_ERROR;
 
       personality = (_Unwind_Personality_Fn) (uintptr_t) pi.handler;
       if (personality)
-       {
-         reason = (*personality) (_U_VERSION, _UA_SEARCH_PHASE,
-                                  exception_class, exception_object,
-                                  &context);
-         if (reason != _URC_CONTINUE_UNWIND)
-           {
-             if (reason == _URC_HANDLER_FOUND)
-               break;
-             else
-               {
-                 Debug (1, "personality returned %d\n", reason);
-                 return _URC_FATAL_PHASE1_ERROR;
-               }
-           }
-       }
+        {
+          reason = (*personality) (_U_VERSION, _UA_SEARCH_PHASE,
+                                   exception_class, exception_object,
+                                   &context);
+          if (reason != _URC_CONTINUE_UNWIND)
+            {
+              if (reason == _URC_HANDLER_FOUND)
+                break;
+              else
+                {
+                  Debug (1, "personality returned %d\n", reason);
+                  return _URC_FATAL_PHASE1_ERROR;
+                }
+            }
+        }
     }
 
   /* Exceptions are associated with IP-ranges.  If a given exception
@@ -86,8 +86,8 @@ _Unwind_RaiseException (struct _Unwind_Exception *exception_object)
      the exception.  */
   if (unw_get_reg (&context.cursor, UNW_REG_IP, &ip) < 0)
     return _URC_FATAL_PHASE1_ERROR;
-  exception_object->private_1 = 0;     /* clear "stop" pointer */
-  exception_object->private_2 = ip;    /* save frame marker */
+  exception_object->private_1 = 0;      /* clear "stop" pointer */
+  exception_object->private_2 = ip;     /* save frame marker */
 
   Debug (1, "found handler for IP=%lx; entering cleanup phase\n", (long) ip);