Oracle Solaris Studio 12.2:使用 dbx 调试程序

step

执行源代码的第一个指令时,会发生 step 事件。例如,可以使用以下语句获得简单跟踪:


when step { echo $lineno: $line; }; cont

启用了 step 事件后,即指示 dbx 在下次使用 cont 命令时自动单步执行。


注 –

step 命令终止时,不会发生 step(和 next)事件。step 命令是按照 step 事件实现的,实现方式大致如下: alias step="when step -temp { whereami; stop; }; cont"