调试 汇总

lance9527 / 2023-08-15 / 原文

1:单步可以而全速运行不行的情况一般出现在时序上,通过加入一小段延时,问题得以解决。而 printf 往往是一个需要阻塞运行很久的一个函数

2:提示警告 cast increase required alignment of target type,解决方法为类型强转前加 (void*)  比如 udp_fakehead = (struct udp_fakehead *)(void *)ptr;