Usermode/libc++ - Exception handling implemented (partially)
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / exception_handling_acxx.h
1 /*
2  * Acess2 C++ Support Library
3  * - By John Hodge (thePowersGang)
4  *
5  * exception_handling_acxx.h
6  * - C++ Exception handling definions from HP's aC++ document
7  *
8  * Reference: http://mentorembedded.github.io/cxx-abi/exceptions.pdf
9  */
10 #ifndef _EXCEPTION_HANLDING_ACXX_H_
11 #define _EXCEPTION_HANLDING_ACXX_H_
12
13 /**
14  * \brief Language Specific Data Area
15  * \note Pointer obtained via _Unwind_GetLanguageSpecificData
16  */
17 struct sLSDA_Header
18 {
19         const void      *Base;
20         uintptr_t       LPStart;
21         uint8_t         TTEncoding;
22         uintptr_t       TypePtrBase;    // base address for type pointers
23         uintptr_t       TTBase; // Base address for type offsets
24         uint8_t CallSiteEncoding;
25         const void      *CallSiteTable;
26         const void      *ActionTable;
27 };
28
29 /* Pointer encodings, from dwarf2.h.  */ 
30 #define DW_EH_PE_absptr         0x00 
31 #define DW_EH_PE_omit           0xff 
32
33 // - Data format (mask with 0x0F)
34 #define DW_EH_PE_fmtmask        0x0F
35 #define DW_EH_PE_uleb128        0x01 
36 #define DW_EH_PE_udata2         0x02 
37 #define DW_EH_PE_udata4         0x03 
38 #define DW_EH_PE_udata8         0x04 
39 #define DW_EH_PE_sleb128        0x09 
40 #define DW_EH_PE_sdata2         0x0A 
41 #define DW_EH_PE_sdata4         0x0B 
42 #define DW_EH_PE_sdata8         0x0C 
43 #define DW_EH_PE_signed         0x08 
44 // - Data maipulation (0x70)
45 #define DW_EH_PE_relmask        0x70
46 #define DW_EH_PE_pcrel          0x10 
47 #define DW_EH_PE_textrel        0x20 
48 #define DW_EH_PE_datarel        0x30 
49 #define DW_EH_PE_funcrel        0x40 
50 #define DW_EH_PE_aligned        0x50 
51  
52 #define DW_EH_PE_indirect       0x80 
53
54 typedef uint64_t        leb128u_t;
55 typedef  int64_t        leb128s_t;
56
57
58 #endif
59

UCC git Repository :: git.ucc.asn.au