[llvm-dev] How to use GDB to traverse the std::list in the program coredump?

自己 via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 6 00:52:28 PDT 2019


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>


More information about the llvm-dev mailing list