This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/647: vector<int>[] does not work on gdb 5.1.1, gcc2.95.3
- From: tspivey8 at telus dot net
- To: gdb-gnats at sources dot redhat dot com
- Date: 14 Aug 2002 03:23:01 -0000
- Subject: gdb/647: vector<int>[] does not work on gdb 5.1.1, gcc2.95.3
- Reply-to: tspivey8 at telus dot net
>Number: 647
>Category: gdb
>Synopsis: vector<int>[] does not work on gdb 5.1.1, gcc2.95.3
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 13 20:28:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Tyler Spivey
>Release: 5.1.1
>Organization:
>Environment:
Linux fast.hn 2.4.19-rc1-ac3-gentoo-r1 #1 Wed Jul 24 14:48:12 UTC 2002 i586 GenuineIntel
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-pc-linux-gnu".
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
>Description:
when i try to debug this short program, i can't access a[0] or a[1].
i'm new at this, so i might be doing something wrong.
#include <vector>
main(){
vector<int> a;
a.push_back(1);
a.push_back(132);
}
>How-To-Repeat:
compile the program (included in description field) like:
g++ -g file.cpp
gdb ./a.out
break main
next until the } appears
print a
print a[0]
print a[1]
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: