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.
I want to set up a hardware breakpoint for writing data in certain block of memory (for example, in the range of 0x11111 to 0x22222), but don't know how to do it.
I am using CCS 3.3.81.6 and figured out how to set up a hardware breakpoint for writing data in certain memory location by configuring
Debug->breakpoint->hardware watchpoint->
and setting the location address and memory access type (read/write/access). However I don't see how to setup the breakpoint for writing data in certain block of memory.
Any comments/suggestions are highly appreciated.
Many thanks in advance.
Xuedong
Check out slides 23-30 of the Ubm-ext-02.pdf tutorial here:
http://tiexpressdsp.com/wiki/index.php?title=Unified_Breakpoint_Manager
Thanks, Brad, for your info.
However, I don't see watchpoint in the pull-down menu of breakpoint in my CCS 3.3.81.6. Instead I saw "profile cycles" in my pull-down menu and you don't have "profile cycles" in the pull-down menu in your slide 24.
Does it mean that CCS 3.3.81.6 does not support this AET?
I made a video in this article that shows how to set a watch point:
Do you not have the same options in your CCS as are in the video above? I believe I made that video running the same version of CCS as you are using. Perhaps another thing to mention is that this feature is a silicon feature, so I don't think it would be present (at least not exactly like this) in the simulator.
I believe that after you create the watchpoint using the simplistic method shown in the video you would just need to go to the properties for that breakpoint in order to apply the steps shown in the pdf that I originally pointed you to.
Brad
Thanks for your video, Brad. Now it is working. I can set break point for block memory access by selecting "range" rather than the default "point" in the property configuration.
Now here is the new question: is it possible to set the hardware breakpoint whenever any non-fixed-pattern data is written in the designated area?
I am debugging a stack overflow issue. The stack is initialized as certain fixed pattern (e.g., 0xBEBEBEBE) and has length of 0x800 bytes. After the stack is overflow, I observed that non-fixed-pattern data have been written into the top 0x100 bytes (close to the top of the stack). Usually about 0x700 bytes are used in the stack. It seems that the overwritting problem happened before the stack is overflow. After DSP halts due to the stack overflow, I saw that some program area were overwritten and DSP was in bad state that I could not get any useful information.
So in order to catch the overflow issue earlier, I want to set the hardware breakpoint whenever the non-fixed-pattern data (i.e., non 0xBEBEBEBE) is written into the memory block of the top 100 bytes of the stack. I saw "with data" in the hardware breakpoint watchpoint property configuration, but I am wondering how to configure "non 0xBEBEBEBE" when I select "yes" for "with data".
Any suggestions?
Many thanks in advance.
If there's consistency in terms of what the overwritten data is (e.g. if a certain location always gets the same value written to it) then you could setup a hardware watchpoint to monitor for that specific condition. I don't believe there's a way to tell it "watch for anything except 0xBEBEBEBE" though. Generally I set a breakpoint only on the very last location of the stack if the issue is a stack overflow. Are you saying that you don't believe you're experience a stack overflow, but instead you think something else is corrupting your stack?
We just found the cause of the problem in our code and fixed it. So the issue can be closed.
Thank you, Brad, for helping.