LLVM API Documentation
#include "llvm/Support/PrettyStackTrace.h"#include "llvm/Support/raw_ostream.h"#include "llvm/System/Signals.h"#include "llvm/System/ThreadLocal.h"#include "llvm/ADT/SmallString.h"
Go to the source code of this file.
Namespaces | |
| namespace | llvm |
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 *Cookie) |
| static bool | RegisterCrashPrinter () |
Variables | |
| static sys::ThreadLocal< const PrettyStackTraceEntry > | PrettyStackTraceHead |
| static void CrashHandler | ( | void * | Cookie | ) | [static] |
CrashHandler - This callback is run if a fatal signal is delivered to the process, it prints the pretty stack trace.
Definition at line 60 of file PrettyStackTrace.cpp.
References llvm::SmallVectorImpl< char >::empty(), llvm::errs(), PrintCurStackTrace(), and llvm::SmallString< InternalLen >::str().
Referenced by RegisterCrashPrinter().
| static void PrintCurStackTrace | ( | raw_ostream & | OS | ) | [static] |
PrintCurStackTrace - Print the current stack trace to the specified stream.
Definition at line 40 of file PrettyStackTrace.cpp.
References llvm::raw_ostream::flush(), llvm::sys::ThreadLocal< T >::get(), and PrintStack().
Referenced by CrashHandler().
| static unsigned PrintStack | ( | const PrettyStackTraceEntry * | Entry, | |
| raw_ostream & | OS | |||
| ) | [static] |
Definition at line 29 of file PrettyStackTrace.cpp.
References llvm::PrettyStackTraceEntry::getNextEntry(), and llvm::PrettyStackTraceEntry::print().
Referenced by PrintCurStackTrace().
| static bool RegisterCrashPrinter | ( | ) | [static] |
Definition at line 81 of file PrettyStackTrace.cpp.
References llvm::sys::AddSignalHandler(), CrashHandler(), and llvm::DisablePrettyStackTrace.
Referenced by llvm::PrettyStackTraceEntry::PrettyStackTraceEntry().
sys::ThreadLocal<const PrettyStackTraceEntry> PrettyStackTraceHead [static] |
Definition at line 27 of file PrettyStackTrace.cpp.