* How to print the return value of a template member function
@ 2006-11-15 22:53 Peng Yu
2006-11-15 23:08 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Peng Yu @ 2006-11-15 22:53 UTC (permalink / raw)
To: gdb
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<int, int> 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<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>
(gdb)
Thanks,
Peng
$ 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;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to print the return value of a template member function
2006-11-15 22:53 How to print the return value of a template member function Peng Yu
@ 2006-11-15 23:08 ` Andreas Schwab
2006-11-16 1:09 ` Peng Yu
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2006-11-15 23:08 UTC (permalink / raw)
To: Peng Yu; +Cc: gdb
"Peng Yu" <pengyu.ut@gmail.com> writes:
> 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?
Works for me with gdb 6.5.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to print the return value of a template member function
2006-11-15 23:08 ` Andreas Schwab
@ 2006-11-16 1:09 ` Peng Yu
2006-11-16 1:22 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Peng Yu @ 2006-11-16 1:09 UTC (permalink / raw)
Cc: gdb
On 11/15/06, Andreas Schwab <schwab@suse.de> wrote:
> "Peng Yu" <pengyu.ut@gmail.com> writes:
>
> > 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?
>
> Works for me with gdb 6.5.
>
> Andreas.
Hi Andreas,
I don't see version 6.5. Would you please let me know where to get it?
http://www.gnu.org/software/gdb/
Thanks,
Peng
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to print the return value of a template member function
2006-11-16 1:09 ` Peng Yu
@ 2006-11-16 1:22 ` Andreas Schwab
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2006-11-16 1:22 UTC (permalink / raw)
To: Peng Yu; +Cc: gdb
"Peng Yu" <pengyu.ut@gmail.com> writes:
> I don't see version 6.5. Would you please let me know where to get it?
http://sourceware.org/ml/gdb/2006-06/msg00168.html
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-16 1:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15 22:53 How to print the return value of a template member function Peng Yu
2006-11-15 23:08 ` Andreas Schwab
2006-11-16 1:09 ` Peng Yu
2006-11-16 1:22 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox