GDB 记录还原未按预期工作
gdb record restore not working as expected
我有这个简单的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
更新更多信息
(gdb) record save
warning: Memory read failed for corefile section, 4096 bytes at 0xffffffffff600000.
Saved core file gdb_record.6490 with execution log.
(gdb) s
Single stepping until exit from function main,
which has no line number information.
Hello
__libc_start_main (main=0x5555555551a9 <main>, argc=1, argv=0x7fffffffe108,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe0f8) at ../csu/libc-start.c:342
342 ../csu/libc-start.c: No such file or directory.
可能是你没有用a.out启动gdb。所以应该是
gdb a.out
record restore gdb_record.21158
record goto end
相关文章:
- QSqlquery prepare()和bindvalue()不工作
- 导入库可以跨dll版本工作吗
- 将两个数组中的差异记录在第三个数组中
- 以螺旋方式打印矩阵的程序.(工作不好)
- 对象指针在c++中是如何工作的
- 为什么在Windows上的VS 2019和Clang 9中"size_t"在没有标题的情况下工作
- VSOMEIP-2个设备之间的通信(TCP/UDP)不工作
- 为字符串中每 N 个字符插入空格的函数没有按照我认为的方式工作?
- C++为线程工作动态地分割例程
- 为什么我的 std::ref 无法按预期工作?
- 布尔比较运算符是如何在C++中工作的
- SampleConsensusPrerejective(ext.RANSAC)是如何真正工作的
- 不确定要在我的main中放入什么才能使我的代码正常工作
- 为什么std::condition_variable notify_all的工作速度比notify_one快(对于随机请
- Boost Log的琐碎记录器"lazy evaluation"是如何工作的?
- 在OpenSSH中记录密码.它是如何工作的?sshconnect2.c.
- C ++键盘记录器无法正常工作
- GDB 记录还原未按预期工作
- Visual 2013 插件,用于记录您在项目上工作的时间。
- SOCI, pgsql函数返回表记录- type_conversion不工作