Debugger jumping around in code

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

Debugger jumping around in code

281 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JGold on Tue Sep 14 13:00:24 MST 2010
I am single stepping through my code, and the debugger will jump to unrelated lines of code, then jump back.  Am I using he wrong settings on the debugger?  What is the best way to have it set up?  I am running code on the Xpresso 1768 board.  It does the same thing on my target board.
0 Kudos
3 Replies

270 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Sep 14 14:46:58 MST 2010

Quote: jgold
That did not fix it.  If anything, things are worse now. 


The FAQ I pointed you at largely is focussed on explaining optimisation, so it is not immediately clear as to exactly *what* did not fix it. Can you clarify exactly what you did?


Quote:
I am getting build errors where none existed before, even in modules I can not access.

What build errors are you actually encountering?

I suggest that you try doing a clean of your project, then build it again. Then copy'n'paste the build log out of the IDE into this thread.

Regards,
CodeRedSupport
0 Kudos

270 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JGold on Tue Sep 14 14:34:10 MST 2010
That did not fix it.  If anything, things are worse now.  I am getting build errors where none existed before, even in modules I can not access.

I have optimization turned off (O0), and debug level to default (-g), and am set to debug build.

Is there a good base line I can set everything to? 

Is there an 'OH CRAP" button that will return everything to good running factory defaults?
0 Kudos

270 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Sep 14 13:27:12 MST 2010
Are you debugging code built for debug or for release?

From your description it sounds like you are probably trying to debug a release build? If so, then the following knowledgebase entry includes some information on compiler optimization and its effect on debugging:

http://lpcxpresso.code-red-tech.com/LPCXpresso/node/26
[login required]

Regards,
CodeRedSupport
0 Kudos