What is a Trace Buffer and why is it good to have one?
A Trace Buffer can be thought of as a ‘CPU history log’. The trace buffer captures CPU activity and stores it away so that you can look back in time and see what the CPU did prior to an event occurring. If you think about the debugging process you often end up in a situation where you have stopped execution because a breakpoint has fired on some ‘bad’ event. The next question you are likely to ask yourself is why this ‘bad’ event occurred. This is where the trace buffer comes in handy – you can look back in time and see the CPU behavior prior to the ‘bad’ event and hopefully see the cause of it!