C++ 是否可能在gdb中的模板类的隐式声明方法处中断?
这里有一个例子。我尝试用3-4个签名组合设置一个中断,但所有内容都被检测为未定义C++ 是否可能在gdb中的模板类的隐式声明方法处中断?,c++,templates,gdb,C++,Templates,Gdb,这里有一个例子。我尝试用3-4个签名组合设置一个中断,但所有内容都被检测为未定义 #include <iostream> template <class T> class C { public: void f(){std::cout << "f()\n";} }; int main() { C<int> c1; C<int> c2(c1); c2.f(); } Both "b C::C(const C&
#include <iostream>
template <class T>
class C
{
public:
void f(){std::cout << "f()\n";}
};
int main()
{
C<int> c1;
C<int> c2(c1);
c2.f();
}
Both "b C::C(const C&)" and
"b C<int>::C(const C<int>&)" fail to break at implicitly declared copy constructor.
#包括
模板
C类
{
公众:
void f(){std::cout gdb只知道编译器定义的符号。如果编译器不发出符号,gdb就没有什么可中断的。