[Lldb-commits] [PATCH] Change lldb_assert() to use llvm::sys::PrintBacktrace

Enrico Granata granata.enrico at gmail.com
Wed Mar 4 17:15:40 PST 2015

Comment at: source/Utility/LLDBAssert.cpp:14
@@ -13,1 +13,3 @@
+#include "llvm/Support/Signals.h"
I would not do this.
Printing to a Stream is the LLDB way to do this, no reason for switching to this LLVM API

Comment at: source/Utility/LLDBAssert.cpp:36
@@ -37,1 +35,3 @@
+        llvm::sys::PrintStackTrace(stderr);
+        fprintf(stderr, "please file a bug report against lldb reporting this failure log, and as many details as possible\n");
Printing to stderr is probably a good idea
But, again, I prefer to stick to the LLDB host layer

It's probably fine to reimplement Host::Backtrace() in terms of LLVM APIs if it can be done generally and with decent performance, but I don't see much in terms of added value in this change



More information about the lldb-commits mailing list