Jump to content
Sign in to follow this  
Reynard

Bug:single Step Runs Forever

Recommended Posts

Pressing Step Into or Step over causes debugger to run forever after a couple of steps.

 

Program should just loop in single step mode forever for each button press.

 

#include <system.h>

 

unsigned char ucTest;

bool bTest;

 

void main(void)

{

bTest = false;

 

for (;:( {

if (bTest) {

ucTest = 1;

}

}

}

 

Also, pressing the reset button (after stopping run forever) does not reset the debug cursor to the first instruction.

 

Using: BoostC & IDE 6.81

Windows XP Pro SP2

PIC16F873A

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites
Pressing Step Into or Step over causes debugger to run forever after a couple of steps.

 

Program should just loop in single step mode forever for each button press...

 

See no problem here. The code loops around 2 assembly instructions that both belong to the same source code line so there is no opportunity for execution line to advance to any other source code line. That's why it looks like stepping takes forever.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites
Pressing Step Into or Step over causes debugger to run forever after a couple of steps.

 

Program should just loop in single step mode forever for each button press...

 

See no problem here. The code loops around 2 assembly instructions that both belong to the same source code line so there is no opportunity for execution line to advance to any other source code line. That's why it looks like stepping takes forever.

 

Regards,

Pavel

 

And there was me thinking it would step through the lines of source code including the for (;:(. Doh !

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...