Breakpoint directly on C source code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Breakpoint directly on C source code

Jump to solution
1,804 Views
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

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
1,609 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,609 Views
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 Kudos
Reply
1,609 Views
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 Kudos
Reply
1,610 Views
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 Kudos
Reply