mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 14:20:17 +00:00
6201017d54
The current API for printing errors/warnings/messages from LLDB commands sometimes adds newlines behind the messages for the caller. However, this happens unconditionally so when the caller already specified a trailing newline in the error message (or is trying to print a generated error message that ends in a newline), LLDB ends up printing both the automatically added newline and the one that was in the error message string. This leads to all the randomly appearing new lines in error such as: ``` (lldb) command a error: 'command alias' requires at least two arguments (lldb) apropos a b error: 'apropos' must be called with exactly one argument. (lldb) why is there an empty line behind the second error? ``` This code adds a check that only appends the new line if the passed message doesn't already contain a trailing new line. Also removes the AppendRawWarning which had only one caller and doesn't serve any purpose now. Reviewed By: #lldb, mib Differential Revision: https://reviews.llvm.org/D96947 |
||
---|---|---|
.. | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include/lldb | ||
packages/Python | ||
resources | ||
scripts | ||
source | ||
test | ||
third_party/Python/module | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.txt | ||
LICENSE.TXT | ||
use_lldb_suite_root.py |