 |
| Author |
Message |
|
|
Posted: Jun 15, 2012 - 03:48 PM |
|

Joined: Sep 23, 2005
Posts: 387
Location: UK
|
|
I'm debugging something I've written with CodeVisionAVR. I'm finding that I often need multiple presses of "step into" to move to the next C statement, and it's for-flipping-ever dropping into an assembler window I never wanted to go to. Of course it stays in there even once it returns to an address range that can be used in the C source window, and I have to show next source statement and close the assembler window to step further, at which point it all happens again.
It's all a bit tedious - have I got it set up wrong?
TVM
David |
|
|
| |
|
|
|
|
|
Posted: Jun 15, 2012 - 03:52 PM |
|


Joined: Jul 18, 2005
Posts: 62292
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
| I imagine if switches to asm when it accesses code for which the source is not visible (library functions?) and as soon as there is an Asm window the "step" function changed from "step one C statement" to "step one asm instruction" so if that Asm window remains open then even when you get back to the C it will still step opcode wise. |
_________________
|
| |
|
|
|
|
|
Posted: Jun 15, 2012 - 05:40 PM |
|

Joined: Sep 23, 2005
Posts: 387
Location: UK
|
|
| All agreed, but it's not to do with library functions. Far too often for that. I have a feeling it is happening because the optimiser is extracting common code and when that is invoked the source can't be found - though in truth I'd like that code to just run till it gets back to the start of a C statement - I don't want to see it. |
|
|
| |
|
|
|
|
|
|
|