# US 2004/0083457 A1 · Methods and apparatus for program debugging using break states

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

- Number: US 2004/0083457 A1
- Document ID: US20040083457A1
- Status: Published application
- Kind: A1
- Application number: 10/280,165
- Filed: 2002-10-25
- Published: 2004-04-29
- Earliest claimed: 2002-10-25
- Inventors: Michael Boucher
- Web page: https://patentgrep.com/patent/US20040083457A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems consistent with the present invention determine when multiple instances of a single program have reached a common break state, then initiate execution of a comparison of state information associated with the program instances. Thus, the methods and systems allow arbitrarily complex comparisons of indicators that reveal if a program instance is functioning correctly. A programmer is not limited by manual examination and review of program code. Rather, the methods and systems greatly facilitate debugging of complex programs.

## Claims

### Claim 1

A method in a data processing system, the method comprising the steps of:
monitoring a first instance of a program comprising first state information to determine when the first instance of the program reaches a predefined break state;
waiting for a second instance of the program comprising second state information to reach the predefined break state; and
initiating execution of a state comparison program for comparing the first state information and the second state information to determine whether the first state information agrees with the second state information.

### Claim 2 (depends on 1)

The method of claim 1, further comprising the step of pausing the first instance of the program when the first instance reaches the predefined break state.

### Claim 3 (depends on 1)

The method of claim 1, wherein the step of waiting comprises waiting until a predefined wait time is exceeded.

### Claim 4 (depends on 3)

The method of claim 3, wherein the step of initiating a state comparison program comprises the step of initiating a state comparison routine in the first instance of the program.

### Claim 5 (depends on 1)

The method of claim 1, wherein the step of monitoring comprises the step of monitoring with a program debugger.

### Claim 6 (depends on 5)

The method of claim 5, further comprising the step of setting the predefined break state in the program debugger.

### Claim 7 (depends on 6)

The method of claim 6, further comprising the steps of:
receiving a state agreement indication from the state comparison program;
setting a new predefined break state in the program debugger; and
waiting for the first instance of the program to reach the new predefined break state.

### Claim 8 (depends on 1)

The method of claim 1, further comprising the steps of:
initiating execution of the first instance of the program with a first program debugger; and
initiating execution of the second instance of the program with a second program debugger.

### Claim 9 (depends on 8)

The method of claim 8, wherein the second program debugger receives the second state information from the second instance and sends the second state information to the first program debugger.

### Claim 10

A computer-readable medium containing instructions that cause a data processing system to perform a method comprising the steps of:
monitoring a first instance of a program comprising first state information to determine when the first instance of the program reaches a predefined break state;
waiting for a second instance of the program comprising second state information to reach the predefined break state; and
initiating execution of a state comparison program for comparing the first state information and the second state information to determine whether the first state information agrees with the second state information.

### Claim 11 (depends on 10)

The computer-readable medium of claim 10, further comprising the step of pausing the first instance of the program when the first instance reaches the predefined break state.

### Claim 12 (depends on 10)

The computer-readable medium of claim 10, wherein the step of initiating a state comparison program comprises the step of initiating a state comparison routine in the first instance of the program.

### Claim 13 (depends on 10)

The computer-readable medium of claim 10, wherein the step of monitoring comprises the step of monitoring with a program debugger.

### Claim 14 (depends on 13)

The computer-readable medium of claim 13, further comprising the step of setting the predefined break state in the debugger.

### Claim 15 (depends on 10)

The computer-readable medium of claim 10, further comprising the step of initiating execution of the first instance of the program with a program debugger.

### Claim 16

A data processing system comprising:
a memory comprising a program debugger and a first instance of a program comprising first state information, the program debugger for monitoring the first instance to determine when the first instance reaches a predefined break state, waiting for a second instance of the program comprising second state information to reach the predefined break state, and initiating execution of a state comparison program for comparing the first state information and the second state information to determine whether the first state information agrees with the second state information; and
a processor that runs the program debugger.

### Claim 17 (depends on 16)

The data processing system of claim 16, wherein the first state information comprises program variables used by the first instance.

### Claim 18 (depends on 16)

The data processing system of claim 16, wherein the first state information comprises execution time of the first instance.

### Claim 19 (depends on 16)

The data processing system of claim 16, wherein the first state information comprises data processing system resource usage statistics for the first instance.

### Claim 20 (depends on 16)

The data processing system of claim 16, wherein the memory further comprises a second program debugger and the second instance of the program.

### Claim 21 (depends on 20)

The data processing system of claim 20, wherein the second program debugger monitors the second instance to determine when the second instance reaches the predefined break state.

### Claim 22 (depends on 21)

The data processing system of claim 21, wherein the state comparison program comprises a state comparison routine in the program.

### Claim 23 (depends on 22)

