GDB-UI试用 发表于 2017-12-09 | 分类于 技术积累 | | 1 源码 12345678910111213141516171819typedef struct { float a; float b;} substruct;struct { int i; substruct r;} c;void main() { int n = 4; int m[10] = {0,1,4,9,16,25,36,49,64,81}; n = 5; myproc(n); c.i = 1; c.r.a = 0.5; c.r.b = 0.25;} 123456void myproc(n){ int p; p = 2*n; printf("Two times %d is %d\n", n, p);} 用 -g 选项编译程序: 12cc -g -c myproc.ccc -g -o myprog myprog.c myproc.o 2 使用 参见在Emacs中使用gdb调试程序。 Last Updated 2017-12-11 Mon 13:54.Render by hexo-renderer-org with Emacs 25.3.2 (Org mode 8.2.10)