当前位置: 技术问答>linux和unix
请教cygwin下用gdb调试代码的问题
来源: 互联网 发布时间:2016-01-23
本文导语: 下面这段代码编译和运行阶段都没有报错,但是使用gdb,在main函数前面设一个断点,run,再next就会报错,错误信息是 Program received signal SIGSEGV, Segmentation fault. 0x610ae938 in pthread_key_create () from /usr/bin/cygwin1.dll 源...
下面这段代码编译和运行阶段都没有报错,但是使用gdb,在main函数前面设一个断点,run,再next就会报错,错误信息是
Program received signal SIGSEGV, Segmentation fault.
0x610ae938 in pthread_key_create () from /usr/bin/cygwin1.dll
源代码是:
#include
using namespace std;
template
struct int2type
{
enum {value = v};
};
template
class NiftyContainer
{
private:
void DoSomething(T* obj, int2type) {
cout
Program received signal SIGSEGV, Segmentation fault.
0x610ae938 in pthread_key_create () from /usr/bin/cygwin1.dll
源代码是:
#include
using namespace std;
template
struct int2type
{
enum {value = v};
};
template
class NiftyContainer
{
private:
void DoSomething(T* obj, int2type) {
cout