kbzowski

Forum Replies Created

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • in reply to: Pretty print of stdlib C++ #2334
    kbzowski
    Participant

    Hi,
    In call stack window I had seen something like:

     std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_end()	C/C++
    std::_Rb_tree
    , std::_Select1st >, std::less, std::allocator > >::lower_bound() C/C++
    > std::map
    , std::allocator > >::lower_bound() C/C++
    std::map
    , std::allocator > >::operator[]() C/C++
    main() C/C++

    I have selected third line. The code was exactly like yours:

          iterator
    lower_bound(const key_type& __x)
    { return _M_t.lower_bound(__x); }

    On 127 line of stl_map.h there is a declaration like:

          /// The actual tree structure.
    _Rep_type _M_t;

    I checked “GDB Session” and used command which had caused error before:

    -data-evaluate-expression "(void *)((std::map, std::allocator > >::_Rep_type::_Link_type)0x0)->_M_left"

    Same error was still appearing:

    No type "_Rep_type" within class or namespace "std::map, std::allocator > >".

    Moreover I have found another errors

    -var-create - * "_Rep_type"
    mi_cmd_var_create: unable to create variable object

    I am attaching whole log to this post.

    Edit.
    I have attached log for simple project. Previous was based on my current project.

    in reply to: Pretty print of stdlib C++ #2349
    kbzowski
    Participant

    Hi,
    I am using gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4) (from Scientific Linux)
    and gdb 7.5.1.

    I compiled that version of GDB myself, but I have checked also GDB from my distro’s rpm repository – GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6). Same situation has occurred.

    GDB Session window contains:

    No type “_Rep_type” within class or namespace “std::map, std::allocator > >”.

    in reply to: Pretty print of stdlib C++ #2347
    kbzowski
    Participant

    Hi, I think that I have similar problem with VisualGDB 3.0
    What information should I see while debugging std::map container? I have seen something like that (screenshoot attached) , but where are the keys/values? I was hoping to see something like a dictionary in C#.

Viewing 3 posts - 16 through 18 (of 18 total)