mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00
![]() Summary: When built w/ `-funsigned-char`, `std::string` becomes equivalent to `std::basic_string<unsigned char>`, causing these formatters to not match. This patch adds overloads for both libstdc++ and libc++ string formatters that accepts unsigned char. Motivated by the following example: ``` $ cat pretty_print.cc template <typename T> void print_val(T s) { std::cerr << s << '\n'; // Set a breakpoint here! } int main() { std::string val = "hello"; print_val(val); return 0; } $ clang++ -stdlib=libc++ -funsigned-char -fstandalone-debug -g pretty_print.cc $ lldb ./a.out -b -o 'b pretty_print.cc:6' -o r -o 'fr v' ... (lldb) fr v (std::__1::basic_string<unsigned char, std::__1::char_traits<unsigned char>, std::__1::allocator<unsigned char> >) s = { __r_ = { std::__1::__compressed_pair_elem<std::__1::basic_string<unsigned char, std::__1::char_traits<unsigned char>, std::__1::allocator<unsigned char> >::__rep, 0, false> = { __value_ = { = { __l = (__cap_ = 122511465736202, __size_ = 0, __data_ = 0x0000000000000000) __s = { = (__size_ = '\n', __lx = '\n') __data_ = { [0] = 'h' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' [5] = '\0' ... ``` Reviewers: labath, JDevlieghere, shafik Subscribers: christof, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70517 |
||
---|---|---|
.. | ||
android/platform | ||
api | ||
arm | ||
benchmarks | ||
commands | ||
driver/batch_mode | ||
functionalities | ||
iohandler/completion | ||
issue_verification | ||
lang | ||
linux | ||
macosx | ||
make | ||
plugins | ||
python_api | ||
sample_test | ||
sanity | ||
source-manager | ||
terminal | ||
test_runner | ||
tools | ||
types | ||
__init__.py | ||
.categories | ||
bench.py | ||
concurrent_base.py | ||
configuration.py | ||
darwin_log.py | ||
decorators.py | ||
dotest_args.py | ||
dotest.py | ||
lldb_pylint_helper.py | ||
lldbbench.py | ||
lldbdwarf.py | ||
lldbinline.py | ||
lldbpexpect.py | ||
lldbplatform.py | ||
lldbplatformutil.py | ||
lldbtest_config.py | ||
lldbtest.py | ||
lldbutil.py | ||
lock.py | ||
README-TestSuite | ||
redo.py | ||
test_categories.py | ||
test_result.py |