2 * Copyright 2014 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.
18 #ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
19 #define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
21 // A clone of the relevant parts of unwind-cxx.h from libstdc++
22 // The layout of these structures is defined by the ABI.
29 namespace __cxxabiv1 {
31 struct __cxa_exception {
32 std::type_info* exceptionType;
33 void (*exceptionDestructor) (void*);
34 std::unexpected_handler unexpectedHandler;
35 std::terminate_handler terminateHandler;
36 __cxa_exception* nextException;
39 int handlerSwitchValue;
40 const char* actionRecord;
41 const char* languageSpecificData;
45 _Unwind_Exception unwindHeader;
48 struct __cxa_eh_globals {
49 __cxa_exception* caughtExceptions;
50 unsigned int uncaughtExceptions;
54 __cxa_eh_globals* __cxa_get_globals(void) noexcept;
55 __cxa_eh_globals* __cxa_get_globals_fast(void) noexcept;
58 } // namespace __cxxabiv1
60 #endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_ */