1 //===--------------------- LLDBAssert.cpp --------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #include "lldb/Utility/LLDBAssert.h"
13 #include "llvm/Support/Format.h"
14 #include "llvm/Support/Signals.h"
15 #include "llvm/Support/raw_ostream.h"
18 using namespace lldb_private;
20 void lldb_private::lldb_assert(bool expression, const char *expr_text,
21 const char *func, const char *file,
26 errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
27 expr_text, func, file, line);
28 errs() << "backtrace leading to the failure:\n";
29 llvm::sys::PrintStackTrace(errs());
30 errs() << "please file a bug report against lldb reporting this failure "
31 "log, and as many details as possible\n";