From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4942 invoked by alias); 18 Jun 2007 12:54:03 -0000 Received: (qmail 4931 invoked by uid 22791); 18 Jun 2007 12:54:02 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 18 Jun 2007 12:53:59 +0000 Received: (qmail invoked by alias); 18 Jun 2007 12:53:57 -0000 Received: from port-83-236-52-166.dynamic.qsc.de (EHLO port-83-236-52-166.dynamic.qsc.de) [83.236.52.166] by mail.gmx.net (mp035) with SMTP; 18 Jun 2007 14:53:57 +0200 X-Authenticated: #9832049 From: Maik Beckmann To: gdb@sourceware.org Subject: Re: how to view content in stl vector Date: Mon, 18 Jun 2007 12:54:00 -0000 User-Agent: KMail/1.9.7 References: <200706181426.36383.maikbeckmann@gmx.de> <20070618123650.GA6075@caradoc.them.org> In-Reply-To: <20070618123650.GA6075@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706181453.21676.maikbeckmann@gmx.de> X-Y-GMX-Trusted: 0 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-06/txt/msg00142.txt.bz2 Am Montag, 18. Juni 2007 14:36:50 schrieb Daniel Jacobowitz: > On Mon, Jun 18, 2007 at 02:26:36PM +0200, Maik Beckmann wrote: > > Is storing of typenames possible at all? > > No. GDB's command line scripting language does not support this sort > of thing. My plan is a more sophisticated Python integration. > > > A workaround for this would be a native c++ map-dump function, which > > naturally would be implemented as function template, but I didn't find > > out how to call an instantiated function template :( > > It should work just fine.... I don't know for sure though. This is an example: source: - main.cpp - Foo.h - Foo.cpp call foo(i) No symbol "foo" in current context. call bar(i) $1 = true #ifndef FOO_H_ #define FOO_H_ template bool foo(T val); bool bar(int val); #endif /*FOO_H_*/ #include "Foo.h" #include template bool foo(T val) { std::cout << "Hello from foo" << std::endl; return true; } template bool foo(int); // instantiates foo(int) bool bar(int val) { std::cout << "Hello from bar" << std::endl; return true; } gdb says call foo(i) # the template function No symbol "foo" in current context. call bar(i) $1 = true MfG, Maik