Debug watch mechanism and method for debugging a computer program
First Claim
1. An apparatus comprising:
- at least one processor;
a memory coupled to the at least one processor;
a computer program residing in the memory; and
a debug watch mechanism residing in the memory and executed by the at least one processor, the debug watch mechanism operating according to a watch signature that defines at least one allowable operation on at least one program variable in the computer program and providing notification of any operations on the at least one program variable that are not specified in the watch signature.
1 Assignment
0 Petitions
Accused Products
Abstract
A watch signature for a debug watch mechanism indicates one or more allowable events, which represent allowable accesses to a watched variable. The allowed accesses implicitly include thread information by limiting the allowable operations to a single thread that first performs an allowed operation. Any operations on the watched variable that are caused by a different thread, and any operations that are caused by the same thread other than those specified in the watch signature will create a notification that an unauthorized operation on the watched variable has occurred. The debug watch mechanism of the present invention thus does not notify the user for expected operations on the variable, but provides notification for other events that do not fall within the anticipated behavior of the computer program as specified by the watch signature.
53 Citations
20 Claims
-
1. An apparatus comprising:
-
at least one processor;
a memory coupled to the at least one processor;
a computer program residing in the memory; and
a debug watch mechanism residing in the memory and executed by the at least one processor, the debug watch mechanism operating according to a watch signature that defines at least one allowable operation on at least one program variable in the computer program and providing notification of any operations on the at least one program variable that are not specified in the watch signature. - View Dependent Claims (2, 3, 4)
any operations by the first thread that are not specified in the watch signature; and
any operations made by a second thread on the at least one program variable.
-
-
5. An apparatus comprising:
-
a computer program residing in a memory;
a debug watch mechanism residing in the memory;
means for enabling the debug watch mechanism by specifying a watch signature that defines at least one allowable operation on at least one program variable in the computer program;
means for activating the debug watch mechanism when a first instruction is executed;
the debug watch mechanism providing notification of any operations on the at least one program variable that are not specified in the watch signature while the debug watch signature is activated. - View Dependent Claims (6)
-
-
7. A method for debugging a computer program comprising the steps of:
-
defining a watch signature that defines at least one allowable operation on at least one program variable in the computer program; and
providing notification of any operations on the at least one program variable that are not specified in the watch signature. - View Dependent Claims (8, 9, 10)
enabling a watch in accordance with the watch signature for a range of instructions; and
activating the watch when a thread executes the first instruction in the range.
-
-
10. The method of claim 7 wherein the watch signature defines a plurality of allowable events, each allowable event comprising an expected operation on a program variable during execution of the computer program, the method further comprising the steps of:
-
activating a watch by a first thread performing a first of the plurality of allowable events;
deactivated the watch by the first thread performing a last of the plurality of allowable events;
providing the notification while the watch is activated for;
any operations by the first thread that are not specified in the watch signature; and
any operations by a second thread on the at least one program variable.
-
-
11. A method for debugging a computer program that is executed by multiple threads, the method comprising the steps of:
-
defining a watch signature for at least one program variable in the computer program, the watch signature defining a plurality of allowable events, each allowable event comprising an expected operation on a program variable during execution of the computer program;
enabling a watch in accordance with the watch signature for a range of instructions defined by the plurality of allowable events;
activating the watch when a first thread executes the first instruction in the range;
deactivated the watch by the first thread performing a last of the plurality of allowable events;
providing the notification while the watch is activated for;
any operations by the first thread that are not specified in the watch signature; and
any operations by a second thread on the at least one program variable.
-
-
12. A program product comprising:
-
a debug watch mechanism that operates according to a watch signature that defines at least one allowable operation on at least one program variable in a computer program and provides notification of any operations on the at least one program variable that are not specified in the watch signature; and
signal bearing media bearing the debug watch mechanism. - View Dependent Claims (13, 14, 15, 16, 17)
any operations by the first thread that are not specified in the watch signature; and
any operations by a second thread on the at least one program variable.
-
-
18. A program product comprising:
-
(A) a debug watch mechanism that operates according to a watch signature for at least one program variable in a computer program and provides notification of any operations on the at least one program variable that are not specified in the watch signature, the watch signature defining a plurality of allowable events, each allowable event comprising an expected operation on a program variable during execution of the computer program, the debug watch mechanism being enabled by specifying the watch signature for a range of instructions, and wherein the debug watch mechanism becomes active when a thread executes the first instruction in the range, wherein the watch signature defines a plurality of allowable events, and wherein the debug watch mechanism is activated by a first thread performing a first of the plurality of allowable events and is deactivated by the first thread performing a last of the plurality of allowable events, the debug watch mechanism providing the notification while the debug watch mechanism is activated for;
(1) any operations by the first thread that are not specified in the watch signature; and
(2) any operations by a second thread on the at least one program variable; and
(B) signal bearing media bearing the debug watch mechanism. - View Dependent Claims (19, 20)
-
Specification