Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Why I cannot to choose some parts as breakpoint in the Keil? please consider to these pictures:

figure1

figure2

If you consider to some parts that I determined, you will know that I cannot to select those as a breakpoint. Why? some of them are function. that's odd to me.

Note that we can choose some parts that are determined with a gray square at the left but if you consider the parts that I determined don't have it.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

That is because those lines were optimized out and not compiled into actual instructions. No machine instruction means nothing to break on. If you take a look into the disassembly window, you can see there is no assembly code associated with them.

share|improve this answer
    
+1 and thanks to you and slap to my face! I don't know why I had not considered to this! –  Roh Aug 25 at 18:09
1  
If you really want to break on those lines, or close to them you should add a __nop(); intrinsic, which generates a NOP instruction that you can set a breakpoint on. –  Zuofu Aug 25 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.