The data processing system of claim 22, wherein the memory further comprises third state information for a third instance of the program run externally to the data processing system until the third instance reached the predefined break state, and wherein the state comparison program compares the first state information, second state information, and third state information to determine whether the first state information, second state information, and third state information agree.

### Claim 24

A data processing system comprising:
means for monitoring a first instance of a program comprising first state information to determine when the first instance of the program reaches a predefined break state;
means for waiting for a second instance of the program comprising second state information to reach the predefined break state; and
means for initiating execution of a state comparison program for comparing the first state information and the second state information to determine whether the first state information agrees with the second state information.

### Claim 25

A method in a data processing system, the method comprising the steps of:
initiating execution of a first instance of a program comprising first state information;
initiating execution of a second instance of the program comprising second state information;
monitoring the first instance to determine when the first instance reaches a predefined break state, and in response, pausing execution of the first instance;
monitoring the second instance to determine when the second instance reaches the predefined break state, and in response, pausing execution of the second instance;
initiating execution of a state comparison program for comparing the first state information and the second state information to determine whether the first state information agrees with the second state information;
when the first state information agrees with the second state information, setting a new predefined break state and unpausing the first program instance and the second program instance; and
when the first state information disagrees with the second state information, displaying a first error indication.

### Claim 26 (depends on 25)

The method of claim 25, further comprising the step of determining when the second instance fails to reach the predefined break state within a predetermined time, and, in response, pausing the second program instance and displaying a second error indication.

### Claim 27 (depends on 25)

The method of claim 25, wherein the step of initiating a state comparison program comprises the step of initiating a state comparison routine in the first instance of the program.

### Claim 28 (depends on 25)

The method of claim 25, wherein the step of monitoring the first instance comprises the step of monitoring the first instance with a program debugger, and wherein the step of monitoring the second instance comprises the step of monitoring the second instance with the program debugger.

### Claim 29 (depends on 25)

The method of claim 25, wherein the step of monitoring the first instance comprises the step of monitoring the first instance with a first program debugger, and wherein the step of monitoring the second instance comprises the step of monitoring the second instance with a second program debugger.

### Claim 30

A method in a data processing system having a first program, a second program and a diagnostic program, the method comprising the steps performed by the diagnostic program of:
receiving first state information indicating an execution state of the first program;
receiving second state information indicating an execution state of the second program; and
comparing the first state information and the second state information to determine whether the execution of at least one of the first and the second programs occurred in an unintended manner.

### Claim 31 (depends on 30)

The method of claim 30, wherein the second program is an instance of the first program.

### Claim 32 (depends on 30)

The method of claim 30, wherein the first state information comprises at least one program variable.

### Claim 33 (depends on 30)

The method of claim 30, wherein the first state information comprises at least one system state characteristic.

### Claim 34 (depends on 30)

The method of claim 30, wherein the first state information comprises at least one program execution characteristic.

### Claim 35 (depends on 30)

The method of claim 30, wherein the step of comparing comprises the step of determining whether at least a portion of the first state information and the second state information agrees to within a predetermined threshold.

### Claim 36 (depends on 30)

The method of claim 30, wherein the step of receiving the second state information comprises the step of receiving the second state information over a network connection.

### Claim 37

A computer-readable medium containing instructions that cause a data processing system having a first program, a second program and a diagnostic program, to perform a method, the method comprising the steps performed by the diagnostic program of:
receiving first state information indicating an execution state of the first program;
receiving second state information indicating an execution state of the second program; and
comparing the first state information and the second state information to determine whether the execution of at least one of the first and the second programs occurred in an unintended manner.

### Claim 38 (depends on 30)

The computer-readable medium of claim 30, wherein the second program is an instance of the first program.

### Claim 39 (depends on 30)

The computer-readable medium of claim 30, wherein the first state information comprises at least one program variable.

### Claim 40 (depends on 30)

The computer-readable medium of claim 30, wherein the first state information comprises at least one system state characteristic.

### Claim 41 (depends on 30)

The computer-readable medium of claim 30, wherein the first state information comprises at least one program execution characteristic.

### Claim 42 (depends on 30)

The computer-readable medium of claim 30, wherein the step of comparing comprises the step of determining whether at least a portion of the first state information and the second state information agrees to within a predetermined threshold.

### Claim 43 (depends on 30)

The computer-readable medium of claim 30, wherein the step of receiving the second state information comprises the step of receiving the second state information over a network connection.

### Claim 44 (depends on 30)

The computer readable-medium of claim 30, further comprising the step of receiving third state information indicating an execution state of a third program, and wherein the step of comparing comprises the step of comparing the first state information, the second state information, and the third state information to determine whether the execution of at least one of the first, second, and third programs occurred in an unintended manner.

### Claim 45 (depends on 37)

The computer-readable medium of claim 37, wherein the second program and the third program are instances of the first program.
