Breakpoint directly on C source code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Breakpoint directly on C source code

跳至解决方案
1,764 次查看
patonsebastien
Contributor I

Hi

 

I start to work with Codewarrior 10.6 and I have a little question about the breakpoint placement during debug session.

 

I have a code written like this:

 

test:

if(PTAD_PTAD1==1){PTBD_PTBD1=1}else{PTBD_PTBD1=0;}

goto test;

 

I can place breakpoint on the line (before if instruction) but is it possible to place a breakpoint only in the "else" bloc ?

 

Thanks

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,569 次查看
BlackNight
NXP Employee
NXP Employee

Settings in the Editor/source view only works line by line, so you cannot set there a breakpoint on the else part, if you have all the source on a single line.

But you can use the disassembly view: here you can set breakpoints on the else block (on the assembly instruction).

Otherwise see

http://mcuoneclipse.com/2012/10/27/assembly-instruction-stepping/

Erich

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,569 次查看
patonsebastien
Contributor I

Thank you for the answer. I hope one day codewarrior 10 will support the breakpoints like this. It was sometimes very useful on Hiwave

0 项奖励
回复
1,569 次查看
matthewkendall
Contributor V

As Erich said, placing breakpoints on C code works on a line-by-line basis. If you need a breakpoint on the else clause, the most straightforward thing to do is to insert a couple of newlines, so that the if and the else clauses are on separate lines.

0 项奖励
回复
1,570 次查看
BlackNight
NXP Employee
NXP Employee

Settings in the Editor/source view only works line by line, so you cannot set there a breakpoint on the else part, if you have all the source on a single line.

But you can use the disassembly view: here you can set breakpoints on the else block (on the assembly instruction).

Otherwise see

http://mcuoneclipse.com/2012/10/27/assembly-instruction-stepping/

Erich

0 项奖励
回复