# US 8,752,024 B2 · Resuming a prior debug session

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

- Number: US 8,752,024 B2
- Document ID: US8752024B2
- Status: Granted
- Kind: B2
- Application number: 13/687,352
- Filed: 2012-11-28
- Published: 2013-04-04
- Granted: 2014-06-10
- Earliest claimed: 2011-07-15
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Cary L. Bates
- Web page: https://patentgrep.com/patent/US8752024B2

## CPC

- G06F 8/70: Software maintenance or management
- G06F 11/362: Debugging of software
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Inserting, at debuggee source code lines, a breakpoint and executing. For each breakpoint encounter until exiting: encountering and removing the breakpoint, incrementing a first counter value, and resuming execution. Exiting includes saving the first counter value, a state of the call stack, and an exit location. In a second debug session, preparing the debuggee to resume from the exit location. Inserting, at the debuggee source code lines, a breakpoint and executing the debuggee. For each breakpoint encounter until a second counter value matches the first: encountering and removing the breakpoint, incrementing the second counter value, and resuming execution. When the first and second counter values match: inserting an exit location breakpoint at the exit location, executing the debuggee until encountering the exit location breakpoint, and providing the user control to resume debugging from the exit location only if the present state of the call stack matches the saved state.

## Claims

### Claim 1

A method of resuming a prior debug session, the method comprising:
loading a debuggee in a first debug session including inserting, at one or more lines of debuggee source code, a coverage breakpoint, including inserting a coverage breakpoint at every line of the source code; executing, at the behest of a user, the debuggee including, for each coverage breakpoint encounter until exiting the first debug session: encountering a coverage breakpoint thereby stopping execution, removing the coverage breakpoint, incrementing a first counter value, and resuming execution without user interaction; exiting the first debug session including saving the first counter value, a state of the debuggee's call stack, and an exit location;
upon reloading the debuggee in a second, subsequent debug session, preparing the debuggee to resume debugging from the exit location, including: inserting, at the one or more lines of the debuggee's source code, a coverage breakpoint, including inserting a coverage breakpoint at every line of the source code; executing the debuggee; for each coverage breakpoint encounter until a second counter value matches the first counter value: encountering a coverage breakpoint thereby stopping execution, removing the coverage breakpoint, incrementing the second counter value, and resuming execution without user interaction; and when the first and second counter values match: inserting an exit location breakpoint at the exit location, executing the debuggee until encountering the exit location breakpoint thereby stopping execution at the exit location, and providing the user control to resume debugging from the exit location only if the present state of the call stack matches the saved state of the call stack state.

### Claim 2 (depends on 1)

The method of claim 1 wherein saving the first counter value, a state of the debuggee's call stack, and an exit location further comprises saving exit values of one or more user-selected expressions; and
providing the user control to resume debugging from the exit location only if the present state of the call stack matches the saved state of the call stack state further comprises providing the user control to resume debugging from the exit location only if the present state of the call stack matches the saved state of the call stack state and the current values of the user-selected expressions match the saved exit values.

### Claim 3 (depends on 1)

The method of claim 1, wherein, in the first and second debug sessions:
inserting, at one or more lines of the source code, a coverage breakpoint further comprises inserting a coverage breakpoint at every line of the source code except lines within a routine, each routine having an entry point; and
encountering a breakpoint further comprises encountering a coverage breakpoint at an entry point to a routine; and
removing the coverage breakpoint further comprises inserting a coverage breakpoint at each line in the routine.
