1*7a46fbe4Spfg /************************************************************** 2*7a46fbe4Spfg * 3*7a46fbe4Spfg * Licensed to the Apache Software Foundation (ASF) under one 4*7a46fbe4Spfg * or more contributor license agreements. See the NOTICE file 5*7a46fbe4Spfg * distributed with this work for additional information 6*7a46fbe4Spfg * regarding copyright ownership. The ASF licenses this file 7*7a46fbe4Spfg * to you under the Apache License, Version 2.0 (the 8*7a46fbe4Spfg * "License"); you may not use this file except in compliance 9*7a46fbe4Spfg * with the License. You may obtain a copy of the License at 10*7a46fbe4Spfg * 11*7a46fbe4Spfg * http://www.apache.org/licenses/LICENSE-2.0 12*7a46fbe4Spfg * 13*7a46fbe4Spfg * Unless required by applicable law or agreed to in writing, 14*7a46fbe4Spfg * software distributed under the License is distributed on an 15*7a46fbe4Spfg * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*7a46fbe4Spfg * KIND, either express or implied. See the License for the 17*7a46fbe4Spfg * specific language governing permissions and limitations 18*7a46fbe4Spfg * under the License. 19*7a46fbe4Spfg * 20*7a46fbe4Spfg *************************************************************/ 21*7a46fbe4Spfg 22*7a46fbe4Spfg 23*7a46fbe4Spfg #ifndef _ARM_SHARE_HXX 24*7a46fbe4Spfg #define _ARM_SHARE_HXX 25*7a46fbe4Spfg #include "uno/mapping.h" 26*7a46fbe4Spfg 27*7a46fbe4Spfg #include <typeinfo> 28*7a46fbe4Spfg #include <exception> 29*7a46fbe4Spfg #include <cstddef> 30*7a46fbe4Spfg #include <unwind.h> 31*7a46fbe4Spfg 32*7a46fbe4Spfg namespace CPPU_CURRENT_NAMESPACE 33*7a46fbe4Spfg { 34*7a46fbe4Spfg 35*7a46fbe4Spfg void dummy_can_throw_anything( char const * ); 36*7a46fbe4Spfg 37*7a46fbe4Spfg // -- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h 38*7a46fbe4Spfg 39*7a46fbe4Spfg struct __cxa_exception 40*7a46fbe4Spfg { 41*7a46fbe4Spfg ::std::type_info *exceptionType; 42*7a46fbe4Spfg void (*exceptionDestructor)(void *); 43*7a46fbe4Spfg 44*7a46fbe4Spfg ::std::unexpected_handler unexpectedHandler; 45*7a46fbe4Spfg ::std::terminate_handler terminateHandler; 46*7a46fbe4Spfg 47*7a46fbe4Spfg __cxa_exception *nextException; 48*7a46fbe4Spfg 49*7a46fbe4Spfg int handlerCount; 50*7a46fbe4Spfg #ifdef __ARM_EABI__ 51*7a46fbe4Spfg __cxa_exception *nextPropagatingException; 52*7a46fbe4Spfg int propagationCount; 53*7a46fbe4Spfg #else 54*7a46fbe4Spfg int handlerSwitchValue; 55*7a46fbe4Spfg const unsigned char *actionRecord; 56*7a46fbe4Spfg const unsigned char *languageSpecificData; 57*7a46fbe4Spfg void *catchTemp; 58*7a46fbe4Spfg void *adjustedPtr; 59*7a46fbe4Spfg #endif 60*7a46fbe4Spfg _Unwind_Exception unwindHeader; 61*7a46fbe4Spfg }; 62*7a46fbe4Spfg 63*7a46fbe4Spfg extern "C" void *__cxa_allocate_exception( 64*7a46fbe4Spfg std::size_t thrown_size ) throw(); 65*7a46fbe4Spfg extern "C" void __cxa_throw ( 66*7a46fbe4Spfg void *thrown_exception, std::type_info *tinfo, 67*7a46fbe4Spfg void (*dest) (void *) ) __attribute__((noreturn)); 68*7a46fbe4Spfg 69*7a46fbe4Spfg struct __cxa_eh_globals 70*7a46fbe4Spfg { 71*7a46fbe4Spfg __cxa_exception *caughtExceptions; 72*7a46fbe4Spfg unsigned int uncaughtExceptions; 73*7a46fbe4Spfg #ifdef __ARM_EABI__ 74*7a46fbe4Spfg __cxa_exception *propagatingExceptions; 75*7a46fbe4Spfg #endif 76*7a46fbe4Spfg }; 77*7a46fbe4Spfg extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); 78*7a46fbe4Spfg 79*7a46fbe4Spfg // ----- 80*7a46fbe4Spfg 81*7a46fbe4Spfg //==================================================================== 82*7a46fbe4Spfg void raiseException( 83*7a46fbe4Spfg uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); 84*7a46fbe4Spfg //==================================================================== 85*7a46fbe4Spfg void fillUnoException( 86*7a46fbe4Spfg __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); 87*7a46fbe4Spfg } 88*7a46fbe4Spfg 89*7a46fbe4Spfg namespace arm 90*7a46fbe4Spfg { 91*7a46fbe4Spfg enum armlimits { MAX_GPR_REGS = 4 }; 92*7a46fbe4Spfg bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef ); 93*7a46fbe4Spfg } 94*7a46fbe4Spfg 95*7a46fbe4Spfg #endif 96*7a46fbe4Spfg /* vi:set tabstop=4 shiftwidth=4 expandtab: */ 97