Data processing: software development – installation – and managem – Software program development tool – Translation of code
Reexamination Certificate
1998-03-24
2001-06-19
Powell, Mark R. (Department: 2122)
Data processing: software development, installation, and managem
Software program development tool
Translation of code
C717S152000
Reexamination Certificate
active
06249907
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a system for assisting a programmer in debugging a computer program to detect errors in the program logic.
2. Description of the Related Art
A computer source program is typically initially written in a high level computer language, also called source code, comprising descriptive statements of the actions the code will cause the computer to perform. High level computer languages include C++, FORTRAN, COBOL, JAVA™, etc. JAVA is a trademark of Sun Microsystems, Inc. A source program written in such a high level language must be converted into object or machine code, i.e., strings of zeros and ones, which the computer can execute to carry out the steps specified by the program. A compiler program is a computer program that receives as input source code and generates as output object code which may be loaded into the computer memory and executed.
FIG. 1
illustrates the compilation process. A compiler
2
receives as input a program in source code
4
and generates object code
6
. The term “program” as used herein refers to the user program in any state, whether processed or unprocessed, from the high level language source code
4
form to the executable object code
6
form.
Oftentimes, the source code
4
will include “bugs.” Bugs are logical errors in the original source code
4
that cause unexpected results during the execution of the object code
6
. These unexpected results may cause the computer executing the object code
6
to generate unintended output and erroneous data, or terminate prematurely.
Compiler programs include a debugging feature that generates information that is used to diagnose bugs and errors in the source code. Before compiling source code
4
, the user may set a debug option that causes the compiler
2
to generate an object code
6
file that includes debugging information and tables. A debugger program uses this debugging information during debugging operations. For instance in International Business Machine Corporation's (IBM®), the assignee of the subject patent application, VISUALAGE® for Cobol product, the user selects the TEST option before compiling the source program to generate the debugging information and tables. VISUALAGE and IBM are registered trademarks of International Business Machines, Corporation.
After compiling the source code
4
into executable object code
6
, the user may run the debugger program and execute the object code
6
program in a debug mode. The debugger program provides a user interface programming tool that allows the user to control the execution of the program by executing only one program instruction at a time (single-stepping), determining the next instruction to be executed, examining and/or modifying computer register and memory locations, and setting breakpoints at particular locations within the program to stop execution of the program at the breakpoint. Preferably the breakpoint is set right before the error occurs to stop program execution and allow the user to take control through the debugger program and monitor the program's execution through the portion of code including the errors.
A breakpoint causes the program to cease executing at a certain point within the program. The user sets breakpoints with the debugger program user interface. The user can specify a breakpoint at: a particular line to stop execution when a specific line in the source code is reached; an entry to stop execution when an entry point is called; an address breakpoint to stop execution at a specific address; a storage change breakpoint to stop execution when data is written to a specified address; and a load occurrence breakpoint to stop execution when a Dynamic Link Library (DLL) file is loaded.
When executing the program and debugger program simultaneously, control may transfer to the debugger program upon processing the breakpoints in the program. Once the debugger program has control and program execution stops, the user can perform various debugging operations. For instance, upon reaching the breakpoint, the user can specify the display of certain expressions or values.
In interactive debugging systems, a graphical user interface may be used to allow the programmer to insert breakpoints within the source code with an input device such as a mouse. The user can examine the source code program in a graphical user interface and mouse “click” a location in the program to insert a breakpoint. The debugger will then execute the object code and display the original source code for the user to follow during the processing of the corresponding object code. Other systems allow the user to enter a breakpoint command on a command line to insert a specific breakpoint. After the program execution stops at a breakpoint, the user may then perform various debugging operations to check the value of variables, etc.
In prior art debugging systems, to set breakpoints for a specific program statement type, the user must locate the specific statement type in the program and then manually set the breakpoint for the located statement type. Moreover, in order to accommodate new breakpoint types, the compiler developer would have to modify the compiler code to change how the compiler generates debugging information during the compilation of the program.
SUMMARY OF THE PREFERRED EMBODIMENTS
To overcome the limitations in the prior art described above, the present invention discloses a system for debugging a computer program. A user indicates a specified breakpoint type. The program, including program statements, is then compiled. During compilation, statements in the program corresponding to the user specified breakpoint types are located and a function call is generated in the program at the statements corresponding to the user specified breakpoint types. An executable version of the program, including the function calls, is then executed. Upon processing the function calls, execution of the executable version of the program may stop.
In further embodiments, the user may indicate at least one active breakpoint type at which to stop execution. In such case, the step of stopping execution of the program occurs upon processing a function call corresponding to one of the active breakpoint types.
In yet further embodiments, the user specified breakpoint type may be a variable reference, a date reference, a middleware statement, a file input/output statement, a conditional statement or a command statement.
Preferred embodiments provide a more efficient method of inserting breakpoints into a program by generating function calls into the program for each instance of the user selected breakpoint type during compilation of the program. During debugging mode, the user may cause the program to stop executing at the instances of the inserted function calls. Moreover, with the preferred embodiments, to add a new breakpoint type to be generated into the program during compilation, the compiler developer need only add a function call to the compiler code and corresponding recognition of that function call to the debugger program for the new breakpoint type. The compiler developer need not modify how the compiler generates debugging information to accommodate the new breakpoint type.
REFERENCES:
patent: 4080650 (1978-03-01), Beckett
patent: 4338660 (1982-07-01), Kelley et al.
patent: 4819234 (1989-04-01), Huber
patent: 4866665 (1989-09-01), Haswell-Smith
patent: 5093914 (1992-03-01), Coplien et al.
patent: 5140671 (1992-08-01), Hayes et al.
patent: 5319645 (1994-06-01), Bassi et al.
patent: 5367550 (1994-11-01), Ishida
patent: 5371746 (1994-12-01), Yamashita et al.
patent: 5446900 (1995-08-01), Kimelman
patent: 5493664 (1996-02-01), Doi
patent: 5533192 (1996-07-01), Hawley et al.
patent: 5535318 (1996-07-01), Motoyama et al.
patent: 5621886 (1997-04-01), Alpert et al.
patent: 5778230 (1998-07-01), Wimble et al.
patent: 5802371 (1998-09-01), Meier
patent: 5933639 (1999-08-01), Meier et al.
patent: 0730227 (1996-03-01), None
Intersimone, Advanced Debugging Techn
Carter Derek Kneil
Wessels Ronald
Yukihiro Della Ann
International Business Machines - Corporation
Konrad Raynes & Victor
Nguyen-Ba Hoang-Vu Antony
Powell Mark R.
Victor David W.
LandOfFree
Method system and article of manufacture for debugging a... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Method system and article of manufacture for debugging a..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method system and article of manufacture for debugging a... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2545556