UCSC-CRL-94-17: A POOR MAN'S WATCHPOINTS

04/01/1994 09:00 AM
Computer Science
Bugs that result from corruption of program data can be very difficult to track down without specialized help from a debugger. If the debugger cannot help the user find the point at which data gets corrupted, the user may have a long iterative debugging task. If the debugger is able to stop execution of the program at the point where data gets corrupted, as with watchpoints (also known as data breakpoints), it may be a very simple task to find a data corruption bug. In this paper, we discuss a method of implementing watchpoints on a system without hardware watchpoint support. By instrumenting the program code to check memory accesses, and supplying an interface to the instrumentation in the debugger, we provide an efficient, general method of implementing watchpoints.

UCSC-CRL-94-17