CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Debugger Breakpoint Errors

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
uslimey



Joined: 27 Aug 2011
Posts: 22
Location: Baltimore, MD

View user's profile Send private message

Debugger Breakpoint Errors
PostPosted: Wed Sep 05, 2018 10:05 am     Reply with quote

I am using a PIC18F67J60... I set break points in my code, run the code, and it either misses the breakpoints or breaks somewhere unrelated. When I look at the break points in the output file (listing), the break points don't align with the input file. Moreover, the debugger stops at different places.

I have spent a week trying to get to the bottom of this. I have rebuilt the entire project. I have also scanned all the source files for illegal characters. I have even uninstalled and reinstalled the PIC C IDE. Nothing I have done will allow the debugger to function the way it is supposed to.

The net result is that I have wasted an inordinate amount of time trying to debug code with a debugger that for whatever reason refuses to stop where I want it to.

Has anyone else experienced this?... Has anyone else found a solution for this?

Let me know.

Thanks,

Steve
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Sep 05, 2018 12:25 pm     Reply with quote

The problem is that if you place breakpoint, it applies 'inside' the function at the selected point. So if it calls a subroutine, you can be inside that routine. If an interrupt executes you will be inside this. The way to get a reliable break is to have an instruction that calls nothing. So something like delay_cycles(1) and break on this. Then barring interrupts you should be where you expect. If interrrupts are enabled you can still find yourself inside these (disable if you want to avoid this).
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group