 b029fb598a
			
		
	
	
		b029fb598a
		
	
	
	
	
		
			
			existing libunwind used '0' in lsda_encoding as 'not present,'
whereas that is a valid encoding and does occur and would be
ignored. a missing encoding is actually 0xff.
The commit that addresses this is:
commit 8d4b51028d1a12b58d616f4b605254a877caafcf
Author: joerg <joerg>
Date:   Tue Mar 11 23:52:17 2014 +0000
    0 is a valid LSDA encoding and can be seen in statically linked
    programs. Initialize lsdaEncoding to DW_EH_PE_omit and check for that
    value to decide whether a value should be decoded.
more bugfixes are necessary. this update is up to:
commit b1f513eedd332426d88acbb118b6e9070966dcb9
Author: joerg <joerg>
Date:   Wed May 14 22:13:36 2014 +0000
    Lazy VFP processing works a lot better if the functions contain a return
    instruction.
		
	
			
		
			
				
	
	
		
			91 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| //===------------------------------- unwind.h -----------------------------===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is dual licensed under the MIT and the University of Illinois Open
 | |
| // Source Licenses. See LICENSE.TXT for details.
 | |
| //
 | |
| //
 | |
| // C++ ABI Level 1 ABI documented at:
 | |
| //   http://mentorembedded.github.io/cxx-abi/abi-eh.html
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #ifndef _UNWIND_H
 | |
| #define _UNWIND_H
 | |
| 
 | |
| #include <stdint.h>
 | |
| #include <stddef.h>
 | |
| 
 | |
| typedef enum {
 | |
|   _URC_NO_REASON = 0,
 | |
|   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 | |
|   _URC_FATAL_PHASE2_ERROR = 2,
 | |
|   _URC_FATAL_PHASE1_ERROR = 3,
 | |
|   _URC_NORMAL_STOP = 4,
 | |
|   _URC_END_OF_STACK = 5,
 | |
|   _URC_HANDLER_FOUND = 6,
 | |
|   _URC_INSTALL_CONTEXT = 7,
 | |
|   _URC_CONTINUE_UNWIND = 8
 | |
| } _Unwind_Reason_Code;
 | |
| 
 | |
| typedef enum {
 | |
|   _UA_SEARCH_PHASE = 1,
 | |
|   _UA_CLEANUP_PHASE = 2,
 | |
|   _UA_HANDLER_FRAME = 4,
 | |
|   _UA_FORCE_UNWIND = 8,
 | |
|   _UA_END_OF_STACK = 16 /* GCC extension */
 | |
| } _Unwind_Action;
 | |
| 
 | |
| struct _Unwind_Context;
 | |
| 
 | |
| struct _Unwind_Exception {
 | |
|   uint64_t exception_class;
 | |
|   void (*exception_cleanup)(_Unwind_Reason_Code, struct _Unwind_Exception *);
 | |
|   uintptr_t private_1;
 | |
|   uintptr_t private_2;
 | |
| } __attribute__((__aligned__));
 | |
| 
 | |
| typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)(int, _Unwind_Action, uint64_t,
 | |
|                                                struct _Unwind_Exception *,
 | |
|                                                struct _Unwind_Context *,
 | |
|                                                void *);
 | |
| 
 | |
| typedef _Unwind_Reason_Code (*__personality_routine)(int, _Unwind_Action,
 | |
|                                                      uint64_t,
 | |
|                                                      struct _Unwind_Exception *,
 | |
|                                                      struct _Unwind_Context *);
 | |
| 
 | |
| __BEGIN_DECLS
 | |
| 
 | |
| _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *);
 | |
| void _Unwind_Resume(struct _Unwind_Exception *) __dead;
 | |
| _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *);
 | |
| _Unwind_Reason_Code _Unwind_ForcedUnwind(struct _Unwind_Exception *,
 | |
|                                          _Unwind_Stop_Fn, void *);
 | |
| void _Unwind_DeleteException(struct _Unwind_Exception *);
 | |
| uintptr_t _Unwind_GetGR(struct _Unwind_Context *, int);
 | |
| void _Unwind_SetGR(struct _Unwind_Context *, int, uintptr_t);
 | |
| uintptr_t _Unwind_GetIP(struct _Unwind_Context *);
 | |
| uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
 | |
| uintptr_t _Unwind_GetCFA(struct _Unwind_Context *);
 | |
| void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t);
 | |
| uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *);
 | |
| uintptr_t _Unwind_GetLanguageSpecificData(struct _Unwind_Context *);
 | |
| uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *);
 | |
| uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *);
 | |
| 
 | |
| typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *,
 | |
|                                                 void *);
 | |
| _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
 | |
| void *_Unwind_FindEnclosingFunction(void *);
 | |
| 
 | |
| void __register_frame(const void *);
 | |
| void __register_frame_info(const void *, void *);
 | |
| void __deregister_frame(const void *);
 | |
| void *__deregister_frame_info(const void *);
 | |
| 
 | |
| __END_DECLS
 | |
| 
 | |
| #endif // _UNWIND_H
 |