IP Library › Granted Patent US 7,257,805
Granted Patent B2
US 7,257,805 · App. 10/040,276 · Granted Aug 14, 2007

Restoring debugging breakpoints subsequent to program code modifications

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,257,805
App. No.
10/040,276
Granted
Aug 14, 2007
Kind
B2
Abstract

A debugger provides a user with the ability to trace through the user's program to detect one or more errors. The debugger steps through the program until it reaches a breakpoint set at a selected step by the user. After stepping through the program and detecting one or more errors, the user revises the program and re-executes the debugger. The debugger automatically restores the breakpoint to the selected step, which is often at a different line number in the program, after revisions are made to the program code.

Claims (40)

1. A method of restoring debugging breakpoints in a source code program, said method comprising:

setting a breakpoint to a selected step of a first version of the source code;

creating an instruction profile for the selected step, said instruction profile comprising one or more specific attributes of one or more machine instructions generated for the selected step and one or more specific attributes of zero or more other machine instructions generated for the first version of source code, and wherein the instruction profile further comprises a source line number for the selected step and a length of the first version of source code, and

automatically restoring the breakpoint to the selected step of a modified program, in response to modification of the first version of source code to provide the modified program having a second version of source code, wherein the selected step is at a different location within the modified program and wherein the automatically restoring comprises comparing one or more operation codes of one or more machine instructions generated for the second version of source code with one or more operation codes of the instruction profile created based on the first version of source code to determine which machine instruction of the modified program corresponds most closely to the selected step and wherein the automatically restoring comprises using the source line number and length to determine a starting point within the modified program to select the one or more machine instructions generated for the second version of the source code to be used in the comparing.

2. The method of claim 1 , wherein the comparing yields one or more difference counts and a difference count having a smallest value indicates the different location.

3. The method of claim 1 , wherein the different location is identified by a substantial match between one or more operation codes of the instruction profile and one or more operation codes of one or more machine instructions of the modified program.

4. The method of claim 1 , wherein the creating comprises choosing a number of machine instructions to be included in the instruction profile.

5. The method of claim 4 , wherein the choosing comprises:

selecting a number of instructions to be included in a calibration profile;

generating the calibration profile for a chosen line of the program, said calibration profile having the selected number of instructions for said chosen line;

comparing one or more specific attributes of said calibration profile to one or more attributes of at least one line of code of the program to obtain a result;

determining whether the result is an unambiguous result; and

repeating, zero or more times, said selecting, said generating, said comparing, and said determining until the determining indicates an unambiguous result, wherein the selected number of instructions increases at each iteration, and wherein the selected number of instructions indicates, when there is an indication of an unambiguous result, the number of machine instructions to be included in the instruction profile.

6. The method of claim 1 , wherein said automatically restoring is performed by a debugger.

7. A system of restoring debugging breakpoints in a source code program, said system comprising:

a breakpoint that is set to a selected step of a first version of the source code;

an instruction profile created for the selected step, said instruction profile comprising one or more specific attributes of one or more machine instructions generated for the selected step and one or more specific attributes of zero or more other machine instructions generated for the first version of source code, and wherein the instruction profile further comprises a source line number for the selected step and a length of the first version of source code,

a modified program having a second version of source code; and

means for automatically restoring the breakpoint to the selected step of a modified program, in response to modification of the first version of source code to provide the modified program, wherein the selected step is at a different location within the modified program and wherein the automatically restoring comprises comparing one or more operation codes of one or more machine instructions generated for the second version of source code with one or more operation codes of the instruction profile created based on the first version of source code to determine which machine instruction of the modified program corresponds most closely to the selected step and wherein the automatically restoring comprises using the source line number and length to determine a starting point within the modified program to select the one or more machine instructions generated for the second version of the source code to be used in the comparing.

8. The system of claim 7 , wherein the comparing yields one or more difference counts and a difference count having a smallest value indicates the different location.

9. The system of claim 8 , wherein the different location is identified by a substantial match between one or more specific attributes of the instruction profile and one or more specific attributes of one or more machine instructions of the modified program.

10. The system of claim 9 , further comprising means for choosing a number of machine instructions to be included in the instruction profile, wherein the means for choosing comprises:

means for selecting a number of instructions to be included in a calibration profile;

means for generating the calibration profile for a chosen line of the program, said calibration profile having the selected number of instructions for said chosen line;

means for comparing one or more specific attributes of said calibration profile to one or more specific attributes of at least one line of code of the program to obtain a result;

means for determining whether the result is an unambiguous result; and

means for repeating, zero or more times, said selecting, said generating, said comparing, and said determining until the determining indicates an unambiguous result, wherein the selected number of instructions increases at each iteration, and wherein the selected number of instructions indicates, when there is an indication of an unambiguous result, the number of machine instructions to be included in the instruction profile.

11. An article of manufacture comprising:

at least one computer usable medium having computer readable program code logic to restore debugging breakpoints, the computer readable program code logic comprising:

logic in which a breakpoint is set to a selected step of a first version of source code of a program;

create logic to create an instruction profile for the selected step, said instruction profile comprising one or more specific attributes of one or more machine instructions generated for the selected step and one or more specific attributes of one or more operation codes of zero or more other machine instructions generated for the first version of source code to determine which machine instruction of the modified program corresponds most closely to the selected step; and

restore logic to automatically restore the breakpoint to the selected step of a modified program, in response to modification of the first version of source code to provide the modified program having a second version of source code, wherein the selected step is at a different location within the modified program, and wherein the restore logic comprises compare logic to compare one or more specific attributes of one or more machine instructions generated for the second version of source code with one or more specific attributes of the instruction profile created based on the first version of source code to determine which machine instruction of the modified program corresponds most closely to the different location.

12. The article of manufacture of claim 11 , wherein the comparing yields one or more difference counts and a difference count having a smallest value indicates the different location.

13. The article of manufacture of claim 11 , wherein the different location is identified by a substantial match between one or more specific attributes of the instruction profile and one or more specific attributes of one or more machine instructions of the modified program.

14. The article of manufacture of claim 11 , wherein the logic to create comprises choose logic to choose a number of machine instructions to be included in the instruction profile, wherein the choose logic comprises:

select logic to select a number of instructions to be included in a calibration profile;

generate logic to generate the calibration profile for a chosen line of the program, said calibration profile having the selected number of instructions for said chosen line;

compare logic to compare one or more specific attributes of said calibration profile to one or more specific attributes of at least one line of code of the program to obtain a result;

determine logic to determine whether the result is an unambiguous result; and

repeat logic to repeat, zero or more times, said selecting, said generating, said comparing, and said determining until the determining indicates an unambiguous result, wherein the selected number of instructions increases at each iteration, and wherein the selected number of instructions indicates, when there is an indication of an unambiguous result, the number of machine instructions to be included in the instruction profile.

Assignments (3)
CHANGE OF NAME Recorded Oct 5, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044127/0735 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 12, 2011
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: GOOGLE INC.
Reel/Frame 026664/0866 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2001
From: GRITTER, DANIEL S.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 012502/0040 →
Continuity (1)
Related Publication 20030101437A1 · May 29, 2003