1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/compsupp/symaehabi/unwinder.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,128 @@
1.4 +/* unwinder.h
1.5 + *
1.6 + * Copyright 2002-2005 ARM Limited. All rights reserved.
1.7 + *
1.8 + * Your rights to use this code are set out in the accompanying licence
1.9 + * text file LICENCE.txt (ARM contract number LEC-ELA-00080 v2.0).
1.10 + */
1.11 +/*
1.12 + * RCS $Revision: 91721 $
1.13 + * Checkin $Date: 2005-08-08 19:30:07 +0100 (Mon, 08 Aug 2005) $
1.14 + * Revising $Author: drodgman $
1.15 + */
1.16 +
1.17 +/* Language-independent unwinder header public defines */
1.18 +
1.19 +#ifndef UNWINDER_H
1.20 +#define UNWINDER_H
1.21 +
1.22 +#ifdef __cplusplus
1.23 +extern "C" {
1.24 +#endif
1.25 +
1.26 + typedef enum {
1.27 + _URC_OK = 0, /* operation completed successfully */
1.28 + _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
1.29 + _URC_HANDLER_FOUND = 6,
1.30 + _URC_INSTALL_CONTEXT = 7,
1.31 + _URC_CONTINUE_UNWIND = 8,
1.32 + _URC_FAILURE = 9 /* unspecified failure of some kind */
1.33 + } _Unwind_Reason_Code;
1.34 +
1.35 + typedef enum {
1.36 + _US_VIRTUAL_UNWIND_FRAME = 0,
1.37 + _US_UNWIND_FRAME_STARTING = 1,
1.38 + _US_UNWIND_FRAME_RESUME = 2
1.39 + } _Unwind_State;
1.40 +
1.41 + typedef struct _Unwind_Control_Block _Unwind_Control_Block;
1.42 + typedef struct _Unwind_Context _Unwind_Context;
1.43 + typedef uint32_t _Unwind_EHT_Header;
1.44 +
1.45 +
1.46 + /* UCB: */
1.47 +
1.48 + struct _Unwind_Control_Block {
1.49 + char exception_class[8];
1.50 + void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
1.51 + /* Unwinder cache, private fields for the unwinder's use */
1.52 + struct {
1.53 + uint32_t reserved1; /* init reserved1 to 0, then don't touch */
1.54 + uint32_t reserved2;
1.55 + uint32_t reserved3;
1.56 + uint32_t reserved4;
1.57 + uint32_t reserved5;
1.58 + } unwinder_cache;
1.59 + /* Propagation barrier cache (valid after phase 1): */
1.60 + struct {
1.61 + uint32_t sp;
1.62 + uint32_t bitpattern[5];
1.63 + } barrier_cache;
1.64 + /* Cleanup cache (preserved over cleanup): */
1.65 + struct {
1.66 + uint32_t bitpattern[4];
1.67 + } cleanup_cache;
1.68 + /* Pr cache (for pr's benefit): */
1.69 + struct {
1.70 + uint32_t fnstart; /* function start address */
1.71 + _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
1.72 + uint32_t additional; /* additional data */
1.73 + uint32_t reserved1;
1.74 + } pr_cache;
1.75 + long long int :0; /* Force alignment of next item to 8-byte boundary */
1.76 + };
1.77 +
1.78 + /* Interface functions: */
1.79 +
1.80 + _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
1.81 + NORETURNDECL void _Unwind_Resume(_Unwind_Control_Block *ucbp);
1.82 + void _Unwind_Complete(_Unwind_Control_Block *ucbp);
1.83 + void _Unwind_DeleteException(_Unwind_Control_Block *ucbp);
1.84 +
1.85 + /* Virtual Register Set*/
1.86 +
1.87 + typedef enum {
1.88 + _UVRSC_CORE = 0, /* integer register */
1.89 + _UVRSC_VFP = 1, /* vfp */
1.90 + /* 2: was fpa (obsolete) */
1.91 + _UVRSC_WMMXD = 3, /* Intel WMMX data register */
1.92 + _UVRSC_WMMXC = 4 /* Intel WMMX control register */
1.93 + } _Unwind_VRS_RegClass;
1.94 +
1.95 + typedef enum {
1.96 + _UVRSD_UINT32 = 0,
1.97 + _UVRSD_VFPX = 1,
1.98 + /* 2: was fpa (obsolete) */
1.99 + _UVRSD_UINT64 = 3,
1.100 + _UVRSD_FLOAT = 4,
1.101 + _UVRSD_DOUBLE = 5
1.102 + } _Unwind_VRS_DataRepresentation;
1.103 +
1.104 + typedef enum {
1.105 + _UVRSR_OK = 0,
1.106 + _UVRSR_NOT_IMPLEMENTED = 1,
1.107 + _UVRSR_FAILED = 2
1.108 + } _Unwind_VRS_Result;
1.109 +
1.110 + IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *context,
1.111 + _Unwind_VRS_RegClass regclass,
1.112 + uint32_t regno,
1.113 + _Unwind_VRS_DataRepresentation representation,
1.114 + void *valuep);
1.115 +
1.116 + IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context,
1.117 + _Unwind_VRS_RegClass regclass,
1.118 + uint32_t regno,
1.119 + _Unwind_VRS_DataRepresentation representation,
1.120 + void *valuep);
1.121 +
1.122 + IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context,
1.123 + _Unwind_VRS_RegClass regclass,
1.124 + uint32_t descriminator,
1.125 + _Unwind_VRS_DataRepresentation representation);
1.126 +
1.127 +#ifdef __cplusplus
1.128 +} /* extern "C" */
1.129 +#endif
1.130 +
1.131 +#endif /* defined UNWINDER_H */