176cf6069SPedro Giffuni /************************************************************** 276cf6069SPedro Giffuni * 376cf6069SPedro Giffuni * Licensed to the Apache Software Foundation (ASF) under one 476cf6069SPedro Giffuni * or more contributor license agreements. See the NOTICE file 576cf6069SPedro Giffuni * distributed with this work for additional information 676cf6069SPedro Giffuni * regarding copyright ownership. The ASF licenses this file 776cf6069SPedro Giffuni * to you under the Apache License, Version 2.0 (the 876cf6069SPedro Giffuni * "License"); you may not use this file except in compliance 976cf6069SPedro Giffuni * with the License. You may obtain a copy of the License at 1076cf6069SPedro Giffuni * 1176cf6069SPedro Giffuni * http://www.apache.org/licenses/LICENSE-2.0 1276cf6069SPedro Giffuni * 1376cf6069SPedro Giffuni * Unless required by applicable law or agreed to in writing, 1476cf6069SPedro Giffuni * software distributed under the License is distributed on an 1576cf6069SPedro Giffuni * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1676cf6069SPedro Giffuni * KIND, either express or implied. See the License for the 1776cf6069SPedro Giffuni * specific language governing permissions and limitations 1876cf6069SPedro Giffuni * under the License. 1976cf6069SPedro Giffuni * 2076cf6069SPedro Giffuni *************************************************************/ 2176cf6069SPedro Giffuni 2276cf6069SPedro Giffuni 2376cf6069SPedro Giffuni 2476cf6069SPedro Giffuni #include "uno/mapping.h" 2576cf6069SPedro Giffuni 2676cf6069SPedro Giffuni #include <typeinfo> 2776cf6069SPedro Giffuni #include <exception> 2876cf6069SPedro Giffuni #include <cstddef> 2976cf6069SPedro Giffuni 3076cf6069SPedro Giffuni namespace CPPU_CURRENT_NAMESPACE 3176cf6069SPedro Giffuni { 3276cf6069SPedro Giffuni 3376cf6069SPedro Giffuni void dummy_can_throw_anything( char const * ); 3476cf6069SPedro Giffuni 3576cf6069SPedro Giffuni 3676cf6069SPedro Giffuni // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h 3776cf6069SPedro Giffuni 3876cf6069SPedro Giffuni struct _Unwind_Exception 3976cf6069SPedro Giffuni { 4076cf6069SPedro Giffuni unsigned exception_class __attribute__((__mode__(__DI__))); 4176cf6069SPedro Giffuni void * exception_cleanup; 4276cf6069SPedro Giffuni unsigned private_1 __attribute__((__mode__(__word__))); 4376cf6069SPedro Giffuni unsigned private_2 __attribute__((__mode__(__word__))); 4476cf6069SPedro Giffuni } __attribute__((__aligned__)); 4576cf6069SPedro Giffuni 4676cf6069SPedro Giffuni struct __cxa_exception 4776cf6069SPedro Giffuni { 4876cf6069SPedro Giffuni ::std::type_info *exceptionType; 4976cf6069SPedro Giffuni void (*exceptionDestructor)(void *); 5076cf6069SPedro Giffuni 5176cf6069SPedro Giffuni ::std::unexpected_handler unexpectedHandler; 5276cf6069SPedro Giffuni ::std::terminate_handler terminateHandler; 5376cf6069SPedro Giffuni 5476cf6069SPedro Giffuni __cxa_exception *nextException; 5576cf6069SPedro Giffuni 5676cf6069SPedro Giffuni int handlerCount; 5776cf6069SPedro Giffuni 5876cf6069SPedro Giffuni int handlerSwitchValue; 5976cf6069SPedro Giffuni const unsigned char *actionRecord; 6076cf6069SPedro Giffuni const unsigned char *languageSpecificData; 6176cf6069SPedro Giffuni void *catchTemp; 6276cf6069SPedro Giffuni void *adjustedPtr; 6376cf6069SPedro Giffuni 6476cf6069SPedro Giffuni _Unwind_Exception unwindHeader; 6576cf6069SPedro Giffuni }; 6676cf6069SPedro Giffuni 6776cf6069SPedro Giffuni extern "C" void *__cxa_allocate_exception( 68*d16e63adSDon Lewis size_t thrown_size ); 6976cf6069SPedro Giffuni extern "C" void __cxa_throw ( 7076cf6069SPedro Giffuni void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); 7176cf6069SPedro Giffuni 7276cf6069SPedro Giffuni struct __cxa_eh_globals 7376cf6069SPedro Giffuni { 7476cf6069SPedro Giffuni __cxa_exception *caughtExceptions; 7576cf6069SPedro Giffuni unsigned int uncaughtExceptions; 7676cf6069SPedro Giffuni }; 7776cf6069SPedro Giffuni extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); 7876cf6069SPedro Giffuni 7976cf6069SPedro Giffuni // ----- 8076cf6069SPedro Giffuni 8176cf6069SPedro Giffuni //================================================================================================== 8276cf6069SPedro Giffuni void raiseException( 8376cf6069SPedro Giffuni uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); 8476cf6069SPedro Giffuni //================================================================================================== 8576cf6069SPedro Giffuni void fillUnoException( 8676cf6069SPedro Giffuni __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); 8776cf6069SPedro Giffuni } 88