Greetings,
I am having some troubles setting breakpoints in my program. I use to be able to double click on a line to set a halt break point but now when I double click on a line it jumps the beginning of a call function. Can anyone help me out?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Greetings,
I am having some troubles setting breakpoints in my program. I use to be able to double click on a line to set a halt break point but now when I double click on a line it jumps the beginning of a call function. Can anyone help me out?
Hi David,
It sounds like you turn on optimization so that you can no longer set your breakpoint on the exact source line anymore. Go to mixed mode in the editor and see if you see the source and assembly is interleaved nicely (or not)
thanks
ki
The Mixed source/asm in not enabled. And even if I enable it I still can not set break points on exact lines.
Can you set your breakpoint on the corresponding assembly instruction in the disassembly window?
When I click on the line a break point is set on an ASM line but multiple lines go to the same assembly line. That can't be right can it?
Without a reproducible test case, all I can do is take guesses. Could you provide a simple test case (project and built executable)?
Does this error help:
Trouble Setting Breakpoint with the Action "Halt Target" at 0x33a4ea: Error 0x00000008/-2047 Error during: Break Point, Unable to set hardware breakpoint at 0x0033A4EA
also here is a screen shot to the error I am having. http://imgur.com/bSdVSxX
The screenshot is more helpful. I can see you are using a 2833x device. I assume you tried to set a breakpoint on the line highlighted in grey but the hardware breakpoint was attempted to be set at the start of the function.
28x devices have a limited number of emulation resources. You can only set a maximum of two hardware breakpoints. The debugger will often set breakpoints at main and the exit point of your application.
Also please enter mixed mode in the editor and provide another screenshot.
Again - if you could provide an test case that i can try out myself, I can provide more helpful responses.
Thanks
ki
I would have to send you my whole code and I don't want to post in online. Here is a screen shot of the mixed mode trying to set a break point on the same line as before Msg_Flags.bit.spia_rx_rdy=0;
http://imgur.com/sUiynRe
That screenshot tells me that you are building with -o2 (function level) or greater optimization. Is this correct?
David Marcus said:How can I tell?
Check your build options (right click on your project and select 'build options' in the context menu)
David Marcus said:Also how do I remove my hardware breaks?
In the breakpoint window, the second and third icons (from the left) in the window are for removing breakpoints
My Opt level is (-o3) and program level opt is none.
Also there shows no active break points in the window.
You will not get much debug visibility with -o3:
http://processors.wiki.ti.com/index.php/Debug_versus_Optimization_Tradeoff
With file level optimization (-o3), I would not expect to be able to set source line breakpoints. They would get moved to the top of the function as you are observing. I would stick to setting breakpoints via the disassembly view or at a specific address.
I can change the opt level to oo, o1, o2, or o3. Can I change them to another one to get better breakpoint placement or will this affect my code?
-g with no -o setting will give you best debug visibility, including the ability to set source level breakpoints. But of course that will negatively impact the performance of your application.
It looks like I am having all sorts of issues and you have been so helpful and I appreciate you're time and patience with me. When I try and set a break point the break points don't stay red. They flash red then go back to a grey/white color. I really need to get these break points working.
David Marcus said:When I try and set a break point the break points don't stay red. They flash red then go back to a grey/white color. I really need to get these break points working.
CCS is unable to set the breakpoints for some reason. Are you still getting this after rebuilding with optimization disabled and with -g?
See if you can set a breakpoint by specifying the address instead of using the editor margin