输入banner图图片脚本导航/分类

using gdb to debug c program

  printf("   x is %d and is stored at %p.\n", x, &x);

6, 继续。 gdb> c

Continuing.
   x is 5 and is stored at 0xbfffeb58.
   xptr points to 0xbfffeb58 which holds 5.


Breakpoint 2, main () at test.c:10
10   display(x, xptr);

7, 继续。 gdb> c

Continuing.
In display():
   z is 5 and is stored at 0xbfffeb40.
   zptr points to 0xbfffeb58 which holds 5.
[Inferior 1 (process 11616) exited normally]




9, for step, using step

10, for backtrace, using bt


版权声明:本文为博主原创文章,未经博主允许不得转载。

using gdb to debug c program

标签:c   gdb   dbug   break point