c++/2318: unable to call templated functions in gdb 6.6
seanius@seanius.net
seanius@seanius.net
Fri Sep 14 14:38:00 GMT 2007
>Number: 2318
>Category: c++
>Synopsis: unable to call templated functions in gdb 6.6
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 14 14:38:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: seanius@seanius.net
>Release: 6.6
>Organization:
>Environment:
>Description:
due to the lack of the ability to call the operator<< on a class (i believe there are seperate pr's for this?), i've written and forcefully instantiated a small templated "dump" function:
using namespace std;
template<typename T> void dump(T x){ cout << x << endl; }
template void dump<int>(int x);
// more of the same for classes
due to *another* (reported) bug, the return type shows up in the name, so i try and call the function with:
(gdb) call 'void dump<int>(int)'(123)
../../../gdb-6.6/gdb/valops.c:2112: internal-error: find_oload_champ_namespace_loop: Assertion `new_oload_champ != -1' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
however, in gdb 6.3 it behaves as expected (modulo the wierd calling convention):
(gdb) call 'void dump<int>(int)'(123)
123
so i suppose this is a regression.
>How-To-Repeat:
compile a small program with those declarations, try to call dump.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gdb-prs
mailing list