Formatting fixes.
We should clang-format the whole thing when we finally move the unwinder to its new home. llvm-svn: 228360
This commit is contained in:
parent
d88e51ced7
commit
b98c20cf7c
|
|
@ -47,23 +47,23 @@ const char* getNextNibble(const char* data, uint32_t* out) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Descriptor {
|
struct Descriptor {
|
||||||
// See # 9.2
|
// See # 9.2
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SU16 = 0, // Short descriptor, 16-bit entries
|
SU16 = 0, // Short descriptor, 16-bit entries
|
||||||
LU16 = 1, // Long descriptor, 16-bit entries
|
LU16 = 1, // Long descriptor, 16-bit entries
|
||||||
LU32 = 3, // Long descriptor, 32-bit entries
|
LU32 = 3, // Long descriptor, 32-bit entries
|
||||||
RESERVED0 = 4, RESERVED1 = 5, RESERVED2 = 6, RESERVED3 = 7,
|
RESERVED0 = 4, RESERVED1 = 5, RESERVED2 = 6, RESERVED3 = 7,
|
||||||
RESERVED4 = 8, RESERVED5 = 9, RESERVED6 = 10, RESERVED7 = 11,
|
RESERVED4 = 8, RESERVED5 = 9, RESERVED6 = 10, RESERVED7 = 11,
|
||||||
RESERVED8 = 12, RESERVED9 = 13, RESERVED10 = 14, RESERVED11 = 15
|
RESERVED8 = 12, RESERVED9 = 13, RESERVED10 = 14, RESERVED11 = 15
|
||||||
} Format;
|
} Format;
|
||||||
|
|
||||||
// See # 9.2
|
// See # 9.2
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CLEANUP = 0x0,
|
CLEANUP = 0x0,
|
||||||
FUNC = 0x1,
|
FUNC = 0x1,
|
||||||
CATCH = 0x2,
|
CATCH = 0x2,
|
||||||
INVALID = 0x4
|
INVALID = 0x4
|
||||||
} Kind;
|
} Kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
_Unwind_Reason_Code ProcessDescriptors(
|
_Unwind_Reason_Code ProcessDescriptors(
|
||||||
|
|
@ -133,7 +133,7 @@ _Unwind_Reason_Code ProcessDescriptors(
|
||||||
landing_pad = signExtendPrel31(landing_pad & ~0x80000000);
|
landing_pad = signExtendPrel31(landing_pad & ~0x80000000);
|
||||||
if (landing_pad == 0xffffffff) {
|
if (landing_pad == 0xffffffff) {
|
||||||
return _URC_HANDLER_FOUND;
|
return _URC_HANDLER_FOUND;
|
||||||
} else if (landing_pad == 0xfffffffe ) {
|
} else if (landing_pad == 0xfffffffe) {
|
||||||
return _URC_FAILURE;
|
return _URC_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
|
@ -152,7 +152,7 @@ _Unwind_Reason_Code ProcessDescriptors(
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
_LIBUNWIND_ABORT("Invalid descriptor kind found.");
|
_LIBUNWIND_ABORT("Invalid descriptor kind found.");
|
||||||
};
|
}
|
||||||
|
|
||||||
getNextWord(descriptor, &descriptorWord);
|
getNextWord(descriptor, &descriptorWord);
|
||||||
}
|
}
|
||||||
|
|
@ -948,7 +948,7 @@ _Unwind_VRS_Result _Unwind_VRS_Pop(
|
||||||
return _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
|
return _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
|
||||||
&sp);
|
&sp);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Called by personality handler during phase 2 to find the start of the
|
/// Called by personality handler during phase 2 to find the start of the
|
||||||
|
|
@ -961,7 +961,7 @@ _Unwind_GetRegionStart(struct _Unwind_Context *context) {
|
||||||
if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
|
if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
|
||||||
result = (uintptr_t)frameInfo.start_ip;
|
result = (uintptr_t)frameInfo.start_ip;
|
||||||
_LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX\n",
|
_LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX\n",
|
||||||
context, (long long)result);
|
context, (long long)result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -971,7 +971,7 @@ _Unwind_GetRegionStart(struct _Unwind_Context *context) {
|
||||||
_LIBUNWIND_EXPORT void
|
_LIBUNWIND_EXPORT void
|
||||||
_Unwind_DeleteException(_Unwind_Exception *exception_object) {
|
_Unwind_DeleteException(_Unwind_Exception *exception_object) {
|
||||||
_LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n",
|
_LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n",
|
||||||
exception_object);
|
exception_object);
|
||||||
if (exception_object->exception_cleanup != NULL)
|
if (exception_object->exception_cleanup != NULL)
|
||||||
(*exception_object->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT,
|
(*exception_object->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT,
|
||||||
exception_object);
|
exception_object);
|
||||||
|
|
|
||||||
|
|
@ -258,12 +258,10 @@ __cxa_get_exception_ptr(void* unwind_exception) throw()
|
||||||
{
|
{
|
||||||
#if LIBCXXABI_ARM_EHABI
|
#if LIBCXXABI_ARM_EHABI
|
||||||
return reinterpret_cast<void*>(
|
return reinterpret_cast<void*>(
|
||||||
static_cast<_Unwind_Control_Block*>(unwind_exception)->barrier_cache.bitpattern[0]);
|
static_cast<_Unwind_Control_Block*>(unwind_exception)->barrier_cache.bitpattern[0]);
|
||||||
#else
|
#else
|
||||||
return cxa_exception_from_exception_unwind_exception
|
return cxa_exception_from_exception_unwind_exception(
|
||||||
(
|
static_cast<_Unwind_Exception*>(unwind_exception))->adjustedPtr;
|
||||||
static_cast<_Unwind_Exception*>(unwind_exception)
|
|
||||||
)->adjustedPtr;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ namespace __cxxabiv1 {
|
||||||
|
|
||||||
static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
|
static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
|
||||||
static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
|
static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
|
||||||
static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
|
static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
|
||||||
|
|
||||||
struct __cxa_exception {
|
struct __cxa_exception {
|
||||||
#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
|
#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
|
||||||
// This is a new field to support C++ 0x exception_ptr.
|
// This is a new field to support C++ 0x exception_ptr.
|
||||||
// For binary compatibility it is at the start of this
|
// For binary compatibility it is at the start of this
|
||||||
|
|
@ -34,10 +34,10 @@ struct __cxa_exception {
|
||||||
// __cxa_allocate_exception.
|
// __cxa_allocate_exception.
|
||||||
size_t referenceCount;
|
size_t referenceCount;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Manage the exception object itself.
|
// Manage the exception object itself.
|
||||||
std::type_info *exceptionType;
|
std::type_info *exceptionType;
|
||||||
void (*exceptionDestructor)(void *);
|
void (*exceptionDestructor)(void *);
|
||||||
std::unexpected_handler unexpectedHandler;
|
std::unexpected_handler unexpectedHandler;
|
||||||
std::terminate_handler terminateHandler;
|
std::terminate_handler terminateHandler;
|
||||||
|
|
||||||
|
|
@ -73,16 +73,16 @@ struct __cxa_dependent_exception {
|
||||||
#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
|
#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
|
||||||
void* primaryException;
|
void* primaryException;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::type_info *exceptionType;
|
std::type_info *exceptionType;
|
||||||
void (*exceptionDestructor)(void *);
|
void (*exceptionDestructor)(void *);
|
||||||
std::unexpected_handler unexpectedHandler;
|
std::unexpected_handler unexpectedHandler;
|
||||||
std::terminate_handler terminateHandler;
|
std::terminate_handler terminateHandler;
|
||||||
|
|
||||||
__cxa_exception *nextException;
|
__cxa_exception *nextException;
|
||||||
|
|
||||||
int handlerCount;
|
int handlerCount;
|
||||||
|
|
||||||
#if LIBCXXABI_ARM_EHABI
|
#if LIBCXXABI_ARM_EHABI
|
||||||
__cxa_exception* nextPropagatingException;
|
__cxa_exception* nextPropagatingException;
|
||||||
int propagationCount;
|
int propagationCount;
|
||||||
|
|
@ -93,7 +93,7 @@ struct __cxa_dependent_exception {
|
||||||
void * catchTemp;
|
void * catchTemp;
|
||||||
void *adjustedPtr;
|
void *adjustedPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
|
#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
|
||||||
void* primaryException;
|
void* primaryException;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue