LLVM  6.0.0svn
Functions | Variables
Signals.cpp File Reference
#include "llvm/Support/Signals.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Config/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/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"
Include dependency graph for Signals.cpp:

Go to the source code of this file.

Functions

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 bool printSymbolizedStackTrace (StringRef Argv0, void **StackTrace, int Depth, llvm::raw_ostream &OS)
 Helper that launches llvm-symbolizer and symbolizes a backtrace. More...
 

Variables

static cl::opt< boolDisableSymbolication ("disable-symbolication", cl::desc("Disable symbolizing crash backtraces."), cl::init(false), cl::Hidden)
 
static ManagedStatic< std::vector< std::pair< void(*)(void *), void * > > > CallBacksToRun
 

Function Documentation

◆ findModulesAndOffsets()

static bool findModulesAndOffsets ( void **  StackTrace,
int  Depth,
const char **  Modules,
intptr_t Offsets,
const char MainExecutableName,
StringSaver StrPool 
)
static

◆ format_ptr()

static FormattedNumber format_ptr ( void *  PC)
static

Format a pointer value as hexadecimal.

Zero pad it out so its always the same width.

Definition at line 61 of file Signals.cpp.

References llvm::format_hex(), LLVM_ATTRIBUTE_USED, and printSymbolizedStackTrace().

Referenced by printSymbolizedStackTrace().

◆ printSymbolizedStackTrace()

static bool printSymbolizedStackTrace ( StringRef  Argv0,
void **  StackTrace,
int  Depth,
llvm::raw_ostream OS 
)
static

Variable Documentation

◆ CallBacksToRun

ManagedStatic<std::vector<std::pair<void (*)(void *), void *> > > CallBacksToRun
static

Definition at line 45 of file Signals.cpp.

Referenced by llvm::sys::RunSignalHandlers().

◆ DisableSymbolication

cl::opt<bool> DisableSymbolication("disable-symbolication", cl::desc("Disable symbolizing crash backtraces."), cl::init(false), cl::Hidden)
static