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*> >> = {}, }, }
}, }

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@163.com

](头像签名)

签名由 网易邮箱大师 定制

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