DSPRelated.com
Forums

RE: Breakpoints won't stop in source codes?

Started by robert June 1, 2005
Sounds like the code you look at in CCS is not what is built and loaded.
_____

From: code-comp@code... [mailto:code-comp@code...] On Behalf
Of teng0422
Sent: Tuesday, May 31, 2005 5:54 PM
To: code-comp@code...
Subject: [code-comp] Breakpoints won't stop in source codes?
I built my .out file with a build script. Then I loaded it in CCS,
opened a source file and set breakpoints. At running the code, it
stopped at correspondent assembly spot instead of the source file I had
opened.
Does anyone know how to fix this?
Thanks a lot!
* To



>> From: code-comp@code... [mailto:code-comp@code...]
>> On Behalf Of teng0422
>> Sent: Tuesday, May 31, 2005 5:54 PM
>> To: code-comp@code...
>> Subject: [code-comp] Breakpoints won't stop in source codes?
>>
>> I built my .out file with a build script. Then I loaded it in CCS,
>> opened a source file and set breakpoints. At running the code, it
>> stopped at correspondent assembly spot instead of the source file I had
>> opened.
>> Does anyone know how to fix this?
>> Thanks a lot!
>>
>
> Date: Wed, 1 Jun 2005 19:59:08 -0500
> From: "robert" <r_obert@r_ob...>
> Subject: RE: Breakpoints won't stop in source codes?
>
> Sounds like the code you look at in CCS is not what is built and loaded.

Or else the code has been optimised by the compiler, so although the
intent of the C is being followed, there is no direct correspondence
to (for instance) the loop you are trying to debug.

If you examine the build script and see -O in the compiler flags list
(perhaps -O1 or -O=2) then it has been optimised. Remove this flag to
turn optimisation off (and ensure that there is a -g flag present).
See the Compiler manual (which varies between processor families) for
more information.