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

cannot inspect vector<string>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 4.4.0, Qt Creator 4.7.0
    • Debugger
    • None
    • Ubuntu 17.04, gdb  7.12.50.20170314-0ubuntu1.1, 6.0.1-svn334776-1~exp1~20181018153226.114, g++-6 6.3.0-12ubuntu2, libstdc++-dev 6.3.0-12ubuntu2 , binutils  2.28-3ubuntu1, QtCreator 4.7.1 fromt qt.io

    Description

      Debugging the following simple program

      #include <string>
      #include <vector>
      using namespace std;
      
      int main(int argc, char *argv[])
      {
          string str = "Hello World!";
          vector<string> vec{str};
          return 0;
      }

      CMakeLists.txt

      project(debug)
      SET(CMAKE_CXX_STANDARD 11)
      add_executable(debug "main.cpp")
      

      does not show the contents of vec:
      vec <notaccessible> vector<string>

      while when building with GCC the contents are shown
      vec <1 items> vector<string>

      Load system GDB pretty printers is disabled (otherwise it would not work at all).

      The problem does not occur with std::array, std::list and not with other element types (e.g. int, custom classes)

      Attachments

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

        Activity

          People

            hjk hjk
            tanner Thomas Tanner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes