gdb记录还原未按预期工作

时间:2015-01-21 19:20:17

标签: c++ debugging segmentation-fault gdb g++

我有这个简单的C ++程序

#include <iostream>
using namespace std

int main() {
 cout << "Hello" << endl; 
 return 0;
}

该程序不会发生段错误。

我像这样运行gdb:

gdb a.out
break main
run
target record
record save
s
record stop
c
quit

然后我再次调用gdb:

gdb
record restore gdb_record.21158
[New LWP 21158]
Core was generated by `a.out'.
Program terminated with signal 5, Trace/breakpoint trap.
\#0  0x08048617 in ?? ()
Segmentation fault

0 个答案:

没有答案