public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/11546] New: CR: Python gdb.Type method template_argument fails for non-type template arguments
@ 2010-04-27 15:22 ariels at correlix dot com
  2010-04-27 15:23 ` [Bug python/11546] " ariels at correlix dot com
  2010-04-27 15:25 ` tromey at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: ariels at correlix dot com @ 2010-04-27 15:22 UTC (permalink / raw)
  To: gdb-prs

I have C++ types containing non-type template parameters.  In the attached
program nontype.cc `eleven' is a variable of such a type.  I cannot get at the
template parameter n because of this limitation.  Unfortunately in my real class
such a parameter is relevant for pretty-printing.

[ariels@...]$ gdb ~/dev/Tests/C++/nontype
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ariels/dev/Tests/C++/nontype...done.
(gdb) b main
Breakpoint 1 at 0x400530: file ./nontype.cc, line 11.
(gdb) r
Starting program: /home/ariels/dev/Tests/C++/nontype

Breakpoint 1, main () at ./nontype.cc:11
11          return eleven.get();
(gdb) python print gdb.parse_and_eval('eleven').type
F<11>

(gdb) python print gdb.parse_and_eval('eleven').type.template_argument(0)
Traceback (most recent call last):
  File "<string>", line 1, in ?
RuntimeError: No type named 11.
Error while executing Python code.

-- 
           Summary: CR: Python gdb.Type method template_argument fails for
                    non-type template arguments
           Product: gdb
           Version: 7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: ariels at correlix dot com
                CC: gdb-prs at sourceware dot org
  GCC host triplet: Linux ... 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21
                    EST 201


http://sourceware.org/bugzilla/show_bug.cgi?id=11546

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug python/11546] CR: Python gdb.Type method template_argument fails for non-type template arguments
  2010-04-27 15:22 [Bug python/11546] New: CR: Python gdb.Type method template_argument fails for non-type template arguments ariels at correlix dot com
@ 2010-04-27 15:23 ` ariels at correlix dot com
  2010-04-27 15:25 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ariels at correlix dot com @ 2010-04-27 15:23 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From ariels at correlix dot com  2010-04-27 15:23 -------
Created an attachment (id=4753)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4753&action=view)
nontype.cc

Sample program for description.  Compile with:
   g++ -fno-inline -g3 ./nontype.cc -o nontype
then open in gdb.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11546

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug python/11546] CR: Python gdb.Type method template_argument fails for non-type template arguments
  2010-04-27 15:22 [Bug python/11546] New: CR: Python gdb.Type method template_argument fails for non-type template arguments ariels at correlix dot com
  2010-04-27 15:23 ` [Bug python/11546] " ariels at correlix dot com
@ 2010-04-27 15:25 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at redhat dot com @ 2010-04-27 15:25 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2010-04-27 15:25 -------


*** This bug has been marked as a duplicate of 11060 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=11546

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-27 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-27 15:22 [Bug python/11546] New: CR: Python gdb.Type method template_argument fails for non-type template arguments ariels at correlix dot com
2010-04-27 15:23 ` [Bug python/11546] " ariels at correlix dot com
2010-04-27 15:25 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).