summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/LLDBAssert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Utility/LLDBAssert.cpp')
-rw-r--r--lldb/source/Utility/LLDBAssert.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/lldb/source/Utility/LLDBAssert.cpp b/lldb/source/Utility/LLDBAssert.cpp
index 875dd51bca3..c11c24b0e42 100644
--- a/lldb/source/Utility/LLDBAssert.cpp
+++ b/lldb/source/Utility/LLDBAssert.cpp
@@ -8,9 +8,12 @@
//===----------------------------------------------------------------------===//
#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Core/StreamString.h"
-#include "lldb/Host/Host.h"
+#include "llvm/Support/Format.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/Signals.h"
+
+using namespace llvm;
using namespace lldb_private;
void
@@ -24,15 +27,10 @@ lldb_private::lldb_assert (int expression,
;
else
{
- StreamString stream;
- stream.Printf("Assertion failed: (%s), function %s, file %s, line %u\n",
- expr_text,
- func,
- file,
- line);
- stream.Printf("backtrace leading to the failure:\n");
- Host::Backtrace(stream, 1000);
- stream.Printf("please file a bug report against lldb reporting this failure log, and as many details as possible\n");
- printf("%s\n", stream.GetData());
+ errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
+ expr_text, func, file, line);
+ errs() << "backtrace leading to the failure:\n";
+ llvm::sys::PrintStackTrace(errs());
+ errs() << "please file a bug report against lldb reporting this failure log, and as many details as possible\n";
}
}
OpenPOWER on IntegriCloud