diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-24 14:46:47 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-24 14:46:47 +0000 |
commit | c68b099b2ab366fad3aec65eb17aefd1d9560d75 (patch) | |
tree | 40d181be30a62b741ff60c3fc615a9ba1edb4fe6 /gcc/unwind-generic.h | |
parent | 3efb3a780ba5fb93843a92b6b6bdeeaa9a613ba3 (diff) | |
download | gcc-c68b099b2ab366fad3aec65eb17aefd1d9560d75.tar.gz |
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with
_uleb128_t and _Unwind_SWord with _sleb128_t.
* unwind-dw2.c (extract_cie_info, execute_stack_op, execute_cfa_program,
uw_frame_state_for, uw_update_context_1): Likewise.
* unwind-c.c (parse_lsda_header, PERSONALITY_FUNCTION): Likewise.
* unwind-pe.h (read_uleb128, read_sleb128,
read_encoded_value_with_base): Likewise.
* unwind-generic.h: Define _sleb128_t and _uleb128_t types.
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
* exception.cc (parse_lsda_header, PERSONALITY_FUNCTION): Replaced
_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121116 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unwind-generic.h')
-rw-r--r-- | gcc/unwind-generic.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/unwind-generic.h b/gcc/unwind-generic.h index 3f4c06530ce..1218d8c2b53 100644 --- a/gcc/unwind-generic.h +++ b/gcc/unwind-generic.h @@ -230,6 +230,35 @@ extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); contains it. */ extern void * _Unwind_FindEnclosingFunction (void *pc); +#ifndef __SIZEOF_LONG__ + #error "__SIZEOF_LONG__ macro not defined" +#endif + +#ifndef __SIZEOF_POINTER__ + #error "__SIZEOF_POINTER__ macro not defined" +#endif + + +/* leb128 type numbers have a potentially unlimited size. + The target of the following definitions of _sleb128_t and _uleb128_t + is to have efficient data types large enough to hold the leb128 type + numbers used in the unwind code. + Mostly these types will simply be defined to long and unsigned long + except when a unsigned long data type on the target machine is not + capable of storing a pointer. */ + +#if __SIZEOF_LONG__ < __SIZEOF_POINTER__ +#ifdef HAVE_LONG_LONG + typedef long long _sleb128_t; + typedef unsigned long long _uleb128_t; +#else + #error "long long data type is needed to define _sleb128_t" +#endif +#else + typedef long _sleb128_t; + typedef unsigned long _uleb128_t; +#endif + #ifdef __cplusplus } #endif |