LLVM
15.0.0git
|
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm-c/ErrorHandling.h"
#include "llvm/Config/config.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Watchdog.h"
#include "llvm/Support/raw_ostream.h"
#include <atomic>
#include <cassert>
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <tuple>
Go to the source code of this file.
Namespaces | |
llvm | |
This is an optimization pass for GlobalISel generic memory operations. | |
Functions | |
PrettyStackTraceEntry * | llvm::ReverseStackTrace (PrettyStackTraceEntry *Head) |
static void | PrintStack (raw_ostream &OS) |
static LLVM_ATTRIBUTE_NOINLINE void | PrintCurStackTrace (raw_ostream &OS) |
Print the current stack trace to the specified stream. More... | |
static void | setCrashLogMessage (const char *msg) LLVM_ATTRIBUTE_UNUSED |
static void | CrashHandler (void *) |
This callback is run if a fatal signal is delivered to the process, it prints the pretty stack trace. More... | |
static void | printForSigInfoIfNeeded () |
static bool | RegisterCrashPrinter () |
void | LLVMEnablePrettyStackTrace () |
Enable LLVM's built-in stack trace code. More... | |
Variables | |
static const char * | BugReportMsg |
static LLVM_THREAD_LOCAL PrettyStackTraceEntry * | PrettyStackTraceHead = nullptr |
static volatile std::atomic< unsigned > | GlobalSigInfoGenerationCounter |
static LLVM_THREAD_LOCAL unsigned | ThreadLocalSigInfoGenerationCounter = 0 |
|
static |
This callback is run if a fatal signal is delivered to the process, it prints the pretty stack trace.
Definition at line 155 of file PrettyStackTrace.cpp.
References BugReportMsg, llvm::errs(), PrintCurStackTrace(), and setCrashLogMessage().
Referenced by RegisterCrashPrinter().
|
static |
Print the current stack trace to the specified stream.
Marked NOINLINE so it can be called from debuggers.
Definition at line 102 of file PrettyStackTrace.cpp.
References llvm::raw_ostream::flush(), PrettyStackTraceHead, and PrintStack().
Referenced by CrashHandler(), and printForSigInfoIfNeeded().
|
static |
Definition at line 195 of file PrettyStackTrace.cpp.
References llvm::errs(), GlobalSigInfoGenerationCounter, PrintCurStackTrace(), and ThreadLocalSigInfoGenerationCounter.
Referenced by llvm::PrettyStackTraceEntry::PrettyStackTraceEntry(), and llvm::PrettyStackTraceEntry::~PrettyStackTraceEntry().
|
static |
Definition at line 81 of file PrettyStackTrace.cpp.
References PrettyStackTraceHead, and llvm::ReverseStackTrace().
Referenced by PrintCurStackTrace().
|
static |
Definition at line 274 of file PrettyStackTrace.cpp.
References llvm::sys::AddSignalHandler(), and CrashHandler().
Referenced by llvm::EnablePrettyStackTrace().
|
static |
Definition at line 134 of file PrettyStackTrace.cpp.
Referenced by CrashHandler().
|
static |
Definition at line 40 of file PrettyStackTrace.cpp.
Referenced by CrashHandler(), llvm::getBugReportMsg(), and llvm::setBugReportMsg().
|
static |
Definition at line 67 of file PrettyStackTrace.cpp.
Referenced by llvm::EnablePrettyStackTraceOnSigInfoForThisThread(), and printForSigInfoIfNeeded().
|
static |
Definition at line 53 of file PrettyStackTrace.cpp.
Referenced by llvm::PrettyStackTraceEntry::PrettyStackTraceEntry(), PrintCurStackTrace(), PrintStack(), llvm::RestorePrettyStackState(), llvm::SavePrettyStackState(), and llvm::PrettyStackTraceEntry::~PrettyStackTraceEntry().
|
static |
Definition at line 69 of file PrettyStackTrace.cpp.
Referenced by llvm::EnablePrettyStackTraceOnSigInfoForThisThread(), and printForSigInfoIfNeeded().