Incorrect single step debugging on Atmel Studio 7.0.1645

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

New user of Atmel Studio.

Using an Atmel ICE with a ATSAM4E, debugging c-code.
I am single stepping through the code using Step Into (F11), but it exhibits strange behavior when executing if-statements.

It appears to execute BOTH the true and false options for the condition .... ???

First the cursor and yellow highlight stops at the if-condition, since the condition is true, it executes the code below.
But when returning, it also highlights the code for the 'else' condition as if it is going to execute it as well !!??
The yellow arrow to the far left side of the highlighted line of code clearly states that "This is the next statement that will be executed. (blah blah)"

What is going on ?

Thanks.

Attachment(s): 

Hammerson

Last Edited: Fri. Oct 25, 2019 - 07:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you use -og for debug optimize when you compiled your code?   gcc will highly optimize your code, changing the order and content which surprises many newby's!

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using (-Og) now and debugging behaves in a more logical sense.
Thank you ki0bk.

Hammerson