From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23610 invoked by alias); 27 Nov 2008 12:39:20 -0000 Received: (qmail 23602 invoked by uid 22791); 27 Nov 2008 12:39:19 -0000 X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-mx06.nokia.com) (192.100.122.233) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Nov 2008 12:38:39 +0000 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id mARCcUtI001820 for ; Thu, 27 Nov 2008 14:38:35 +0200 Received: from vaebh102.NOE.Nokia.com ([10.160.244.23]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Nov 2008 14:38:27 +0200 Received: from bettdhcp167238.europe.nokia.com ([172.25.167.238]) by vaebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Nov 2008 14:38:27 +0200 From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb@sources.redhat.com Subject: std::string and MI Date: Thu, 27 Nov 2008 12:39:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811271339.03070.apoenitz@trolltech.com> X-Nokia-AV: Clean 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: 2008-11/txt/msg00160.txt.bz2 Hi all. For the following code #include struct string {}; namespace foo { struct string {}; } int main() { std::string s; foo::string f; string t; } I get after issuing a "-stack-list-locals 2" the response ^done,locals=[{name="s",type="string"},{name="f",type="foo::string"}, {name="t",type="string"}] Similarily, "-var-create s * s" followed by "-var-info-type s" produces ^done,type="string" In both cases the 'std::' namespace is missing from the type. As the "namespace foo" example above shows, this can't be the general problem with namespaces, as "foo::string" is reported as I expected. Does anybody know how to tweak gdb's settings so that it produces the std:: namespace, too? [Getting back the "real" "std::basic_string" would be fine for me as well] Incidentally: Would it be possible to extend the MI commands that output types to also produce the mangled types? (This could be restricted to the cases where these actually differs from the unmangled ones, but I really don't mind duplicated output) Regards, Andre'