This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb does not stops inside a template function


> Hi.
>  I have the following problem with gdb6.3 :
> If I put a breakpoint on a line inside a function template,
> the gdb not always stops there.


> Please see attached ".cpp" file and the gdb session transcript
> (file: "templ_dbg.1.output").
> It can be seen that gdb stops on first call to "f",
> but not on second.

...
(gdb) break templ_dbg.cpp:4

I think you need to do:

(gdb) b int const f<int>(int const&)
(gdb) b double const f<double>(double const&)

if you want it to stop at both places.  Completion makes them easier
to type:

(gdb) b int<TAB>
(gdb) b double<TAB>

(Although I can only see how to select a candidate using Emacs.)

-- 
Nick                                           http://www.inet.net.nz/~nickrob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]