Re: Infcall of a template function in a C++ program
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> ">" == Aktemur, Tankut Baris <[email protected]> writes: >> The compiler is able to do the type inference, template function >> instantiation, and function invocation based on the expressions `foo (5)` >> and `foo ('a')`. When we start GDB and attempt to evaluate these >> expressions, the corresponding functions are not resolved, though. >> Opinions on how to address this problem properly are welcome. Once upon a time, Sami Wagiaalla wrote some patches to do this. I don't believe they ever went in. I don't remember why any more. However, perhaps they could be resurrected. They were sent to gdb-patches, years ago now. The "compile" command might also be promising here, though I don't know how well the C++ support handles templates. It's a difficult problem given the way the "compile" command was designed, because the source isn't available and DWARF doesn't represent templates, only instantiations. Tom