#include "llvm/Support/Signals.h"
#include "DebugOptions.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/CommandLine.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/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/raw_ostream.h"
#include <array>
#include <cmath>
#include <vector>
usingnamespacellvm;
static bool DisableSymbolicationFlag = …;
static ManagedStatic<std::string> CrashDiagnosticsDirectory;
namespace {
struct CreateDisableSymbolication { … };
struct CreateCrashDiagnosticsDir { … };
}
void llvm::initSignalsOptions() { … }
constexpr char DisableSymbolizationEnv[] = …;
constexpr char LLVMSymbolizerPathEnv[] = …;
constexpr char EnableSymbolizerMarkupEnv[] = …;
struct CallbackAndCookie { … };
static constexpr size_t MaxSignalHandlerCallbacks = …;
static std::array<CallbackAndCookie, MaxSignalHandlerCallbacks> &
CallBacksToRun() { … }
void sys::RunSignalHandlers() { … }
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) { … }
LLVM_ATTRIBUTE_USED
static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace,
int Depth, llvm::raw_ostream &OS) { … }
static bool printMarkupContext(raw_ostream &OS, const char *MainExecutableName);
LLVM_ATTRIBUTE_USED
static bool printMarkupStackTrace(StringRef Argv0, void **StackTrace, int Depth,
raw_ostream &OS) { … }
#ifdef LLVM_ON_UNIX
#include "Unix/Signals.inc"
#endif
#ifdef _WIN32
#include "Windows/Signals.inc"
#endif