Debugger apparatus and method having an event history recording capability
Abstract
According to this invention, a debugger for supporting a debug operation for a program used in a computer having a memory and a register includes a user interface section for inputting a command from a user, an event history recording section for recording an event history of events occurring when the program undergoing debug is executed, a program behavior reproducing section for controlling the program in accordance with the event history to reexecute a portion of the program, an instruction execution history recording section for recording an instruction execution history including all instructions which are executed when the execution corresponding to the program are reproduced by the program behavior reproducing section, contents of the memory and register before the instructions are executed, and an instruction execution history reproducing section for selectively performing a back track for recovering an internal state of the computer to a state, obtained prior to execution of at least one instruction of the program, in accordance with the instruction execution history, and a reexecution, performed after the reverse execution is performed, on the basis of a command from the user interface section.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. Apparatus for debugging a program used in a computer having a memory and a register, said program including a plurality of executable instructions each characterized as either a recordable or a non-recordable instruction, said apparatus comprising: user interface means for accepting a command from a user; event history recording means for recording from said program an event history of events occurring while said program is executed, each event corresponding to a recordable instruction, but not to a non-recordable instruction; program behavior reproducing means for controlling the behavior of said program in accordance with said event history to reexecute a portion of said program; instruction execution history recording means for recording an instruction execution history encompassing executable instructions which are executed when said portion of said program is reexecuted, said instruction execution history including, for each such instruction, contents of said memory and contents of said register before each such instruction is executed; and instruction execution history reproducing means for selectively performing a back track operation for recovering an internal state of said computer to a state, obtained prior to execution of at least one of said executable instructions, in accordance with said instruction execution history, and for selectively performing a second reexecution in accordance with said command accepted by said user interface means.
2. The apparatus according to claim 1, wherein said event history recording means comprises a table which records occurrence numbers sequentially added to each of said events each time each event has occurred, tasks of said program, and contents of each event.
3. The apparatus according to claim 2, wherein said event history recording means includes means for recording addresses of said program and instructions to be executed.
4. The apparatus according to claim 1, wherein said program comprises one of a concurrent program and a program executed in real time.
5. The apparatus according to claim 1, wherein said event history recording means includes means for recording as an event an access instruction for said memory.
6. The apparatus according to claim 1, further comprising storage means for storing at least one of said event history and said instruction execution history.
7. A method of debugging a program used in a computer having a memory and a register, said program including a plurality of executable instructions each characterized as either a recordable or a non-recordable instruction, said method comprising the steps of: (a) recording from said program an event history of events occurring while said program is executed, each event corresponding to a recordable instruction but not to a non-recordable instruction; (b) controlling the behavior of said program in accordance with said event history to reexecute a portion of said program; (c) recording an instruction execution history encompassing executable instructions which are executed in step (b), said instruction execution history including, for each such instruction, contents of said memory and contents of said register before each such instruction is executed; and (d) selectively performing a back track operation for recovering an internal state of said computer to a state, obtained prior to execution of at least one of said executable instructions, in accordance with said instruction execution history, and for selectively performing a second reexecution in accordance with a command from a user.
8. Apparatus for debugging a computer program on a computer having a memory and a register, said computer program comprising a first plurality of executable instructions of a first category and a second plurality of executable instructions of a second category, said apparatus comprising: means for recording a plurality of events during an execution of said computer program, each event corresponding to an instruction from said first category but not from said second category, such that only a subset of all executed instructions are recorded as events; means, responsive to said recorded plurality of events, for controlling the behavior of said computer program to reexecute said first and second pluralities of executable instructions of said computer program in accordance with said recorded plurality of events; means, responsive to said first and second pluralities of reexecuted instructions, for recording an execution history encompassing said first and second pluralities of reexecuted instructions of said computer program, said execution history comprising, for each said reexecuted instruction, contents of said memory and contents of said register before each said reexecuted instruction is reexecuted; and means for back tracking through said execution history and selectively performing a second reexecution of said first and second pluralities of executable instructions in accordance with a user-provided input.
9. The apparatus of claim 8, wherein said computer program comprises a plurality of tasks, and wherein said first category of executable instructions comprises executable instructions which influence task changes.
10. The apparatus of claim 9, wherein said first category of executable instructions comprises calls to an operating system.
11. The apparatus of claim 9, wherein each recorded event comprises information regarding a task name, an instruction pointer address, and an event number.
12. The apparatus of claim 8, wherein said first category of executable instructions comprises instructions which access global variables.
13. The apparatus of claim 12, wherein said second category of executable instructions comprises a compare instruction.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.