This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/12520] cannot parse function types as templateparameters
- From: "zilla at kayari dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Feb 2011 17:31:34 +0000
- Subject: [Bug python/12520] cannot parse function types as templateparameters
- Auto-submitted: auto-generated
- References: <bug-12520-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12520
--- Comment #1 from Jonathan Wakely <zilla at kayari dot org> 2011-02-25 17:31:29 UTC ---
I applied Ian's change to the copy of libiberty/cp_demangle.c in the gdb-7.2
sources, rebuilt, and tried again. That causes the correct type to be displayed
for the second example:
RuntimeError: No type named int ().
But it doesn't prevent the error.
It makes no difference to the first example:
RuntimeError: syntax error, near `)>, std::less<int>, std::allocator<st'
So http://gcc.gnu.org/PR46332 doesn't change anything, GDB still can't
pretty-print templates involving function types.
The "No type named int ()" error is curious, because the container's value_type
is "int(*)()" so I don't know what it's doing looking up "int()" anyway.
Here's a slightly simpler example using <vector> not <map>, and showing both
problems:
#include <vector>
template<typename Callable> struct function { };
int main()
{
typedef function<int()> func_type;
std::vector<func_type> m;
typedef int(*funcptr_type)();
std::vector<funcptr_type> m2;
return 0;
}
Neither 'm' nor 'm2' can be pretty-printed
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.