This is the mail archive of the
mailing list for the GDB project.
[patch 1/3] Template Lookup
- From: sami wagiaalla <swagiaal at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 19 Jul 2010 11:28:28 -0400
- Subject: [patch 1/3] Template Lookup
Names of template symbols in debug info contains the full template
parameters such as:
while this is useful for differentiating various instances of template
it provides unnatural user experience when you user tries to call these
functions. For example:
(gdb) print foo<int>(1)
(gdb) print foo<char>('a')
This patch removes the template parameters from the name and stores the
cleaned name in a newly created variable 'search_name' in the -now
obstack allocated- 'cplus_specific' structure.
So now the user can do:
(gdb) print foo(1)
(gdb) print foo('a')
The function choice is made by overload resolution as it should be.
Functionality that required the fully qualified name still works. For
(gdb) break foo<char>
This is because if the user included template parameters in the name
then the template name is double checked for every hit.
This series was tested by running the testsuit on Fedora 13 with gcc
4.4.4 on x8664.
Description: Text document