From: Daniel Jacobowitz <drow@false.org>
To: Andreas Schwab <schwab@suse.de>
Cc: Peng Yu <pengyu.ut@gmail.com>, gdb@sourceware.org
Subject: Re: How to print the return value of template member functions (C++)?
Date: Thu, 04 Jan 2007 19:22:00 -0000 [thread overview]
Message-ID: <20070104192151.GA20596@nevyn.them.org> (raw)
In-Reply-To: <je8xgigbgo.fsf@sykes.suse.de>
On Thu, Jan 04, 2007 at 02:36:55PM +0100, Andreas Schwab wrote:
> "Peng Yu" <pengyu.ut@gmail.com> writes:
>
> > $ cat main.cc
> > #include <boost/tuple/tuple.hpp>
> > #include <iostream>
> >
> > int main() {
> > boost::tuple<int, int> a(10, 10);
> > std::cout << a.get<0>() << " " << a.get<1>() << std::endl;
> > }
> >
> >
> > (gdb) p a.get<0>()
> > Couldn't find method
> > boost::tuples::tuple<int,int,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>::get<0>
>
> I can't reproduce that with gdb 6.6.
I can't with either 6.5 or 6.6. It must be some other environmental
difference.
I'm somewhat impressed that it works - GDB doesn't handle templates
well.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-01-04 19:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <366c6f340701031704i5437d6a9m6c5d3454b9fdce01@mail.gmail.com>
2007-01-04 13:37 ` Andreas Schwab
2007-01-04 19:22 ` Daniel Jacobowitz [this message]
2007-01-04 22:06 ` Peng Yu
2007-01-04 22:09 ` Daniel Jacobowitz
2007-01-04 22:34 ` Peng Yu
2007-01-04 22:45 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070104192151.GA20596@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=pengyu.ut@gmail.com \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox