mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Tools emit the bug report URL on crash
When Clang crashes a useful message is output: "PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script." A similar message is now output for all tools. Differential Revision: https://reviews.llvm.org/D74324
This commit is contained in:
parent
4130033848
commit
b1f1108ed2
@ -37,6 +37,10 @@ namespace llvm {
|
||||
/// \see PrettyStackTraceEntry
|
||||
void EnablePrettyStackTraceOnSigInfoForThisThread(bool ShouldEnable = true);
|
||||
|
||||
/// Replaces the generic bug report message that is output upon
|
||||
/// a crash.
|
||||
void setBugReportMsg(const char *Msg);
|
||||
|
||||
/// PrettyStackTraceEntry - This class is used to represent a frame of the
|
||||
/// "pretty" stack trace that is dumped when a program crashes. You can define
|
||||
/// subclasses of this and declare them on the program stack: when they are
|
||||
|
@ -142,9 +142,17 @@ using CrashHandlerStringStorage =
|
||||
static CrashHandlerStringStorage crashHandlerStringStorage;
|
||||
#endif
|
||||
|
||||
static const char *BugReportMsg =
|
||||
"PLEASE submit a bug report to " BUG_REPORT_URL
|
||||
" and include the crash backtrace.\n";
|
||||
|
||||
void llvm::setBugReportMsg(const char *Msg) { BugReportMsg = Msg; }
|
||||
|
||||
/// This callback is run if a fatal signal is delivered to the process, it
|
||||
/// prints the pretty stack trace.
|
||||
static void CrashHandler(void *) {
|
||||
errs() << BugReportMsg ;
|
||||
|
||||
#ifndef __APPLE__
|
||||
// On non-apple systems, just emit the crash stack trace to stderr.
|
||||
PrintCurStackTrace(errs());
|
||||
|
Loading…
x
Reference in New Issue
Block a user