使用範例 :
考慮代碼如下 :
- #include
- int main(int argc, char **argv) {
- int i;
- for(i=0; i
- printf("%s\n", argv[i]);
- }
- return 0;
- }
This is a blog to track what I had learned and share knowledge with all who can take advantage of them
start | Run debugged program until the beginning of the main procedure.
run, r | Start debugged program (till break point)
(gdb) start <開始執行程式, 並停留在 main 入口處>
Temporary breakpoint 1 at 0x804841d: file demo_run-start.c, line 5.
Temporary breakpoint 1, main (argc=1, argv=0xbffff514) at demo_run-start.c:5
5 for(i=0; i(gdb) list 8 <列出第 8 行附近程式碼>
3 int main(int argc, char **argv) {
4 int i;
5 for(i=0; i6 printf("%s\n", argv[i]);
7 }
8 return 0;
9 }
(gdb) break 8 <在第8 行設斷點>
Breakpoint 2 at 0x8048449: file demo_run-start.c, line 8.
(gdb) c <繼續程式執行, c=continue>
Continuing.
/root/gdbDemo/demo_run-start
Breakpoint 2, main (argc=1, argv=0xbffff514) at demo_run-start.c:8 <程式如預期停在第 8 行>
8 return 0;
Source From Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 # git clean -d -fx 方案2: 今天在服务器上 gi...
沒有留言:
張貼留言