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.
Tool/software: Code Composer Studio
I am developing a large complex program that became difficult to debug a few months ago because the debugger started stopping often (after running for less than a second) at seemingly random "phantom breakpoints". Telling it to continue running worked consistently. The program ran fine if I pressed Stop to disconnect the debugger. Disabling all breakpoints didn't help. Deleting all breakpoints I had set didn't help. There is a lot more to the story, but it may be irrelevant, so I'll jump to the end and backtrack if needed.
Today I switched one of the panes in the debug view from showing Expressions to showing a Memory Browser (so I could check stack usage) and it started working perfectly, breaking at intentional breakpoints but never at a "phantom" breakpoint. Switching back to the Expressions tab made the phantom breakpoints reappear. I suspect a timing issue in CCS, but don't know how to pursue that any further. I am using a TM4C123 Launchpad connected directly (no USB hub) to the front of my PC.
Displaying the Memory Browser is a simple workaround for my issue, but I would be glad to help track down the root issue if someone will tell me how to proceed.
Steve
Hi Steve,
That is certainly an odd issue, especially since is seems to be specific to one view (Expressions). What exact version of CCS are you using? And does the issue occur with any program, or just that specific one?
Can you also try using a new clean workspace folder to see if that helps?
Thanks
ki
Thanks for the reply, Ki.
TL;DR A particular entry in the Expressions view apparently caused phantom breakpoints. Removing and recreating it seemingly fixed the problem.
> That is certainly an odd issue, especially since is seems to be specific to one view (Expressions).
I did some more testing on that. With breakpoints disabled and the Memory Browser visible, I started the program. It ran fine (no phantom breakpoints). I switched tabs from Memory Browser to Expressions while it was running and it immediately stopped at a phantom breakpoint. I clicked Resume a few times; it always stopped at a phantom breakpoint in less than a second. I switched back to the Memory Browser tab and clicked Resume; it ran continuously without breaking.
I then dragged the Memory Browser out of the pane with the Expressions tab to a different pane and selected each of those tabs so one was visible in each of the two panes. It stopped at phantom breakpoints. So making the Memory Browser visible apparently is not what makes it run continuously.
I hid Expressions by switching that pane to the Registers tab; it ran continuously. While it was running, I switched back to the Expressions tab; it hit a phantom breakpoint almost immediately. This was repeatable. So it seems that showing the Expressions tab is what makes it stop at phantom breakpoints. My Expressions tab looks like this:
I started removing the expressions one at a time, starting at the end, checking to see if it still stopped at phantom breakpoints after removing each one:
Removing last_pMenuInfo enabled it to run continuously. I added it back; it still runs continuously. I added the others back and it runs continuously. I rearranged my browser tabs back to how they were originally and it runs continuously. I stopped and restarted the debug session, exited and restarted CCS; nothing I have found makes the problem come back. So it seems like deleting and recreating the expression for last_pMenuInfo fixed the problem.
> What exact version of CCS are you using?
Version: 10.0.0.00010
> And does the issue occur with any program, or just that specific one?
I only work on this one, but I think I can answer what you are getting at in another way. At one time I tried going back to older versions of the same program (using the version control history) and found some older versions that didn't cause the phantom breakpoints while newer ones did. I was planning on eventually taking the time to track down the specific source code change which caused it. But in the meantime I ended up working on a different PC for a time and noticed that it didn't have the same issue, even when using the same version of CCS, source code, target hardware, USB cables, etc. So the problem seemed to be associated both with the version of the source code and with the PC being used to debug it.
Furthermore, with one version of the software, I found that if I made it run (intermittently) by clicking Resume many times and while it was running I put the software into a particular state (displaying a certain menu on an LCD), it would quit stopping at phantom breakpoints. I could then return to the default state and it would continue running, as if something changed which prevented the phantom breakpoints from coming back. The program is complex enough that I couldn't figure out what changed in that process to fix the phantom breakpoints. As I recall, re-starting the program made them come back.
> Can you also try using a new clean workspace folder to see if that helps?
I could if you still want me to, but I am 99% sure that it won't show the problem since it cleared up when I re-created the expression which seemed to be causing it.
Steve
Thank you for doing such a detailed analysis. I tried to reproduce the issue with my EK-TM4C123GXL launchpad and CCS 10.0.0 but was not successful (in reproducing the issue).
It must be something specific to the environment you are using.
Can you enable Debug Server Logging and reproduce the issue? Then zip the log and attach it to this thread.
https://software-dl.ti.com/ccs/esd/documents/ccs_diagnostic-logs.html
Thanks
ki
> Can you enable Debug Server Logging and reproduce the issue?
I will if I can reproduce it. So far, since removing and recreating the expression that seemed to be causing the problem, it hasn't come back. I might have a backup or a co-worker with the issue that I can get a log from.
Steve