(gdb) b main Breakpoint 3 at 0x423450: file server.c, line 3704. (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /root/redis-4.0.9/src/redis-server [Thread debugging using libthread_db enabled] Using host l...
Start it from the beginning? (y or n) y Starting program: /root/gdbtest/redis-4.0.11/src/redis-server [Thread debugging using libthread_db enabled] ...省略部分无关内容... 53062:M 10 Sep 17:11:10.810 * Ready to accept connections ^C Program received signal SIGINT, Interrupt. 0x00007f...
(gdb) start The program being debugged has been started already. Start it from the beginning? (y or n) y Temporary breakpoint 2 at 0x400a48: file debug.cpp, line 9. Starting program: /home/sek/demo/debuggy Temporary breakpoint 2, main () at debug.cpp:9 9 srand (time(NULL)); ...
登录后复制(gdb) run <--- 启动调试 登录后复制The program being debugged has been started already. 登录后复制Start it from the beginning? (y or n) y 登录后复制Starting program: /home/book/helloworld 登录后复制Helleo World. 登录后复制 登录后复制Breakpoint 2, main (argc=1, argv=0x7ffffff...
(gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /root/gdbtest/redis-4.0.11/src/redis-server [Thread debugging using libthread_db enabled] Using host libthread_db library “/lib64/libthread_db.so.1”.Breakpoint ...
Start it from the beginning? (y or n) y Starting program: /data/redis-5.0.3/src/redis-server [Thread debugging using libthread_db enabled] 退出GDB,会提示用户要关闭当前调试进程,是否继续退出: 34636:M 09 Nov 2020 00:10:31.427 * Ready to accept connections ...
Start it from the beginning? (y or n) y Temporary breakpoint 1 at 0x4005a7: file test.c, line 13. Starting program: /home/san/doc/./test Temporary breakpoint 1, main () at test.c:13 13 int i = 0; 注意:这里start命令敲击后,则程序从main函数的起始位置停下,开始逐步调试。
然我们完全控制了程序的执行,但仍然看不出哪里错了,因为错误不在main函数中而在add_range函数中,现在用start命令重新来过,这次用step命令(简写为s)钻进add_range函数中去跟踪执行: (gdb) startThe program being debugged has been started already.Start it from the beginning? (y or n) yTemporary breakpoin...
Start it from the beginning? (y or n) y Starting program: /data/redis-5.0.3/src/redis-server [Thread debugging using libthread_db enabled] 退出GDB,会提示用户要关闭当前调试进程,是否继续退出: 34636:M 09 Nov 2020 00:10:31.427 * Ready to accept connections ...
Start it from the beginning? (y or n) y Starting program: /root/redis-4.0.9/src/redis-server [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe588) at server.c:3704 ...