
编程
文章平均质量分 50
Xiaobai__Lee
湖大土拨鼠
展开
-
GDB调试子进程
GDB调试子进程设置和指令follow-fork-mode设置detach-on-fork设置inferior指令解决方法 设置和指令 GDB调试子进程主要用到两个设置,一个是 set follow-fork-mode [parent|child] ,另外一个是 set detach-on-fork [on|off] 。具体的使用规则如下: follow-fork-mode设置 follow-fork-mode设置默认的是parent,即追踪父进程,如果设置为child之后,便会追踪子进程。但是只会追踪第一原创 2021-08-26 20:47:50 · 4168 阅读 · 0 评论 -
c语言数组及结构体常用赋值方法
c语言数组赋值及结构体赋值高阶用法 #include <stdio.h> #define N 8 int a[] = {0, 1, 2, 3, 4, 5, 6, 7}; int b[N] = {0, 1, 2, 3, 4}; int c[N] = { [0 ... 3] = 233, 9, [5 ... 6] = 666 }; int d[N] = {233}; int e[] = { [0 ... 7] = 233 }; int f[N] = {0}; int g[N]原创 2020-10-12 20:36:29 · 2905 阅读 · 0 评论