Re: Why do Intel's processors provide four debug registers rather than only one?



On 23 Sep 2006 20:44:20 -0700
"Lighter" <spamtrap@xxxxxxxxxx> wrote:

:To my thinking, one debug regiter is enough to set a breakpoint for a
:runnning program.

You are thinking in terms of instruction breakpoints, but the debug
registers are more versatile then that. For example, one type of problem
which has always been difficult to debug is that some memory location gets
overwritten from time to time, without any clue as to what program is
responsible.

The debug registers will monitor not only code, but also data addresses,
and can be set to trigger on writes only, or on both reads and writes.

-- Chuck

.



Relevant Pages