我正在阅读使用CoreSight Trace Techniques的IAR描述,并且遇到了生成“代码覆盖率统计”的示例。
他们多次引用“步骤”。在IAR站点内对“步骤点”进行站点搜索仅生成上述链接。
我们可以轻松定义 说明 和 代码行 ,那么究竟是什么是 步骤 ,或者更好的是,链接中引用的 步骤级 以上?
答案 0 :(得分:1)
步骤点似乎是IAR如何描述可执行语句。例如,查看here并搜索步骤点会显示如何一次遍历代码一个语句。
步数点水平可能是已采取或未采取的分支。
快速代码示例:
//next two step points are at the same step point level. There's no branch,
//they will both always execute
unsigned char qwerty=5;
if(timer == 0x15)
{
Foo(5); // another step point, a different step point level than above
}
else
{
// the next two step points are at the same step point level, as depending on
// the branch will either hit both or neither.
unsigned char temp=5;
Foo(temp);
}