[lldb-dev] [Bug 13568] can't evaluate basic_string element via operator[]

via lldb-dev lldb-dev at lists.llvm.org
Thu Jul 18 18:03:19 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=13568

Jonas Devlieghere <jdevlieghere at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jdevlieghere at apple.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Jonas Devlieghere <jdevlieghere at apple.com> ---
(lldb) b main.cpp:8
Breakpoint 1: where = a.out`main + 51 at main.cpp:8:24, address =
0x0000000100001083
(lldb) r
Process 12217 launched: '/tmp/a.out' (x86_64)
Process 12217 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100001083 a.out`main at main.cpp:8:24
   5    {
   6      std::u16string ustr = u"Привет!";
   7      char16_t uchar = ustr[0];
-> 8      std::cout << (size_t)uchar << std::endl;
   9    }
(lldb) p ustr[0]
(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>,
std::__1::allocator<char16_t> >::value_type) $0 = U+041f u'П'

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190719/3a67f1b6/attachment.html>


More information about the lldb-dev mailing list