|
proxygen
|
Namespaces | |
| detail | |
| test | |
Classes | |
| class | AddressFormatter |
| class | Dwarf |
| class | ElfCache |
| class | ElfCacheBase |
| class | ElfFile |
| class | FastStackTracePrinter |
| class | FDSymbolizePrinter |
| class | FILESymbolizePrinter |
| struct | FrameArray |
| class | LineReader |
| class | OStreamSymbolizePrinter |
| class | SafeStackTracePrinter |
| class | SignalSafeElfCache |
| class | StringSymbolizePrinter |
| struct | SymbolizedFrame |
| class | SymbolizePrinter |
| class | Symbolizer |
| class | UnsafeSelfAllocateStackTracePrinter |
Typedefs | |
| using | ElfAddr = ElfW(Addr) |
| using | ElfEhdr = ElfW(Ehdr) |
| using | ElfOff = ElfW(Off) |
| using | ElfPhdr = ElfW(Phdr) |
| using | ElfShdr = ElfW(Shdr) |
| using | ElfSym = ElfW(Sym) |
| typedef void(* | SignalCallback) () |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const Dwarf::Path &path) |
| size_t | countLoadedElfFiles () |
| void | addFatalSignalCallback (SignalCallback cb) |
| void | installFatalSignalCallbacks () |
| void | installFatalSignalHandler () |
| ssize_t | getStackTrace (uintptr_t *addresses, size_t maxAddresses) |
| ssize_t | getStackTraceSafe (uintptr_t *addresses, size_t maxAddresses) |
| template<size_t N> | |
| FOLLY_ALWAYS_INLINE bool | getStackTrace (FrameArray< N > &fa) |
| template<size_t N> | |
| bool | getStackTrace (FrameArray< N > &fa) |
| template<size_t N> | |
| FOLLY_ALWAYS_INLINE bool | getStackTraceSafe (FrameArray< N > &fa) |
| template<size_t N> | |
| bool | getStackTraceSafe (FrameArray< N > &fa) |
| using folly::symbolizer::ElfAddr = typedef ElfW(Addr) |
| using folly::symbolizer::ElfEhdr = typedef ElfW(Ehdr) |
| using folly::symbolizer::ElfOff = typedef ElfW(Off) |
| using folly::symbolizer::ElfPhdr = typedef ElfW(Phdr) |
| using folly::symbolizer::ElfShdr = typedef ElfW(Shdr) |
| using folly::symbolizer::ElfSym = typedef ElfW(Sym) |
| typedef void(* folly::symbolizer::SignalCallback) () |
Add a callback to be run when receiving a fatal signal. They will also be called by LOG(FATAL) and abort() (as those raise SIGABRT internally).
These callbacks must be async-signal-safe, so don't even think of using LOG(...) or printf or malloc / new or doing anything even remotely fun.
All these fatal callback must be added before calling installFatalSignalCallbacks(), below.
Definition at line 43 of file SignalHandler.h.
| void folly::symbolizer::addFatalSignalCallback | ( | SignalCallback | cb | ) |
Definition at line 438 of file SignalHandler.cpp.
Referenced by folly::symbolizer::test::TEST().
| size_t folly::symbolizer::countLoadedElfFiles | ( | ) |
Number of ELF files loaded by the dynamic loader.
Definition at line 32 of file ElfCache.cpp.
References _r_debug, and count.
Referenced by folly::symbolizer::FastStackTracePrinter::FastStackTracePrinter().
| ssize_t folly::symbolizer::getStackTrace | ( | uintptr_t * | addresses, |
| size_t | maxAddresses | ||
| ) |
Get the current stack trace into addresses, which has room for at least maxAddresses frames.
Returns the number of frames written in the array. Returns -1 on failure.
NOT async-signal-safe, but fast.
Definition at line 25 of file StackTrace.cpp.
Referenced by folly::symbolizer::test::comparator(), folly::symbolizer::detail::fixFrameArray(), getStackTrace(), folly::exception_tracer::operator<<(), folly::exception_tracer::StackTraceStack::pushCurrent(), and verifyStackTraces().
|
inline |
Definition at line 107 of file Symbolizer.h.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::detail::fixFrameArray(), FOLLY_ALWAYS_INLINE, getStackTrace(), and getStackTraceSafe().
|
inline |
Definition at line 107 of file Symbolizer.h.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::detail::fixFrameArray(), FOLLY_ALWAYS_INLINE, getStackTrace(), and getStackTraceSafe().
| ssize_t folly::symbolizer::getStackTraceSafe | ( | uintptr_t * | addresses, |
| size_t | maxAddresses | ||
| ) |
Get the current stack trace into addresses, which has room for at least maxAddresses frames.
Returns the number of frames written in the array. Returns -1 on failure.
Async-signal-safe, but likely slower.
Definition at line 53 of file StackTrace.cpp.
References context, and count.
Referenced by getStackTrace(), getStackTraceSafe(), folly::symbolizer::SafeStackTracePrinter::printStackTrace(), folly::symbolizer::FastStackTracePrinter::printStackTrace(), folly::SingletonVault::scheduleDestroyInstances(), and verifyStackTraces().
|
inline |
Definition at line 114 of file Symbolizer.h.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::detail::fixFrameArray(), and getStackTraceSafe().
|
inline |
Definition at line 114 of file Symbolizer.h.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::detail::fixFrameArray(), and getStackTraceSafe().
| void folly::symbolizer::installFatalSignalCallbacks | ( | ) |
Install the fatal signal callbacks; fatal signals will call these callbacks in the order in which they were added.
Definition at line 442 of file SignalHandler.cpp.
Referenced by folly::init(), and folly::symbolizer::test::TEST().
| void folly::symbolizer::installFatalSignalHandler | ( | ) |
Install handler for fatal signals. The list of signals being handled is in SignalHandler.cpp.
The handler will dump signal and time information followed by a stack trace to stderr, and then call the callbacks registered below.
Definition at line 468 of file SignalHandler.cpp.
Referenced by folly::init(), main(), and folly::symbolizer::test::TEST().
|
inline |
Definition at line 292 of file Dwarf.h.
References folly::symbolizer::Dwarf::Path::toString().