Welcome to the NetCologne GmbH open source mirroring service!

This machine mirrors various open-source projects. 20 Gbit/s uplink.

If there are any issues or you want another project mirrored, please contact mirror-service -=AT=- netcologne DOT de !

Comma: lib/runtime/crt_exceptions.c File Reference

lib/runtime/crt_exceptions.c File Reference

#include "comma/runtime/commart.h"
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  _Unwind_Exception
struct  LSDA_Header
struct  Call_Site
struct  Action_Record
struct  comma_exception

Defines

#define __STDC_FORMAT_MACROS

Typedefs

typedef void(* _Unwind_Exception_Cleanup_Fn )(_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
typedef int _Unwind_Action

Enumerations

enum  _Unwind_Reason_Code {
  _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
}
enum  Dwarf_Encoding {
  DW_EH_PE_omit = 0xFF, DW_EH_PE_uleb128 = 0x01, DW_EH_PE_udata2 = 0x02, DW_EH_PE_udata4 = 0x03,
  DW_EH_PE_udata8 = 0x04, DW_EH_PE_sleb128 = 0x09, DW_EH_PE_sdata2 = 0x0A, DW_EH_PE_sdata4 = 0x0B,
  DW_EH_PE_sdata8 = 0x0C
}
enum  Dwarf_Application { DW_EH_PE_absptr = 0x00, DW_EH_PE_pcrel = 0x10, DW_EH_PE_datarel = 0x30 }
enum  comma_exception_flag { COMMA_DYN_MESSAGE = 1 << 0 }

Functions

_Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *exception_object)
void _Unwind_Resume (struct _Unwind_Exception *exception_object)
uintptr_t _Unwind_GetLanguageSpecificData (struct _Unwind_Context *context)
uintptr_t _Unwind_GetRegionStart (struct _Unwind_Context *context)
uintptr_t _Unwind_GetIP (struct _Unwind_Context *context)
void _Unwind_SetGR (struct _Unwind_Context *context, int reg, uintptr_t value)
void _Unwind_SetIP (struct _Unwind_Context *context, uintptr_t IP)
static unsigned char * parse_uleb128 (unsigned char *start, uint64_t *value)
static unsigned char * parse_sleb128 (unsigned char *start, int64_t *value)
static unsigned char * parse_dwarf_value (Dwarf_Encoding ID, unsigned char *start, uint64_t *value)
static void fatal_error (const char *message)
struct comma_exceptionto_comma_exception (struct _Unwind_Exception *header)
struct _Unwind_Exceptionto_Unwind_Exception (struct comma_exception *exception)
static int parse_LSDA (struct _Unwind_Context *context, struct LSDA_Header *lsda)
static void dump_LSDA (struct LSDA_Header *lsda)
static unsigned char * parse_Call_Site (struct LSDA_Header *lsda, unsigned char *ptr, struct Call_Site *dst)
static void dump_Call_Site (struct Call_Site *site)
static unsigned char * parse_Action_Record (unsigned char *ptr, struct Action_Record *dst)
static int find_applicable_call_site (struct LSDA_Header *lsda, struct _Unwind_Context *context, struct Call_Site *dst)
static int match_exception (struct LSDA_Header *lsda, struct _Unwind_Exception *exceptionObject, uint64_t action_index, uint64_t *dst)
static void install_handler (struct _Unwind_Context *context, struct _Unwind_Exception *exceptionObject, int64_t landing_pad, uintptr_t id)
static void _comma_cleanup_exception (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
void _comma_raise_exception (comma_exinfo_t info, const char *file_name, uint32_t line_number, const char *message)
void _comma_raise_nexception (comma_exinfo_t info, const char *file_name, uint32_t line_number, const char *message, uint32_t length)
void _comma_reraise_exception (struct comma_exception *exception)
void _comma_raise_system (uint32_t id, const char *file_name, uint32_t line_number, const char *message)
_Unwind_Reason_Code _comma_eh_personality (int version, _Unwind_Action actions, uint64_t exceptionClass, struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context)
void _comma_unhandled_exception (struct comma_exception *exception)
comma_exinfo_t _comma_get_exception (comma_exception_id id)

Variables

static const _Unwind_Action _UA_SEARCH_PHASE = 1
static const _Unwind_Action _UA_CLEANUP_PHASE = 2
static const _Unwind_Action _UA_HANDLER_FRAME = 4
static const _Unwind_Action _UA_FORCE_UNWIND = 8
static const uint64_t Comma_Exception_Class_ID = 0x534D570434D410Ull
char * _comma_exinfo_program_error = "PROGRAM_ERROR"
char * _comma_exinfo_constraint_error = "CONSTRAINT_ERROR"
char * _comma_exinfo_assertion_error = "ASSERTION_ERROR"

Define Documentation

#define __STDC_FORMAT_MACROS

Definition at line 20 of file crt_exceptions.c.


Typedef Documentation

typedef int _Unwind_Action

Definition at line 106 of file crt_exceptions.c.

Definition at line 49 of file crt_exceptions.c.


Enumeration Type Documentation

Enumerator:
_URC_NO_REASON 
_URC_FOREIGN_EXCEPTION_CAUGHT 
_URC_FATAL_PHASE2_ERROR 
_URC_FATAL_PHASE1_ERROR 
_URC_NORMAL_STOP 
_URC_END_OF_STACK 
_URC_HANDLER_FOUND 
_URC_INSTALL_CONTEXT 
_URC_CONTINUE_UNWIND 

Definition at line 33 of file crt_exceptions.c.

Enumerator:
COMMA_DYN_MESSAGE 

Definition at line 512 of file crt_exceptions.c.

Enumerator:
DW_EH_PE_absptr 
DW_EH_PE_pcrel 
DW_EH_PE_datarel 

Definition at line 139 of file crt_exceptions.c.

Enumerator:
DW_EH_PE_omit 
DW_EH_PE_uleb128 
DW_EH_PE_udata2 
DW_EH_PE_udata4 
DW_EH_PE_udata8 
DW_EH_PE_sleb128 
DW_EH_PE_sdata2 
DW_EH_PE_sdata4 
DW_EH_PE_sdata8 

Definition at line 127 of file crt_exceptions.c.


Function Documentation

static void _comma_cleanup_exception ( _Unwind_Reason_Code  reason,
struct _Unwind_Exception exc 
) [static]

Definition at line 912 of file crt_exceptions.c.

_Unwind_Reason_Code _comma_eh_personality ( int  version,
_Unwind_Action  actions,
uint64_t  exceptionClass,
struct _Unwind_Exception exceptionObject,
struct _Unwind_Context *  context 
)

Definition at line 1026 of file crt_exceptions.c.

comma_exinfo_t _comma_get_exception ( comma_exception_id  id  ) 

Definition at line 1151 of file crt_exceptions.c.

void _comma_raise_exception ( comma_exinfo_t  info,
const char *  file_name,
uint32_t  line_number,
const char *  message 
)

Definition at line 925 of file crt_exceptions.c.

void _comma_raise_nexception ( comma_exinfo_t  info,
const char *  file_name,
uint32_t  line_number,
const char *  message,
uint32_t  length 
)

Definition at line 961 of file crt_exceptions.c.

void _comma_raise_system ( uint32_t  id,
const char *  file_name,
uint32_t  line_number,
const char *  message 
)

Definition at line 1014 of file crt_exceptions.c.

void _comma_reraise_exception ( struct comma_exception exception  ) 

Definition at line 1005 of file crt_exceptions.c.

void _comma_unhandled_exception ( struct comma_exception exception  ) 

Definition at line 1124 of file crt_exceptions.c.

uintptr_t _Unwind_GetIP ( struct _Unwind_Context *  context  ) 
uintptr_t _Unwind_GetLanguageSpecificData ( struct _Unwind_Context *  context  ) 
uintptr_t _Unwind_GetRegionStart ( struct _Unwind_Context *  context  ) 
_Unwind_Reason_Code _Unwind_RaiseException ( struct _Unwind_Exception exception_object  ) 
void _Unwind_Resume ( struct _Unwind_Exception exception_object  ) 
void _Unwind_SetGR ( struct _Unwind_Context *  context,
int  reg,
uintptr_t  value 
)
void _Unwind_SetIP ( struct _Unwind_Context *  context,
uintptr_t  IP 
)
static void dump_Call_Site ( struct Call_Site site  )  [static]

Definition at line 686 of file crt_exceptions.c.

static void dump_LSDA ( struct LSDA_Header lsda  )  [static]

Definition at line 625 of file crt_exceptions.c.

static void fatal_error ( const char *  message  )  [static]

Definition at line 501 of file crt_exceptions.c.

static int find_applicable_call_site ( struct LSDA_Header lsda,
struct _Unwind_Context *  context,
struct Call_Site dst 
) [static]

Definition at line 736 of file crt_exceptions.c.

static void install_handler ( struct _Unwind_Context *  context,
struct _Unwind_Exception exceptionObject,
int64_t  landing_pad,
uintptr_t  id 
) [static]

Definition at line 874 of file crt_exceptions.c.

static int match_exception ( struct LSDA_Header lsda,
struct _Unwind_Exception exceptionObject,
uint64_t  action_index,
uint64_t *  dst 
) [static]

Definition at line 794 of file crt_exceptions.c.

static unsigned char* parse_Action_Record ( unsigned char *  ptr,
struct Action_Record dst 
) [static]

Definition at line 702 of file crt_exceptions.c.

static unsigned char* parse_Call_Site ( struct LSDA_Header lsda,
unsigned char *  ptr,
struct Call_Site dst 
) [static]

Definition at line 654 of file crt_exceptions.c.

static unsigned char* parse_dwarf_value ( Dwarf_Encoding  ID,
unsigned char *  start,
uint64_t *  value 
) [static]

Definition at line 227 of file crt_exceptions.c.

static int parse_LSDA ( struct _Unwind_Context *  context,
struct LSDA_Header lsda 
) [static]

Definition at line 553 of file crt_exceptions.c.

static unsigned char* parse_sleb128 ( unsigned char *  start,
int64_t *  value 
) [static]

Definition at line 183 of file crt_exceptions.c.

static unsigned char* parse_uleb128 ( unsigned char *  start,
uint64_t *  value 
) [static]

Definition at line 159 of file crt_exceptions.c.

struct comma_exception* to_comma_exception ( struct _Unwind_Exception header  )  [read]

Definition at line 536 of file crt_exceptions.c.

struct _Unwind_Exception* to_Unwind_Exception ( struct comma_exception exception  )  [read]

Definition at line 544 of file crt_exceptions.c.


Variable Documentation

char* _comma_exinfo_assertion_error = "ASSERTION_ERROR"

Definition at line 1146 of file crt_exceptions.c.

char* _comma_exinfo_constraint_error = "CONSTRAINT_ERROR"

Definition at line 1145 of file crt_exceptions.c.

char* _comma_exinfo_program_error = "PROGRAM_ERROR"

Definition at line 1144 of file crt_exceptions.c.

const _Unwind_Action _UA_CLEANUP_PHASE = 2 [static]

Definition at line 108 of file crt_exceptions.c.

const _Unwind_Action _UA_FORCE_UNWIND = 8 [static]

Definition at line 110 of file crt_exceptions.c.

const _Unwind_Action _UA_HANDLER_FRAME = 4 [static]

Definition at line 109 of file crt_exceptions.c.

const _Unwind_Action _UA_SEARCH_PHASE = 1 [static]

Definition at line 107 of file crt_exceptions.c.

const uint64_t Comma_Exception_Class_ID = 0x534D570434D410Ull [static]

Definition at line 907 of file crt_exceptions.c.


Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1