Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Peng Yu" <pengyu.ut@gmail.com>
To: gdb@sourceware.org
Subject: Re: How to print the return value of template member functions (C++)?
Date: Thu, 04 Jan 2007 22:06:00 -0000	[thread overview]
Message-ID: <366c6f340701041406x160579b0v2e6c5e284d263a1c@mail.gmail.com> (raw)
In-Reply-To: <20070104192151.GA20596@nevyn.them.org>

On 1/4/07, Daniel Jacobowitz <drow@false.org> wrote:
> 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.

I tried on 6.6 as well. The same error is gotten. Would you please let
me know what kind of environmental stuffs are relevant so that I
narrow down the problem?

Thanks,
Peng


  reply	other threads:[~2007-01-04 22:06 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
2007-01-04 22:06     ` Peng Yu [this message]
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=366c6f340701041406x160579b0v2e6c5e284d263a1c@mail.gmail.com \
    --to=pengyu.ut@gmail.com \
    --cc=gdb@sourceware.org \
    /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