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.

Feature suggestion for CCS memory window

Hello,

I have suggestion for a memory window feature : very often we need to know what region of the memory changed between the time we run the CPU and the time halt it. Currently the CCS memory window does that by highlighting in red the portion of the memory window that changed. But that feature is not enough to discover memory leak or memory corruption as we don't know in advance the region of the memory to look at. What I suggest is a - zoom out/zoom in - feature that allows to visualize the memory at difference scale. Of course, only the lowest 1/1 scale would allow to see the actual values in the memory. For other scales may be some kind of color coding can be used to express the magnitude of the values. Kind of like an image visualizer. But I think that the most important feature would be to highlight the regions of the memory that have been changed at larger scales. When we are totally zoomed out, we would be able to visualize the entire memory. Of course, I would expect some performance hit as the more you zoom out, the more data needs to be transferred from target.

  • This may not be doable. Right now, Memory View has a cache of the memory data that is used to compare with the data returned from the read requests. If the data is different from the cache, the data is highlighted. Let’s say the current memory view is showing the addresses 0x50000000 to 0x60000000, the cache only contains data for this range. Now, if the user wants to zoom to view the range 0x10000000 to 0x60000000. Memory View will need to read the data for the new range. But, the cache still contains the data for the old range. New data that are not in the cache will not be compared and hence, will not be highlighted. Furthermore, Memory View does not know in advance what addresses or address range have data changes before issuing a Read request to obtain the data.

  • I guess one way to look at it would be a separate plugin that shows a bar that represented the memory space, on this bar you could highlight if something is changed, then when you click on the bar you open a memory view for that particular range and you can see which addresses actually change.  Conceptually it would work.

    However this would have a HUGE performance hit as you would be reading the entire contents of memory at each step/halt... and comparing it to a cache that you would need to create (similar to what the memory view does).  Guess you could somehow configure or limit the memory that was shown on the bar but it would still be a lot of data to read and compare.

     

    john

  • Hi Victor,

    I am not sure which target you are trying to catch memory corruption, on some of the target, you can setup a watchpoint to watch memory read/write for a specify range. The breakpoint can perform varies action if it is triggered, i.e halt the target, print out an error message, etc...

    Regards,
    Patrick