proxygen
ExceptionTracerLib.cpp File Reference
#include <folly/experimental/exception_tracer/ExceptionTracerLib.h>
#include <dlfcn.h>
#include <vector>
#include <folly/Indestructible.h>
#include <folly/Portability.h>
#include <folly/SharedMutex.h>
#include <folly/Synchronized.h>

Go to the source code of this file.

Namespaces

 __cxxabiv1
 
 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::exception_tracer
 

Macros

#define DECLARE_CALLBACK(NAME)
 

Functions

void __cxxabiv1::__cxa_throw (void *thrownException, std::type_info *type, void(*destructor)(void *)) __attribute__((__noreturn__))
 
void * __cxxabiv1::__cxa_begin_catch (void *excObj) throw ()
 
void __cxxabiv1::__cxa_rethrow (void) __attribute__((__noreturn__))
 
void __cxxabiv1::__cxa_end_catch (void)
 
CallbackHolder< CxaThrowType > & folly::exception_tracer::getCxaThrowCallbacks ()
 
void folly::exception_tracer::registerCxaThrowCallback (CxaThrowType callback)
 
CallbackHolder< CxaBeginCatchType > & folly::exception_tracer::getCxaBeginCatchCallbacks ()
 
void folly::exception_tracer::registerCxaBeginCatchCallback (CxaBeginCatchType callback)
 
CallbackHolder< CxaRethrowType > & folly::exception_tracer::getCxaRethrowCallbacks ()
 
void folly::exception_tracer::registerCxaRethrowCallback (CxaRethrowType callback)
 
CallbackHolder< CxaEndCatchType > & folly::exception_tracer::getCxaEndCatchCallbacks ()
 
void folly::exception_tracer::registerCxaEndCatchCallback (CxaEndCatchType callback)
 
CallbackHolder< RethrowExceptionType > & folly::exception_tracer::getRethrowExceptionCallbacks ()
 
void folly::exception_tracer::registerRethrowExceptionCallback (RethrowExceptionType callback)
 
void std::rethrow_exception (std::exception_ptr ep)
 

Macro Definition Documentation

#define DECLARE_CALLBACK (   NAME)
Value:
CallbackHolder<NAME##Type>& get##NAME##Callbacks() { \
static Indestructible<CallbackHolder<NAME##Type>> Callbacks; \
return *Callbacks; \
} \
void register##NAME##Callback(NAME##Type callback) { \
get##NAME##Callbacks().registerCallback(callback); \
}
string NAME
Definition: tokenize.py:56
PUSHMI_INLINE_VAR constexpr detail::get_fn< T > get
Definition: submit.h:391

Definition at line 71 of file ExceptionTracerLib.cpp.

Function Documentation

void std::rethrow_exception ( std::exception_ptr  ep)

Definition at line 144 of file ExceptionTracerLib.cpp.

References folly::exception_tracer::getRethrowExceptionCallbacks(), and std::rethrow_exception().

Referenced by std::rethrow_exception().

144  {
145  // Mangled name for std::rethrow_exception
146  // TODO(tudorb): Dicey, as it relies on the fact that std::exception_ptr
147  // is typedef'ed to a type in namespace __exception_ptr
148  static auto orig_rethrow_exception =
149  reinterpret_cast<decltype(&rethrow_exception)>(dlsym(
150  RTLD_NEXT,
151  "_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE"));
153  orig_rethrow_exception(ep);
154  __builtin_unreachable(); // orig_rethrow_exception never returns
155 }
void rethrow_exception(std::exception_ptr ep)
CallbackHolder< RethrowExceptionType > & getRethrowExceptionCallbacks()