System and method for intelligent trap analysis
AssigneeInternational Business Machines Corporation
InventorsMark F. Wilding, Alexandra G. Bialek, Yung Chung
Life of this patent
Estimating the term…
Abstract
A method and system for intelligent trap analysis for debugging software on a computer system. Instead of dumping only a register context snapshot or all of memory to a file, a trap handler determines a likely cause of a trapped instruction and selects relevant memory addresses for copying to a file. The relevant memory addresses and their contents are preserved for later analysis. The trap handler may step back through the process instruction list searching for relevant memory addresses referenced by the instructions preceding the trapped instruction. The module may undo the effect of instructions as it steps back through the instruction list.
Claims31
A method of intelligent trap analysis for preserving relevant data regarding a trap on a computer system, the computer system having memory, the memory containing a trapped instruction, the method comprising the steps of:
- identifying the trapped instruction within a plurality of instructions, wherein the trapped instruction is an instruction that caused the trap;
- determining a likely cause of the trapped instruction, wherein a likely cause of the trapped instruction is a reason that the trapped instruction caused the trap;
- selecting a relevant memory location, said relevant memory location being related to said likely cause;
- and
- preserving the contents of said relevant memory location.
An intelligent trap handler for operation upon a computer system, the computer system having memory, the memory containing a trapped instruction, the handler comprising:
- identifying the trapped instruction within a plurality of instructions, wherein the trapped instruction is an instruction that caused the trap;
- a determining means for determining a likely cause of the trapped instruction, wherein a likely cause of the trapped instruction is a reason that the trapped instruction caused the trap;
- a selection means for selecting a relevant memory location, said relevant memory location being related to said likely cause of the trapped instruction;
- and
- a preserving means for preserving the contents of said relevant memory location.
A system for intelligent trap analysis, the system comprising an operating system;
- registers;
- memory;
- a list of instructions in said memory, said instructions including an identified trapped instruction, the trapped instruction causing the operating system to generate a trap signal;
- and
- a trap handler, said trap handler including a determining means for determining a likely cause of said trapped instruction, wherein a likely cause of the trapped instruction is a reason that the trapped instruction caused the trap;
- a selection means for selecting a relevant memory location, said relevant memory location being related to said likely cause of said trapped instruction;
- and a copying means for copying the contents of said relevant memory location to a file, wherein relevant data relating to the likely cause of a trap is preserved.
A computer program product comprising:
- a tangible computer usable medium having computer usable program code for preserving relevant data regarding a trap on a computer system, wherein the computer system has a memory and a function stack, and wherein the function stack includes a trapped instruction, said computer usable program product including:
- computer usable program code for identifying the trapped instruction within a plurality of instructions, wherein the trapped instruction is an instruction that caused the trap:
- computer usable program code for determining a likely cause of the tapped instruction, wherein a likely cause of the trapped instruction is a reason that the tapped instruction caused the trap;
- computer usable program code for identifying a relevant memory location, said relevant memory location being related to said likely cause;
- and
- computer usable program code for copying the contents of said relevant memory location to a file.
Dependencies are inferred from the claim text.