[Lldb-commits] [PATCH] D64267: lldb_assert: abort when assertions are enabled.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 5 14:11:23 PDT 2019

JDevlieghere added a comment.

In D64267#1571960 <https://reviews.llvm.org/D64267#1571960>, @teemperor wrote:

> Would it be possible to assert after the printing the stack trace? Having stack traces in bug reports is always nice to have and displaying the "Assertion failed: ..." message seems also useful for the user.

The stack trace will be printed when the `assert` is hit, because we have a call to LLVM's pretty stack trace printer in the signal handler. That's the reason I moved the assert *before* the `PrintStackTrace` call.

Regarding the `Assertion failed` message, I wasn't sure if we wanted to print that twice, once coming form lldb_assert (with the real function, file and line) and once from the `assert` (with the function, file and line pointing to the lldb_assert implementation). If you think it's useful I'm happy to move the assertion to just after that print statement.



More information about the lldb-commits mailing list