LibreOffice Module bridges (master) 1
gcc3_linux_arm/share.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20#include <sal/config.h>
21
22#include <typeinfo>
23#include <exception>
24#include <cstddef>
25#include <unwind.h>
26
27#include <cxxabi.h>
28#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
29#define _GLIBCXX_CDTOR_CALLABI
30#endif
31
32#include <config_cxxabi.h>
33#include <uno/mapping.h>
34
35#if !HAVE_CXXABI_H_CLASS_TYPE_INFO
36// <https://mentorembedded.github.io/cxx-abi/abi.html>,
37// libstdc++-v3/libsupc++/cxxabi.h:
38namespace __cxxabiv1 {
39class __class_type_info: public std::type_info {
40public:
41 explicit __class_type_info(char const * n): type_info(n) {}
43};
44}
45#endif
46
47#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO
48// <https://mentorembedded.github.io/cxx-abi/abi.html>,
49// libstdc++-v3/libsupc++/cxxabi.h:
50namespace __cxxabiv1 {
51class __si_class_type_info: public __class_type_info {
52public:
55 char const * n, __class_type_info const *base):
58};
59}
60#endif
61
62#if !HAVE_CXXABI_H_CXA_EXCEPTION
63namespace __cxxabiv1 {
64 struct __cxa_exception
65 {
66#if defined _LIBCPPABI_VERSION // detect libc++abi
67#if defined __LP64__ || defined __ARM_EABI__
68 // Quoting android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/src/cxa_exception.hpp: "This is a
69 // new field to support C++ 0x exception_ptr. For binary compatibility it is at the start of
70 // this struct which is prepended to the object thrown in __cxa_allocate_exception."
71 std::size_t referenceCount;
72#endif
73#endif
74
75 std::type_info *exceptionType;
76 void (*exceptionDestructor)(void *);
77
78 void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
79 std::terminate_handler terminateHandler;
80
81 __cxa_exception *nextException;
82
83 int handlerCount;
84#ifdef __ARM_EABI__
85 __cxa_exception *nextPropagatingException;
86 int propagationCount;
87#else
89 const unsigned char *actionRecord;
90 const unsigned char *languageSpecificData;
91 void *catchTemp;
92 void *adjustedPtr;
93#endif
94 _Unwind_Exception unwindHeader;
95 };
96
97}
98#endif
99
101{
102
103 void dummy_can_throw_anything( char const * );
104
105 // -- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
106
107#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION
108 extern "C" void *__cxa_allocate_exception(
109 std::size_t thrown_size ) throw();
110#endif
111#if !HAVE_CXXABI_H_CXA_THROW
112 extern "C" void __cxa_throw (
113 void *thrown_exception, std::type_info *tinfo,
114 void (*dest) (void *) ) __attribute__((noreturn));
115#endif
116
117}
118
119#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
120namespace __cxxabiv1 {
121 struct __cxa_eh_globals
122 {
123 __cxa_exception *caughtExceptions;
124 unsigned int uncaughtExceptions;
125#ifdef __ARM_EABI__
126 __cxa_exception *propagatingExceptions;
127#endif
128 };
129}
130#endif
131
132#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
133namespace __cxxabiv1 {
134 extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
135}
136#endif
137
138#if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE
139namespace __cxxabiv1 {
140 extern "C" std::type_info *__cxa_current_exception_type() throw();
141}
142#endif
143
145{
146 void raiseException(
147 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
148 void fillUnoException(uno_Any *, uno_Mapping * pCpp2Uno);
149}
150
151extern "C" void privateSnippetExecutor();
152
153namespace arm
154{
156 bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
157}
158
159/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
__class_type_info(const char *__n)
Definition: rtti.h:217
const __class_type_info * __base_type
Definition: rtti.h:309
__si_class_type_info(char const *n, __class_type_info const *base)
void const * base
void privateSnippetExecutor()
sal_Int64 n
struct _uno_Mapping uno_Mapping
Definition: msvc/except.hxx:33
struct _uno_Any uno_Any
Definition: msvc/except.hxx:32
void __cxa_throw(void *thrown_exception, std::type_info *tinfo, void(*dest)(void *)) __attribute__((noreturn))
void dummy_can_throw_anything(char const *)
unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)))
void * __cxa_allocate_exception(std::size_t thrown_size)
void fillUnoException(uno_Any *pUnoExc, uno_Mapping *pCpp2Uno)
void raiseException(uno_Any *pUnoExc, uno_Mapping *pUno2Cpp)
__cxa_eh_globals * __cxa_get_globals()
std::type_info * __cxa_current_exception_type()
@ MAX_FPR_REGS
@ MAX_GPR_REGS
bool return_in_hidden_param(typelib_TypeDescriptionReference *pTypeRef)
unsigned int uncaughtExceptions
Definition: unwind-cxx.h:133
__cxa_exception * caughtExceptions
Definition: unwind-cxx.h:132
const unsigned char * languageSpecificData
Definition: unwind-cxx.h:114
void(* exceptionDestructor)(void *)
Definition: unwind-cxx.h:89
__cxa_exception * nextException
Definition: unwind-cxx.h:97
const unsigned char * actionRecord
Definition: unwind-cxx.h:113
std::terminate_handler terminateHandler
Definition: unwind-cxx.h:94
std::type_info * exceptionType
Definition: unwind-cxx.h:88
_Unwind_Exception unwindHeader
Definition: unwind-cxx.h:126