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