打印

keil调试条件断点的疑问

[复制链接]
3698|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
srgr|  楼主 | 2008-1-31 13:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
版本: C Compiler  V8.02   (d版,**的)
Linker/Locator     BL51.exe  V6.00
Dialog.DLL         DCYG.DLL  V2.45
                   TCYG.DLL  V2.45


今在调试时使用, 条件断点出现了以下这个问题:
void delayX1ms(uint n)
{
    uint i, j, k;
    for (i = 0; i < n; i++)
       for (j = 0; j < 190; j++)
           for (k = 0; k < 10; k++)
              ;
}
法一:debug-->Breakpoints-->expression: j==9   Count: 1  Command:缺省
调试在j==9时,程序挂起,达到预期目的。

法二:调试command 窗口 输入
BS  j==9, 1 
在j==9时,程序没有挂起。反复思考,反复实验,法二,有时可以,有时不行。不知道是不是版本的问题。或者是d版的问题。

还强高手指出 用bs 命令和对话框设置有什么不同。
从u Visoin help没有看出什么不同!!!!!

//**************************************************
BreakSet exp , cnt , "cmd" Sets an execution or conditional breakpoint 

is a command string that specifies a µVision3 command to execute when the breakpoint occurs. When no command is specified, µVision3 halts program execution when a breakpoint occurs. If a command is specified, µVision3 only executes the command and the target program does not stop. The command may specify a µVision3 user or signal function. You may set the _break_ variable to 1 to halt program execution.



相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

30

主题

68

帖子

1

粉丝