Object monitoring in code debugging
AssigneeInternational Business Machines Corporation
InventorsJi Yong Huang, Bin Bin Li, Lin Lu, Jun Zhou
Life of this patent
Estimating the term…
Abstract
According to example embodiments of the present invention, an object to be monitored is determined, the object being associated with a variable in a code snippet including a plurality of statements. The object is monitored in execution of the plurality of statements. If a plurality of updates of the object are detected in the execution of the plurality of statements, a snapshot associated with each of the updates of the object is created. The snapshot includes a current value of the object and a memory address for the current value of the object.
Claims8
A computer-implemented method comprising:
- receiving a set of target code including a code snippet specified by a developer;
- parsing, by machine logic, the code snippet to determine a raw set of variable(s) and/or expression(s) that are present in the code snippet;
- receiving, by machine logic, user input indicative of a selected set of variable(s) and/or expression(s) from the raw set of variable(s) and/or expression(s);
- executing the set of target code for debugging purposes;
- during execution of the set of target code, monitoring, by machine logic, the selected set of variable(s) and/or expressions(s) to detect to a set of memory location updates made to the set of variable(s) and/or expression(s), with each memory location update reflecting a change in memory location where a variable or expression is stored without a change in the value of the variable or expression;
- during execution of the set of target code and for each detected given memory location update of a given selected variable and/or expression of the set of variable(s) and/or expression(s), creating a contemporaneous snapshot with each snapshot including:
- (i) a memory address of the given selected variable and/or expression, and (ii) context data indicative of environment/condition related information at the time of the detected given memory location update, with the context data including:
- (a) a relationship of function calls related to the set of variable(s) and/or expression(s), and (b) a timestamp including information indicative of a creation time for the contemporaneous snapshot;
- and
- generating a memory change snapshot sequence report, with the memory change snapshot sequence report including, for each given selected variable and/or expression, a sequence of contemporaneous snapshots corresponding to detected given memory location updates, with the sequence of the contemporaneous snapshots based on the timestamps corresponding to the contemporaneous snapshots that correspond to a given selected variable and/or expression.
Dependencies are inferred from the claim text.