2 * Copyright 2012-present Facebook, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 // A clone of the relevant parts of unwind-cxx.h from libstdc++
20 // The layout of these structures is defined by the ABI.
27 namespace __cxxabiv1 {
29 struct __cxa_exception {
30 std::type_info* exceptionType;
31 void (*exceptionDestructor)(void*);
32 std::unexpected_handler unexpectedHandler;
33 std::terminate_handler terminateHandler;
34 __cxa_exception* nextException;
37 int handlerSwitchValue;
38 const char* actionRecord;
39 const char* languageSpecificData;
43 _Unwind_Exception unwindHeader;
46 struct __cxa_eh_globals {
47 __cxa_exception* caughtExceptions;
48 unsigned int uncaughtExceptions;
52 __cxa_eh_globals* __cxa_get_globals(void) noexcept;
53 __cxa_eh_globals* __cxa_get_globals_fast(void) noexcept;
56 } // namespace __cxxabiv1