old-cross-binutils/gdb/testsuite/gdb.cp/mb-templates.cc
Vladimir Prus ed0616c6b7 * breakpoint.c (remove_sal): New.
(expand_line_sal_maybe): New.
	(create_breakpoints): Call expand_line_sal_maybe.
	(clear_command): Add comment.
	(breakpoint_re_set_one): Call expand_line_sal_maybe.
	* linespec.c (decode_indirect): Set explicit_pc to 1.
	(decode_all_digits): Set explicit_line to 1.
	(append_expanded_sal): New.
	(expand_line_sal): New.
	* linespec.h (expand_line_sal): Declare.
	* symtab.c (init_sal): Initialize explicit_pc
	and explicit_line.
	* symtab.h (struct symtab_and_line): New fields
	explicit_pc and explicit_line.
2007-09-24 07:40:32 +00:00

19 lines
252 B
C++

#include <iostream>
using namespace std;
template<class T>
void foo(T i)
{
std::cout << "hi\n"; // set breakpoint here
}
int main()
{
foo<int>(0);
foo<double>(0);
foo<int>(1);
foo<double>(1);
foo<int>(2);
foo<double>(2);
}