[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems debugging STL
From: |
Jose Luis Fernández DÃaz |
Subject: |
Problems debugging STL |
Date: |
17 Jan 2002 06:11:00 -0800 |
Hi,
I have:
address@hidden /tmp]$ g++ --version
egcs-2.91.66
address@hidden /tmp]$ gdb --version
GNU gdb 4.18
Copyright 1998 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 "i386-redhat-linux".
address@hidden /tmp]$ uname -a
Linux narcea 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
I compile the program:
include <iostream.h>
#include <vector>
int main(void)
{
vector<int> v1(2);
v1[0]=1;
cout << v1[0] << endl;
}
with: g++ -g kk.C and debug it with: gdb a.out :
(gdb) b main
Breakpoint 1 at 0x8048fd7: file kk.C, line 7.
(gdb) r
Starting program: /tmp/a.out
Breakpoint 1, main () at kk.C:7
7 vector<int> v1(2);
(gdb) n
8 v1[0]=1;
(gdb) n
9 cout << v1[0] << endl;
(gdb) p v1[0]
Internal: Cannot demangle mangled name
`__vc__Ct6vector2ZiZt24__default_alloc_template2b1i0Ui'.
What's the problem ?
Thanks in advance,
Jose Luis.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problems debugging STL,
Jose Luis Fernández DÃaz <=