LLVM API Documentation
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm-c/Core.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Config/config.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/ThreadLocal.h"
#include "llvm/Support/Watchdog.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
static unsigned | PrintStack (const PrettyStackTraceEntry *Entry, raw_ostream &OS) |
static void | PrintCurStackTrace (raw_ostream &OS) |
PrintCurStackTrace - Print the current stack trace to the specified stream. | |
static void | CrashHandler (void *) |
static bool | RegisterCrashPrinter () |
void | LLVMEnablePrettyStackTrace () |
Variables | |
static ManagedStatic < sys::ThreadLocal< const PrettyStackTraceEntry > > | PrettyStackTraceHead |
static void CrashHandler | ( | void * | ) | [static] |
CrashHandler - This callback is run if a fatal signal is delivered to the process, it prints the pretty stack trace.
Definition at line 76 of file PrettyStackTrace.cpp.
References llvm::c_str(), llvm::SmallVectorBase::empty(), llvm::errs(), PrintCurStackTrace(), llvm::SmallString< InternalLen >::str(), and llvm::LibFunc::strdup.
Referenced by RegisterCrashPrinter().
static void PrintCurStackTrace | ( | raw_ostream & | OS | ) | [static] |
PrintCurStackTrace - Print the current stack trace to the specified stream.
Definition at line 47 of file PrettyStackTrace.cpp.
References llvm::raw_ostream::flush(), PrettyStackTraceHead, and PrintStack().
Referenced by CrashHandler().
static unsigned PrintStack | ( | const PrettyStackTraceEntry * | Entry, |
raw_ostream & | OS | ||
) | [static] |
Definition at line 33 of file PrettyStackTrace.cpp.
References llvm::PrettyStackTraceEntry::getNextEntry(), and llvm::PrettyStackTraceEntry::print().
Referenced by PrintCurStackTrace().
static bool RegisterCrashPrinter | ( | ) | [static] |
Definition at line 138 of file PrettyStackTrace.cpp.
References llvm::sys::AddSignalHandler(), and CrashHandler().
Referenced by llvm::EnablePrettyStackTrace().
Definition at line 31 of file PrettyStackTrace.cpp.
Referenced by llvm::PrettyStackTraceEntry::PrettyStackTraceEntry(), PrintCurStackTrace(), and llvm::PrettyStackTraceEntry::~PrettyStackTraceEntry().