Enable python scripting for GDB

Sysprogs forums Forums VisualGDB Enable python scripting for GDB

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #10804
    support
    Keymaster

    Hi,

    Looks like your STL might be using a slightly different internal representation than VisualGDB is used to.

    Please try reproducing the “no member named _M_data” again and then evaluate the following expression in the Watch window:

    *((std::__cxx11::list<UnidentifiedPod, std::allocator<UnidentifiedPod> >::_Node *)<<ADDRESS>>)

    Note that the address and the type must match the one reported in the GDB session window (will change between debug sessions)

    #10846
    borbmizzet
    Participant

    My STL comes straight from the default SysProgs arm-none-eabi toolchain.

    -		*((std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber*>, std::allocator<gsl::not_null<APP::MainloopSubscriber*> > >::_Node *)0xd0008018))	{std::__detail::_List_node_base = {...}, ...}	std::_List_node<gsl::not_null<APP::MainloopSubscriber*> >
    -		std::__detail::_List_node_base	{_M_next = 0xd0007f50 <FixedSizeHeap+32592>, ...}	std::__detail::_List_node_base
    +		_M_next	0xd0007f50 <FixedSizeHeap+32592> {0xd0005bc4 <FixedSizeHeap+23492>}	std::__detail::_List_node_base *
    +		_M_prev	0xd0005bc4 <FixedSizeHeap+23492> {0xd0008018 <FixedSizeHeap+32792>}	std::__detail::_List_node_base *
    -		_M_storage	{_M_storage = [4]}	__gnu_cxx::__aligned_membuf<gsl::not_null<APP::MainloopSubscriber*> >
    -		_M_storage	{0xa0 ' ', 0x5a 'Z', 0x00 '\x00', 0xd0 'Ð'}	unsigned char [4]
    		[0]	0xa0 ' '	unsigned char
    		[1]	0x5a 'Z'	unsigned char
    		[2]	0x00 '\x00'	unsigned char
    		[3]	0xd0 'Ð'	unsigned char
    
    -var-create --frame 3 --thread 1 - * "*((std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber*>, std::allocator<gsl::not_null<APP::MainloopSubscriber*> > >::_Node *)0xd0008018))"
    ^done,name="var74",numchild="2",value="{...}",type="std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber*>, std::allocator<gsl::not_null<APP::MainloopSubscriber*> > >::_Node",has_more="0"
    ptype/mt std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber*>, std::allocator<gsl::not_null<APP::MainloopSubscriber*> > >::_Node
    &"ptype/mt std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber*>, std::allocator<gsl::not_null<APP::MainloopSubscriber*> > >::_Node\n"
    ~"type = struct std::_List_node<gsl::not_null<APP::MainloopSubscriber*> > [with _Tp = gsl::not_null<APP::MainloopSubscriber*>] : public std::__detail::_List_node_base {\n"
    ~"    __gnu_cxx::__aligned_membuf<_Tp> _M_storage;\n"
    ~"}\n"
    ^done
    -var-list-children --simple-values "var74" 0 2
    ^done,numchild="2",children=[child={name="var74.std::__detail::_List_node_base",exp="std::__detail::_List_node_base",numchild="1",type="std::__detail::_List_node_base"},child={name="var74.public",exp="public",numchild="1",value=""}],has_more="0"
    -var-evaluate-expression "var74\.std::__detail::_List_node_base"
    ^done,value="{...}"
    -var-list-children --simple-values "var74\.public" 0 1
    ^done,numchild="1",children=[child={name="var74.public._M_storage",exp="_M_storage",numchild="1",type="__gnu_cxx::__aligned_membuf<gsl::not_null<APP::MainloopSubscriber*> >"}],has_more="0"
    -var-evaluate-expression "var74\.public\._M_storage"
    ^done,value="{...}"
    -stack-list-frames --thread 1
    ^done,stack=<<REDACTED>>
    -stack-list-arguments --thread 1 0
    ^done,stack-args=[frame={level="0",args=[name="this"]},frame={level="1",args=[name="this"]},frame={level="2",args=[name="this"]},frame={level="3",args=[name="this"]},frame={level="4",args=[]}]
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base" 0 1
    ^done,numchild="1",children=[child={name="var74.std::__detail::_List_node_base.public",exp="public",numchild="2",value=""}],has_more="0"
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base\.public" 0 2
    ^done,numchild="2",children=[child={name="var74.std::__detail::_List_node_base.public._M_next",exp="_M_next",numchild="1",value="0xd0007f50 <FixedSizeHeap+32592>",type="std::__detail::_List_node_base *"},child={name="var74.std::__detail::_List_node_base.public._M_prev",exp="_M_prev",numchild="1",value="0xd0005bc4 <FixedSizeHeap+23492>",type="std::__detail::_List_node_base *"}],has_more="0"
    ptype/mt __gnu_cxx::__aligned_membuf<gsl::not_null<APP::MainloopSubscriber*> >
    &"ptype/mt __gnu_cxx::__aligned_membuf<gsl::not_null<APP::MainloopSubscriber*> >\n"
    ~"type = struct __gnu_cxx::__aligned_membuf<gsl::not_null<APP::MainloopSubscriber*> > [with _Tp = gsl::not_null<APP::MainloopSubscriber*>] {\n"
    ~"    unsigned char _M_storage[4];\n"
    ~"}\n"
    ^done
    -var-list-children --simple-values "var74\.public\._M_storage" 0 1
    ^done,numchild="1",children=[child={name="var74.public._M_storage.public",exp="public",numchild="1",value=""}],has_more="0"
    -var-list-children --simple-values "var74\.public\._M_storage\.public" 0 1
    ^done,numchild="1",children=[child={name="var74.public._M_storage.public._M_storage",exp="_M_storage",numchild="4",type="unsigned char [4]"}],has_more="0"
    -var-evaluate-expression "var74\.public\._M_storage\.public\._M_storage"
    ^done,value="[4]"
    ptype/mt unsigned char [4]
    &"ptype/mt unsigned char [4]\n"
    ~"type = unsigned char [4]\n"
    ^done
    -data-evaluate-expression --frame 3 --thread 1 "&\(\(\(\(\*\(\(std::__cxx11::list<gsl::not_null<APP::MainloopSubscriber\*>,\ std::allocator<gsl::not_null<APP::MainloopSubscriber\*>\ >\ >::_Node\ \*\)0xd0008018\)\)\)\._M_storage\)\._M_storage\)\[0]\)"
    ^error,msg="Junk after end of expression."
    -var-list-children --simple-values "var74\.public\._M_storage\.public\._M_storage" 0 4
    ^done,numchild="4",children=[child={name="var74.public._M_storage.public._M_storage.0",exp="0",numchild="0",value="160 '\240'",type="unsigned char"},child={name="var74.public._M_storage.public._M_storage.1",exp="1",numchild="0",value="90 'Z'",type="unsigned char"},child={name="var74.public._M_storage.public._M_storage.2",exp="2",numchild="0",value="0 '\\000'",type="unsigned char"},child={name="var74.public._M_storage.public._M_storage.3",exp="3",numchild="0",value="208 '\320'",type="unsigned char"}],has_more="0"
    ptype/mt std::__detail::_List_node_base *
    &"ptype/mt std::__detail::_List_node_base *\n"
    ~"type = struct std::__detail::_List_node_base {\n"
    ~"    std::__detail::_List_node_base *_M_next;\n"
    ~"    std::__detail::_List_node_base *_M_prev;\n"
    ~"} *\n"
    ^done
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base\.public\._M_next" 0 1
    ^done,numchild="1",children=[child={name="var74.std::__detail::_List_node_base.public._M_next.public",exp="public",numchild="2",value=""}],has_more="0"
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base\.public\._M_next\.public" 0 2
    ^done,numchild="2",children=[child={name="var74.std::__detail::_List_node_base.public._M_next.public._M_next",exp="_M_next",numchild="1",value="0xd0005bc4 <FixedSizeHeap+23492>",type="std::__detail::_List_node_base *"},child={name="var74.std::__detail::_List_node_base.public._M_next.public._M_prev",exp="_M_prev",numchild="1",value="0xd0008018 <FixedSizeHeap+32792>",type="std::__detail::_List_node_base *"}],has_more="0"
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base\.public\._M_prev" 0 1
    ^done,numchild="1",children=[child={name="var74.std::__detail::_List_node_base.public._M_prev.public",exp="public",numchild="2",value=""}],has_more="0"
    -var-list-children --simple-values "var74\.std::__detail::_List_node_base\.public\._M_prev\.public" 0 2
    ^done,numchild="2",children=[child={name="var74.std::__detail::_List_node_base.public._M_prev.public._M_next",exp="_M_next",numchild="1",value="0xd0008018 <FixedSizeHeap+32792>",type="std::__detail::_List_node_base *"},child={name="var74.std::__detail::_List_node_base.public._M_prev.public._M_prev",exp="_M_prev",numchild="1",value="0xd0007f50 <FixedSizeHeap+32592>",type="std::__detail::_List_node_base *"}],has_more="0"
    • This reply was modified 7 years, 8 months ago by borbmizzet.
    #10848
    borbmizzet
    Participant

    I think _M_storage is an array containing the address of the data in a 4-byte (32-bit) array.
    ex above: 0xd0005aa0 (_M_storage[3] _M_storage[2] _M_storage[1] _M_storage[0)]

    #10850
    support
    Keymaster

    Hi,

    Thanks, indeed the internal list structure has changed in one of the last toolchain releases. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.2.16.1455.msi

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.