Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11023

Debugger view does not show list items, if list class derives from std::list and a base class with virtual methods

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.0.1
    • Qt Creator 2.8.1, Qt Creator 3.0.0-beta
    • None
    • GCC 4.8.1
      GDB 7.6.1
      Linux 3.11.0 64Bit / Ubuntu 13.10
    • 869c46a02bec08405bba169e7b95aea8e00983d2

    Description

      I want to step through this code with QtCreator in debug mode.
      But it does not show up the content of the list in right panel (local expressions) for a derived std::list class with virtual base class.
      When you leave out any virtual keyword in the base class it shows all the inserted items with it's corresponding value.

      #include <list>
      
      using namespace std;
      
      struct Base
      {
          virtual ~Base(){}
      };
      
      template<class T>
      struct DerivedList : public std::list< T >, Base
      {
          DerivedList(): std::list< T >(), Base() {}
      };
      
      int main()
      {
          DerivedList<int> myList;
          for (int i = 0;i<100;i++) myList.push_back(i);
      
          return 0;
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            losty Thomas B.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes