From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17348 invoked by alias); 22 Dec 2007 17:35:17 -0000 Received: (qmail 17336 invoked by uid 22791); 22 Dec 2007 17:35:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Dec 2007 17:35:10 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 59B6D98243; Sat, 22 Dec 2007 17:35:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4341A9801E; Sat, 22 Dec 2007 17:35:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J68Ff-0005f7-DV; Sat, 22 Dec 2007 12:35:07 -0500 Date: Sat, 22 Dec 2007 17:35:00 -0000 From: Daniel Jacobowitz To: jian shen Cc: gdb@sourceware.org Subject: Re: gdb cannot understand some type with STL Message-ID: <20071222173507.GA21728@caradoc.them.org> Mail-Followup-To: jian shen , gdb@sourceware.org References: <8b685e3f0712212124n64194bc7je86bede3a21c3826@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b685e3f0712212124n64194bc7je86bede3a21c3826@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00170.txt.bz2 On Sat, Dec 22, 2007 at 01:24:16PM +0800, jian shen wrote: > testcase 2: > > ----- stl.cpp ----- > #include > #include > #include > > int main() > { > std::list l; > l.push_back(1); > l.push_back(2); > > std::map m; > m["a1"] = 1; > m["a2"] = 2; > } > ----- stl.cpp ----- > > (gdb) whatis std::list > No symbol "list" in namespace "std". What does "whatis l" print? I believe this problem is because GDB does not know about default template parameters. template > class list : protected _List_base<_Tp, _Alloc> It's going to be a std::list > or something like that. This is fixable, but it would require changes to both GCC and GDB that no one has worked on yet. > (gdb) whatis std::list* > A syntax error in expression, near `'. This looks like a bug in GDB, in the c-exp.y parser. -- Daniel Jacobowitz CodeSourcery