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

Erratic Debugging

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



Joined: 10 Mar 2005
Posts: 6

View user's profile Send private message

Erratic Debugging
PostPosted: Wed Apr 13, 2005 2:09 pm     Reply with quote

Hello,
I'm having a problem debugging - sometimes when I set breakpoints, I get an error saying the breakpoint is invalid when it is on a valid line. I know that you can't put a breakpoint on a conditional ( if ) or a loop condition (for, while, do, switch, etc.) - I'm putting it on an assignment, a return etc. Also, when I step through the code the stepping doesn't always look correct (i.e., steps onto a closing bracket, etc.) Is this a problem with MPLAP IDE or the CCS plugin?
Thanks
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Apr 13, 2005 3:08 pm     Reply with quote

It sounds more like a problem with the debug info in the .coff file. The coff file format is a standard file format for debuggers used on many computer platforms. MPLAB had some problems fixed in recent versions, but I suspect there are situations where CCS is not very accurate in generating the debug info data as well.

Optmized code is always a problem to debuggers because how do you set a breakpoint on a source line when that source line was optimized away? Debugging your code with the optimization switched off will show to be much more accurate.

Do you have a small piece of example code where the debugger is stepping onto closing brackets? This is not correct and after analysing this we can post a bug report to CCS.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

Source files must end with CR/LF linefeed
PostPosted: Wed May 31, 2006 2:09 pm     Reply with quote

Using CCS v3.236 I was getting more and more problems of the debug output not being alligned with the assembly view in MPLAB. Getting very annoyed I finally decided to dig deep into this problem and by cutting away parts of my program I finally discovered the cause of my problems.

It turns out that the last line in each file must end with a Newline character (an empty line) !

The MPLAB editor will prevent this error by automatically adding a newline to your files in case you haven't provided one. I got these problems because I modified some files using another editor.

It seems like this bug has been solved in more recent versions. Testing with v3.241 gave correct results but v3.236 is the latest 'stable' release and I like to work with a version of which I know which bugs there are.
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