|
LLVM
8.0.1
|
#include "llvm/Support/Signals.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/Config/llvm-config.h"#include "llvm/Support/ErrorOr.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/FileUtilities.h"#include "llvm/Support/Format.h"#include "llvm/Support/FormatVariadic.h"#include "llvm/Support/FormatAdapters.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/Mutex.h"#include "llvm/Support/Program.h"#include "llvm/Support/StringSaver.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Support/Options.h"#include <vector>#include "Unix/Signals.inc"
Go to the source code of this file.
Classes | |
| struct | CallbackAndCookie |
Functions | |
| static void | insertSignalHandler (sys::SignalHandlerCallback FnPtr, void *Cookie) |
| static bool | findModulesAndOffsets (void **StackTrace, int Depth, const char **Modules, intptr_t *Offsets, const char *MainExecutableName, StringSaver &StrPool) |
| static FormattedNumber | format_ptr (void *PC) |
| Format a pointer value as hexadecimal. More... | |
| static LLVM_ATTRIBUTE_USED bool | printSymbolizedStackTrace (StringRef Argv0, void **StackTrace, int Depth, llvm::raw_ostream &OS) |
| Helper that launches llvm-symbolizer and symbolizes a backtrace. More... | |
Variables | |
| static bool | DisableSymbolicationFlag = false |
| static cl::opt< bool, true > | DisableSymbolication ("disable-symbolication", cl::desc("Disable symbolizing crash backtraces."), cl::location(DisableSymbolicationFlag), cl::Hidden) |
| static constexpr size_t | MaxSignalHandlerCallbacks = 8 |
| static CallbackAndCookie | CallBacksToRun [MaxSignalHandlerCallbacks] |
|
static |
Referenced by insertSignalHandler(), and printSymbolizedStackTrace().
|
static |
Format a pointer value as hexadecimal.
Zero pad it out so its always the same width.
Definition at line 99 of file Signals.cpp.
References llvm::format_hex(), and LLVM_ATTRIBUTE_USED.
Referenced by printSymbolizedStackTrace().
|
static |
Definition at line 76 of file Signals.cpp.
References llvm::Depth, CallbackAndCookie::Empty, findModulesAndOffsets(), I, CallbackAndCookie::Initialized, CallbackAndCookie::Initializing, MaxSignalHandlerCallbacks, and llvm::report_fatal_error().
|
static |
Helper that launches llvm-symbolizer and symbolizes a backtrace.
Definition at line 107 of file Signals.cpp.
References Allocator, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallString< InternalLen >::c_str(), llvm::sys::fs::createTemporaryFile(), llvm::Depth, llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::sys::ExecuteAndWait(), llvm::StringRef::find(), findModulesAndOffsets(), llvm::sys::findProgramByName(), llvm::format_hex(), format_ptr(), llvm::formatv(), llvm::MemoryBuffer::getFile(), llvm::sys::fs::getMainExecutable(), llvm::Intrinsic::log10, llvm::None, llvm::sys::path::parent_path(), llvm::right_justify(), llvm::StringRef::split(), and llvm::StringRef::startswith().
|
static |
Definition at line 58 of file Signals.cpp.
|
static |
Definition at line 42 of file Signals.cpp.
|
static |
Definition at line 57 of file Signals.cpp.
Referenced by insertSignalHandler(), and llvm::sys::RunSignalHandlers().
1.8.13