This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12383] New: error printing elements in vector from C++program


http://sourceware.org/bugzilla/show_bug.cgi?id=12383

           Summary: error printing elements in vector from C++ program
           Product: gdb
           Version: 7.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: lberk@redhat.com
                CC: swagiaal@redhat.com


Using GDB (7.1-34.fc13) in Fedora 13 x86-64 
gdb was configured as "x86_64-redhat-linux-gnu" 
gcc version 4.4.5 20101112 (Red Hat 4.4.5-2) (GCC)

While debugging a program written in c++ I was attempting to print the elements
of a std::vector using p MyVector[x] and was unable to (where x <
MyVector.size() , in my specific case; 2).  The error: 'No symbol "operator[]"
in current context.' was received. If I use p MyVector._M_impl._M_start I can
access and print the first element of the std vector as needed however
accessing the rest of the vector would be desirable.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]