# US 2014/0208298 A1 · Program subset execution and debug

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0208298 A1
- Document ID: US20140208298A1
- Status: Published application
- Kind: A1
- Application number: 14/222,001
- Filed: 2014-03-21
- Published: 2014-07-24
- Earliest claimed: 2011-05-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Richard A. Brunkhorst; Joel Duquene; David S. Myers
- Web page: https://patentgrep.com/patent/US20140208298A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/362: Debugging of software
- G06F 11/366: {using diagnostics (G06F11/0703 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In response to identification of an error in operation of a system, a debugging module determines where to set a debug entry point for a program subset debug session. An initial file state is captured for at least one file accessed by the system in response to initiation of a subsequent execution of the system. Prior to detection of execution of the system at the debug entry point, any file inputs and file outputs (I/Os) detected during the subsequent execution of the system are queued. Debug entry point metadata, including the captured initial at least one file state, the queued file I/Os, and an image of all instantiated objects at the debug entry point, is stored in response to detection of execution of the system at the debug entry point.

## Claims

### Claim 1

A method, comprising:
determining, via a debugging module in response to identification of an error in operation of a system, where to set a debug entry point for a program subset debug session;
capturing an initial file state for at least one file accessed by the system in response to initiation of a subsequent execution of the system;
queuing, prior to detection of execution of the system at the debug entry point, any file inputs and file outputs (I/Os) detected during the subsequent execution of the system; and
storing, in response to detection of execution of the system at the debug entry point, debug entry point metadata comprising the captured initial at least one file state, the queued file I/Os, and an image of all instantiated objects at the debug entry point.

### Claim 2 (depends on 1)

The method of claim 1, where determining, via the debugging module in response to identification of the error in the operation of the system, where to set the debug entry point for the program subset debug session comprises:
retrieving an application profile for the system;
identifying an application code section and a location within the application code section of the identified error using the application profile;
determining the debug entry point for the program subset debug session as an execution entry point within application code of the system prior to the identified location within the application code section of the identified error; and
marking the debug entry point for the program subset debug session.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
identifying an application thread associated with the application code section; and
where:
capturing the initial file state for the at least one file accessed by the system in response to the initiation of the subsequent execution of the system comprises capturing the initial file state for a subset of all files in the system that are accessed by the application thread; and
queuing, prior to detection of execution of the system at the debug entry point, any file I/Os during the subsequent execution of the system comprises queuing the file I/Os for the subset of all files in the system that are accessed by the application thread.

### Claim 4 (depends on 1)

The method of claim 1, where determining, via the debugging module in response to identification of the error in the operation of the system, where to set the debug entry point for the program subset debug session comprises:
analyzing one of a thread stack and a system stack;
identifying an application code section and a location within the application code section of the identified error using the analysis of the one of the thread stack and the system stack;
determining the debug entry point for the program subset debug session as an execution entry point within application code of the system prior to the identified location within the application code section of the identified error; and
marking the debug entry point for the program subset debug session.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
monitoring system operations of the system during the operation of the system;
comparing the monitored system operations of the system with expected system operations of the system;
detecting a difference between the monitored system operations and the expected system operations; and
identifying the error in the operation of the system as the detected difference between the monitored system operations and the expected system operations.

### Claim 6 (depends on 1)

The method of claim 1, where:
capturing the initial file state for the at least one file accessed by the system in response to the initiation of the subsequent execution of the system comprises:
comparing the file state of the at least one file accessed by the system with a configured default initial file state for the at least one file; and
determining that the file state of the at least one file at the initiation of the subsequent execution of the system is corrupted based upon the comparison of the file state of the at least one file with the configured default initial file state for the at least one file; and
storing, in response to the detection of the execution of the system at the debug entry point, the debug entry point metadata comprising the captured initial file state comprises storing the configured default initial file state of the at least one file.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
detecting a request to initiate the program subset debug session;
creating the at least one file accessed by the system with the captured initial file state stored in the debug entry point metadata for the at least one file;
executing each queued file I/O stored in the debug entry point metadata;
instantiating the image of all instantiated objects at the debug entry point stored in the debug entry point metadata; and
initiating a debug execution of the system at the debug entry point.

### Claim 8 (depends on 7)

The method of claim 7, where:
storing, in response to the detection of the execution of the system at the debug entry point, the queued file I/Os of the debug entry point metadata comprises storing the queued file I/Os as an execution thread within the debug entry point metadata; and
executing each queued file I/O stored in the debug entry point metadata comprises executing each of the stored queued file I/Os within the program subset debug session under control of the execution thread.
