Method and apparatus for providing and handling traps

Electrical computers and digital processing systems: processing – Processing control – Branching

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S233000, C710S260000, C710S264000

Reexamination Certificate

active

06253317

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates to computer software instrumentation and, in particular, to a system and method in which computer software of any size can be efficiently instrumented while minimizing the reduction in efficiency of the computer software resulting from the instrumentation.
BACKGROUND OF THE INVENTION
Instrumentation of computer software is well-known and involves insertion, into a particular computer program, of computer instructions which evaluate the computer program during execution. As used herein, a computer program is a series of computer instructions and data stored in a computer-readable memory which collectively define a computer process. A computer processor fetches and executes the computer instructions of a computer program to form a computer process. The computer process includes the computer instructions of the computer program and data representing the execution state of the computer process. Execution of an instrumented computer process causes execution of inserted computer instructions to aid in the evaluation of the instrumented computer process. Both computer programs and computer processes can be instrumented.
Instrumentation of a computer program is generally accomplished by one of three techniques. These techniques are also generally applicable to the instrumentation of computer processes. In the first technique, instrumentation computer instructions, are inserted directly into, i.e., between native computer instructions of, the computer program or computer process. As used herein, an instrumentation computer instruction is a computer instruction inserted into a computer program for the purpose of analyzing the computer program, and a native computer instruction is any other computer instruction of a computer program. During development, a computer program typically includes both instrumentation and native computer instructions. However, when the computer program is released as a commercial product, the computer program will typically include only native computer instructions, and all instrumentation computer instructions will typically be removed from the computer program.
As an example of the first technique, instrumentation computer instructions can be inserted before a native computer instruction which accesses computer memory at a particular address. In this example, the instrumentation computer instructions can determine the particular address, compare the particular address to valid memory address ranges, and report an error if the particular address is not within any of the valid memory address ranges.
In a second technique, two or more native computer instructions of a computer program are replaced with a call to a separate instrumentation sequence which is located remotely within the computer program. Calls to sequences are well known and are described herein only briefly for completeness. Calling a sequence transfers control of a computer process to the sequence and provides the sequence with data, e.g., by pushing such data onto a stack. Thus, a call to a sequence involves a change in the state of the computer process (by pushing data on a stack) and a transfer of control. The sequence includes one or more computer instructions which are fetched and executed upon calling of the sequence.
When the computer program attempts to fetch and execute one of the replaced native computer instructions, the instrumentation sequence is called instead. The computer instructions of the instrumentation sequence, which can include for example the replaced native computer instructions and a number of instrumentation computer instructions, are executed. Following execution of a number of the computer instructions of the instrumentation sequence, processing transfers back to the computer program at the computer instruction immediately following the call to the instrumentation sequence. For example, two or more native computer instructions which access computer memory at a particular address can be replaced with a call to a sequence which includes a number of instrumentation computer instructions which determine the particular address, compare the particular address to valid memory address ranges, and report an error if the particular address is not within any of the valid memory address ranges.
In a third technique, a single native computer instruction is replaced with a branch to a sequence of a number of instrumentation computer instructions. The sequence can include, among other computer instructions, the replaced native computer instruction. The last computer instruction of the sequence is typically a branch to the computer instruction of the computer program which is ordinarily executed immediately following execution of the replaced native computer instruction. For example, a native computer instruction which accesses computer memory at a particular address can be replaced with a branch instruction which causes processing to transfer to a sequence of computer instructions including a number of instrumentation computer instructions which determine the particular address, compare the particular address to valid memory address ranges, and report an error if the particular address is not within any of the valid memory address ranges.
It is generally advantageous to add instrumentation computer instructions to, and remove instrumentation computer instructions from, a computer program quickly. It is therefore generally preferred in the art to instrument computer programs in the form of object code rather than source code. Source code is a collection of one or more computer instructions in a form which is intelligible to humans, and object code is a collection of one of more computer instructions in a form which is intelligible to a computer processor. A computer program is generally created by configuration and combination of computer instructions in source code form by a human software engineer who then causes the source code to be compiled, i.e., translated from source code to object code. Compilation of a computer program can be quite time-consuming and can require substantial resources of a computer system. If a computer program is instrumented while in the form of source code, the computer program must be compiled again before the computer program as instrumented can be executed in a computer system. Instrumentation computer instructions can be added to a computer program without requiring recompilation of the computer program if the instrumentation computer instructions are added to the computer program while in the form of object code, i.e., after compilation of the program. In this way, instrumentation computer instructions can be added to or removed from a computer program quickly, i.e., generally in substantially less time than required to compile the computer program.
In addition, computer processes generally include computer instructions in an object code format. Therefore, the ability to instrument object code enables instrumentation of computer processes. As a result, a computer process can be instrumented as needed by a debugger during execution of the computer process. A debugger is a computer process which controls and analyzes the execution of another computer process.
Instrumentation computer instructions are added to a computer program in object code form in generally one of three ways. First, instrumentation computer instructions are inserted in the computer program at the point at which the instrumentation computer instructions are to be executed, thereby displacing native computer instructions at subsequent positions in the computer program. This technique has the advantage of the most efficient execution possible of the computer program as instrumented. However, since native computer instructions are displaced, references to the displaced native computer instructions throughout the computer program must be located and modified to refer to the native computer instructions as displaced. Location and modification of such references takes nearly as much processing as recompiling the computer program from so

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for providing and handling traps 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 and apparatus for providing and handling traps, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for providing and handling traps will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2504013

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.