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.
Created attachment 4107 [details] Shell to kick off the test, remember to set the GDB Path to arch
Created attachment 4108 [details] Example program that will cause the error...
Created attachment 4109 [details] Workaround Pretty Printer example...
*** This bug has been marked as a duplicate of 11060 ***