Debugging using program state definitions
AssigneeCA, Inc.
InventorKyle Lee Joseph Thayer
Life of this patent
Estimating the term…
Abstract
A program state definition comprises target values that correspond to problematic or unexpected output of a program. A debugger compares the target values of the program state definition to variable values of a program and stops execution of a program at a point where all target values are contained in variables of the program. By stopping execution of a program, the debugger allows a programmer to analyze the program at that point. Unlike a breakpoint, a program state definition is not tied to a specific line of code, variable, or function but, rather, has a scope of an entire program or a specified section of a program.
Claims20
A method of debugging comprising:
- determining data types corresponding to a plurality of target values;
- and
- as variables in a program are encountered during running of the program,
- monitoring variables in the program which are of a similar data type to one of the data types corresponding to the plurality of target values to detect changes;
- comparing values of the monitored variables to the plurality of target values in response to detecting changes in the monitored variables;
- determining whether the values of the monitored variables indicate the plurality of target values based, at least in part, on comparing the values of the monitored variables to the plurality of target values;
- and
- in response to determining that the values of the monitored variables indicate the plurality of target values, halting running of the program at a location corresponding to a state of the program when the values of the monitored variables indicate the plurality of target values.
A machine-readable storage medium having program code stored therein, the program code to:
- determine variables of a program that have data types at least similar to one of data types corresponding to a plurality of target values in accordance with a specified match threshold, wherein the plurality of target values is based, at least in part, on output of the program;
- instrument the program to indicate when the variables change value;
- determine whether the plurality of target values is indicated by at least some of the variables in response to indication that one of the variables has changed value;
- and
- indicate a location within the program corresponding to when the plurality of target values is indicated by at least some of the variables in response to a determination that the plurality of target values is indicated by at least some of the variables.
An apparatus comprising:
- a processor;
- and
- means for determining data types corresponding to a plurality of target values;
- means for detecting changes in variables in a program that are of a similar data type to one of the data types corresponding to the plurality of target values during running of the program;
- means for determining that values of the variables indicate the plurality of target values based, at least in part, on comparing the values of the variables to the plurality of target values;
- and
- means for halting running of the program at a location corresponding to a state of the program when the values of the variables indicate the plurality of target values.
Dependencies are inferred from the claim text.