自己 via llvm-dev
2019-Aug-06 07:52 UTC
[llvm-dev] How to use GDB to traverse the std::list in the program coredump?
I have tried stl-views-1.0.3.gdb,but it didn't work!I found it is a llvm implement,when I print the list variable,it shows like: $81 = { <std::__1::__list_imp<LogBufferElement*, std::__1::allocator<LogBufferElement*> >> = { __end_ = { __prev_ = 0x7ee29b5940, __next_ = 0x7ee2821d40 }, __size_alloc_ = { <std::__1::__compressed_pair_elem<unsigned long, 0, false>> = { __value_ = 0x106b }, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::__list_node<LogBufferElement*, void*> >, 1, true>> = { <std::__1::allocator<std::__1::__list_node<LogBufferElement*, void*> >> = {<No data fields>}, <No data fields>}, <No data fields>} }, <No data fields>} according to the code http://llvm.org/svn/llvm-project/libcxx/branchestemplate,I tride the following command,But it failed! (gdb) p /x ((LogBuffer *)0x7ee280dc00).mLogElements.__end_.__next_.__value_ There is no member or method named _value. Anybody help me? | | 自己 | | 邮箱:hzy0719 at 163.com | 签名由 网易邮箱大师 定制 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/a8808e2f/attachment.html>
David Blaikie via llvm-dev
2019-Aug-06 20:23 UTC
[llvm-dev] How to use GDB to traverse the std::list in the program coredump?
You'll need a gdb pretty printer - currently libc++ doesn't provide/have any gdb pretty printers in-tree. the Chromium project has some though, which you could use. https://chromium.googlesource.com/chromium/src/+/master/third_party/libcxx-pretty-printers/printers.py On Tue, Aug 6, 2019 at 1:05 PM 自己 via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I have tried stl-views-1.0.3.gdb,but it didn't work!I found it is a llvm > implement,when I print the list variable,it shows like: > > $81 = { > <std::__1::__list_imp<LogBufferElement*, > std::__1::allocator<LogBufferElement*> >> = { > __end_ = { > __prev_ = 0x7ee29b5940, > __next_ = 0x7ee2821d40 > }, > __size_alloc_ = { > <std::__1::__compressed_pair_elem<unsigned long, 0, false>> = { > __value_ = 0x106b > }, > > <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::__list_node<LogBufferElement*, > void*> >, 1, true>> = { > <std::__1::allocator<std::__1::__list_node<LogBufferElement*, > void*> >> = {<No data fields>}, <No data fields>}, <No data fields>} > }, <No data fields>} > > according to the code > http://llvm.org/svn/llvm-project/libcxx/branchestemplate,I tride the > following command,But it failed! > (gdb) p /x ((LogBuffer > *)0x7ee280dc00).mLogElements.__end_.__next_.__value_ There is no member or > method named _value. > > Anybody help me? > 自己 > 邮箱:hzy0719 at 163.com > > <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=%E8%87%AA%E5%B7%B1&uid=hzy0719%40163.com&iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2Fa518fb61dd72e48dc844a81b80cae9d9.jpg&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Ahzy0719%40163.com%22%5D> > > 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/5051968f/attachment.html>