xref: /trunk/main/bridges/source/cpp_uno/gcc3_freebsd_arm/share.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
17a46fbe4Spfg /**************************************************************
27a46fbe4Spfg  *
37a46fbe4Spfg  * Licensed to the Apache Software Foundation (ASF) under one
47a46fbe4Spfg  * or more contributor license agreements.  See the NOTICE file
57a46fbe4Spfg  * distributed with this work for additional information
67a46fbe4Spfg  * regarding copyright ownership.  The ASF licenses this file
77a46fbe4Spfg  * to you under the Apache License, Version 2.0 (the
87a46fbe4Spfg  * "License"); you may not use this file except in compliance
97a46fbe4Spfg  * with the License.  You may obtain a copy of the License at
107a46fbe4Spfg  *
117a46fbe4Spfg  *   http://www.apache.org/licenses/LICENSE-2.0
127a46fbe4Spfg  *
137a46fbe4Spfg  * Unless required by applicable law or agreed to in writing,
147a46fbe4Spfg  * software distributed under the License is distributed on an
157a46fbe4Spfg  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167a46fbe4Spfg  * KIND, either express or implied.  See the License for the
177a46fbe4Spfg  * specific language governing permissions and limitations
187a46fbe4Spfg  * under the License.
197a46fbe4Spfg  *
207a46fbe4Spfg  *************************************************************/
217a46fbe4Spfg 
227a46fbe4Spfg 
237a46fbe4Spfg #ifndef _ARM_SHARE_HXX
247a46fbe4Spfg #define _ARM_SHARE_HXX
257a46fbe4Spfg #include "uno/mapping.h"
267a46fbe4Spfg 
277a46fbe4Spfg #include <typeinfo>
287a46fbe4Spfg #include <exception>
297a46fbe4Spfg #include <cstddef>
307a46fbe4Spfg #include <unwind.h>
317a46fbe4Spfg 
327a46fbe4Spfg namespace CPPU_CURRENT_NAMESPACE
337a46fbe4Spfg {
347a46fbe4Spfg 
357a46fbe4Spfg     void dummy_can_throw_anything( char const * );
367a46fbe4Spfg 
377a46fbe4Spfg     // -- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
387a46fbe4Spfg 
397a46fbe4Spfg     struct __cxa_exception
407a46fbe4Spfg     {
417a46fbe4Spfg         ::std::type_info *exceptionType;
427a46fbe4Spfg         void (*exceptionDestructor)(void *);
437a46fbe4Spfg 
447a46fbe4Spfg         ::std::unexpected_handler unexpectedHandler;
457a46fbe4Spfg         ::std::terminate_handler terminateHandler;
467a46fbe4Spfg 
477a46fbe4Spfg         __cxa_exception *nextException;
487a46fbe4Spfg 
497a46fbe4Spfg         int handlerCount;
507a46fbe4Spfg #ifdef __ARM_EABI__
517a46fbe4Spfg     __cxa_exception *nextPropagatingException;
527a46fbe4Spfg     int propagationCount;
537a46fbe4Spfg #else
547a46fbe4Spfg         int handlerSwitchValue;
557a46fbe4Spfg         const unsigned char *actionRecord;
567a46fbe4Spfg         const unsigned char *languageSpecificData;
577a46fbe4Spfg         void *catchTemp;
587a46fbe4Spfg         void *adjustedPtr;
597a46fbe4Spfg #endif
607a46fbe4Spfg         _Unwind_Exception unwindHeader;
617a46fbe4Spfg     };
627a46fbe4Spfg 
637a46fbe4Spfg     extern "C" void *__cxa_allocate_exception(
64*d16e63adSDon Lewis         size_t thrown_size );
657a46fbe4Spfg     extern "C" void __cxa_throw (
667a46fbe4Spfg         void *thrown_exception, std::type_info *tinfo,
677a46fbe4Spfg         void (*dest) (void *) ) __attribute__((noreturn));
687a46fbe4Spfg 
697a46fbe4Spfg     struct __cxa_eh_globals
707a46fbe4Spfg     {
717a46fbe4Spfg         __cxa_exception *caughtExceptions;
727a46fbe4Spfg         unsigned int uncaughtExceptions;
737a46fbe4Spfg #ifdef __ARM_EABI__
747a46fbe4Spfg     __cxa_exception *propagatingExceptions;
757a46fbe4Spfg #endif
767a46fbe4Spfg     };
777a46fbe4Spfg     extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
787a46fbe4Spfg 
797a46fbe4Spfg     // -----
807a46fbe4Spfg 
817a46fbe4Spfg     //====================================================================
827a46fbe4Spfg     void raiseException(
837a46fbe4Spfg         uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
847a46fbe4Spfg     //====================================================================
857a46fbe4Spfg     void fillUnoException(
867a46fbe4Spfg         __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
877a46fbe4Spfg }
887a46fbe4Spfg 
897a46fbe4Spfg namespace arm
907a46fbe4Spfg {
917a46fbe4Spfg     enum armlimits { MAX_GPR_REGS = 4 };
927a46fbe4Spfg     bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
937a46fbe4Spfg }
947a46fbe4Spfg 
957a46fbe4Spfg #endif
967a46fbe4Spfg /* vi:set tabstop=4 shiftwidth=4 expandtab: */
97