Bug 10476 - gdb.type.template_argument( N ) for NON-TYPE parameters throws incorrect exception
Summary: gdb.type.template_argument( N ) for NON-TYPE parameters throws incorrect exce...
Status: RESOLVED DUPLICATE of bug 11060
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: archer
: P1 normal
Target Milestone: 6.8
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-04 04:33 UTC by Lucien Murray-Pitts
Modified: 2010-01-25 20:06 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Shell to kick off the test, remember to set the GDB Path to arch (277 bytes, text/plain)
2009-08-04 04:34 UTC, Lucien Murray-Pitts
Details
Example program that will cause the error... (676 bytes, text/plain)
2009-08-04 04:35 UTC, Lucien Murray-Pitts
Details
Workaround Pretty Printer example... (1.47 KB, text/plain)
2009-08-04 04:35 UTC, Lucien Murray-Pitts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucien Murray-Pitts 2009-08-04 04:33:59 UTC
I was attempting to write a pretty pritner for a class and found that I cant get
the arguments to a template if they are anything OTHER than a type (eg if they
are bool, int, or other non-type datas).  

I was trying this with the 6.8.50 from 2009-08-3rd and got the following sort of
output...

    gdb main
    b some-line
    run
    print MyTest
    { var=10, woo=30 }
    py print gdb.history(0).type.template_argument(0)
    int
    py print gdb.history(0).type.template_argument(1)
    float
    py print gdb.history(0).type.template_argument(2)
    RuntimeError: No type named 12.
    py print gdb.history(0).type.template_argument(3)
     Traceback (most recent call last):
     File "<string>", line 1, in <module>
     RuntimeError: No type named EN_THREE.
     Error while executing Python code.
    py print gdb.history(0).type.template_argument(4)
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
     RuntimeError: No type named true.
     Error while executing Python code.
    py print gdb.history(0).type.template_argument(5)
     Traceback (most recent call last):
      File "<string>", line 1, in <module>
     RuntimeError: No type named func.
     Error while executing Python code.
    py print gdb.history(0).type.template_argument(6)
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
     RuntimeError: No type named (double&)(&Y).
     Error while executing Python code.
    py print gdb.history(0).type.template_argument(7)
     Traceback (most recent call last):
      File "<string>", line 1, in <module>
     RuntimeError: No type named (char*)(&cstr_two).
     Error while executing Python code.
Comment 1 Lucien Murray-Pitts 2009-08-04 04:34:51 UTC
Created attachment 4107 [details]
Shell to kick off the test, remember to set the GDB Path to arch
Comment 2 Lucien Murray-Pitts 2009-08-04 04:35:07 UTC
Created attachment 4108 [details]
Example program that will cause the error...
Comment 3 Lucien Murray-Pitts 2009-08-04 04:35:21 UTC
Created attachment 4109 [details]
Workaround Pretty Printer example...
Comment 4 Tom Tromey 2010-01-25 20:06:09 UTC

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