From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18399 invoked by alias); 15 Nov 2006 22:53:51 -0000 Received: (qmail 18391 invoked by uid 22791); 15 Nov 2006 22:53:50 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Nov 2006 22:53:42 +0000 Received: by nf-out-0910.google.com with SMTP id p77so907782nfc for ; Wed, 15 Nov 2006 14:53:40 -0800 (PST) Received: by 10.48.202.11 with SMTP id z11mr1666052nff.1163631219843; Wed, 15 Nov 2006 14:53:39 -0800 (PST) Received: by 10.49.61.8 with HTTP; Wed, 15 Nov 2006 14:53:39 -0800 (PST) Message-ID: <366c6f340611151453s4c938231pc8cc9096a6f1d9b1@mail.gmail.com> Date: Wed, 15 Nov 2006 22:53:00 -0000 From: "Peng Yu" To: gdb@sourceware.org Subject: How to print the return value of a template member function MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00109.txt.bz2 Hi, I have the following program listed below this email. I want to inspect 'a.get<0>()' from gdb. But I got the following error message. Can you show me what the right way should be? (gdb) start Breakpoint 1 at 0x80489a4: file main.cc, line 5. [Thread debugging using libthread_db enabled] [New Thread -1217684800 (LWP 6424)] [Switching to Thread -1217684800 (LWP 6424)] main () at main.cc:5 5 boost::tuple a(10, 10); (gdb) n 6 std::cout << a.get<0>() << " " << a.get<1>() << std::endl; (gdb) p a.get<0>() Couldn't find method boost::tuples::tuple::get<0> (gdb) Thanks, Peng $ cat main.cc #include #include int main() { boost::tuple a(10, 10); std::cout << a.get<0>() << " " << a.get<1>() << std::endl; }