X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Funwind%2FRaiseException.c;h=cdf134a942f2150c1d73256d1902737cf3bcda0e;hb=c3646297060ae1629ff1d1b10f648267f0495a0f;hp=66a681dbeb71f27075988cc04d3739cbeb19952c;hpb=0349587920c255c479240518d9c04581977144eb;p=platform%2Fupstream%2Flibunwind.git diff --git a/src/unwind/RaiseException.c b/src/unwind/RaiseException.c index 66a681d..cdf134a 100644 --- a/src/unwind/RaiseException.c +++ b/src/unwind/RaiseException.c @@ -1,6 +1,6 @@ /* libunwind - a platform-independent unwind library Copyright (C) 2003-2004 Hewlett-Packard Co - Contributed by David Mosberger-Tang + Contributed by David Mosberger-Tang 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);