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]

c++/2391: GDB does not understand pointer of STL class


>Number:         2391
>Category:       c++
>Synopsis:       GDB does not understand pointer of STL class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 23 03:58:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Jian Shen
>Release:        GNU gdb 6.6, gcc version 3.3.6
>Organization:
>Environment:
GNU gdb 6.6
Copyright (C) 2006 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 "x86_64-redhat-linux".
>Description:
----- stl.cpp -----
#include <list>

int main()
{
  std::list<int> l;
  l.push_back(1);
}
----- stl.cpp -----

(gdb) b main
Breakpoint 1 at 0x80497b1: file stl.cpp, line 5.
(gdb) run
Breakpoint 1, main () at stl.cpp:5
5         std::list<int> l;
(gdb) whatis int
type = int
(gdb) whatis int*
type = int *
(gdb) whatis std::list<int,std::allocator<int> >
type = std::list<int, std::allocator<int> >
(gdb) whatis std::list<int,std::allocator<int> > *
A syntax error in expression, near `'.
(gdb) whatis 'std::list<int,std::allocator<int> > *'
No symbol "std::list<int,std::allocator<int> > *" in current context.

GDB can understand pointer to int, but there's no way to understand a pointer to std::list.

>From Daniel:
  This looks like a bug in GDB, in the c-exp.y parser.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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