Debugging method and debugging apparatus for microcomputer...

Error detection/correction and fault detection/recovery – Data processing system error or fault handling – Reliability and availability

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C714S038110, C717S152000

Reexamination Certificate

active

06240529

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates to a debugging method and a debugging apparatus for a microcomputer system and a recording medium on which a debug program is recorded. More specifically, the present invention relates to a debugging method and a debugging apparatus wherein a debugged state of a system at a certain point of time during operation of the system is stored and thereafter restored to perform re-execution from the point of time and a recording medium on which a debug program for the debugging method and the debugging apparatus is recorded.
2. Description of the Related Art
When it is tried to develop a system newly, it must be verified in a debugging step or an inspection step whether or not a program for use with the system operates correctly as intended by a designer. In those steps, the program is inputted to a debugging apparatus so that simulation of operation or debugging is performed by the debugging apparatus. In this instance, unless specified specifically, the debugging apparatus starts its simulation beginning at the top of the program.
However, in the debugging step or inspection step for a program, debugging or inspection is in most cases performed based on an operation test procedure prepared by a designer of the program for confirming whether or not the system operates in accordance with the specifications. Then, if correct operation continues up to a portion of the program and thereafter false operation is performed, then the location is detected, and the program is corrected based on a result of the detection. Then, the debugging or inspection is repeated after it is confirmed that the corrected portion of the program is now operating correctly.
In short, in the process above, there is correct operation up to a specific point of time in the program, and when a state of incorrect operation is detected at a next point of time the program is repaired, correct operation is reconfirmed and the operation is repeated to check if there is a subsequent place of incorrect operation.
Thus, in order to perform a debugging operation efficiently, a function to restore a debugged state at a certain point of time and perform re-execution of a program beginning at a place in the program other than the top is required.
In conventional debugging methods and debugging apparatus, as a function to restore a debugged state at a certain point of time to allow re-execution from that point of time, two functions of a back execution function and a function to hold state are available. The back execution function is a function to store, when an instruction is executed, information of a memory, a register and so forth whose states have changed as a result of the execution of the instruction into a buffer for exclusive use and to return, upon back execution, the debugged state in accordance with the stored contents of the buffer by one-by-one instruction to the condition prior to the execution condition. The function to hold a state is a function to store a debugged state at certain point of time into a state storage file and, when it is desired to restore the debugged state at that point of time, the debugged state is restored by reading in the state storage file.
A conventional debugging apparatus is described in detail with reference to the drawings.
FIG. 1
is a diagrammatic view showing a system construction of a conventional debugging apparatus.
Recording medium
501
has a debug simulation program recorded thereon. Contents of the program are written into debugging apparatus
503
and used to control operation of simulation unit
505
, debugger unit
506
, state storage/restoration unit
507
and so forth which are components of debugging apparatus
503
. Debugging apparatus
503
performs simulation or debugging processing in response to an inputted command from information IN/OUT apparatus
502
. Upon starting of debugging, a down load command is inputted from information IN/OUT apparatus
502
to down load object code file
504
of a program, which is an object of debugging, to debugging apparatus
503
.
Simulation unit
505
in debugging apparatus
503
executes the down loaded program by one-by-one instruction by ordinary execution unit
508
. If a command to acquire information for back execution has been issued prior to the execution, then each time an instruction is executed, the value of a register, a memory or the like which has been changed by the instruction is stored into a buffer for an exclusive use of back execution unit
509
. When a back execution command is issued, back execution unit
509
restores the state prior to execution of an instruction by one-by-one instruction using the information stored in the buffer.
Debugger unit
506
in debugging apparatus
503
performs processing regarding a debugging function for breaking, tracing and so forth. A break point at which execution of a program is interrupted when a certain event occurs or a trace are recorded, and an instruction execution situation, a memory access situation or the like at a point of time when a certain event occurs, is set by an individual command. Events and actions, such as breaking, tracing and so forth when such events occur, which are set by such commands, are registered in event processing unit
510
and action processing unit
511
in debugger unit
506
, respectively, and are processed in the following manner when the instructions are executed.
In event processing unit
510
, each time one instruction is executed, it is checked by event detection unit
512
whether or not a state which corresponds to any of the event conditions set in advance has occurred, and if an event is detected, then this is reported to action processing unit
511
through event occurrence reporting unit
513
. Action processing unit
511
checks whether or not an action which originates from the event reported thereto is included in the actions registered in advance therein, and if the action is a registered one, then processing of the action is performed by a suitable one of break processing unit
514
, trace processing unit
515
and so forth.
In state storage/restoration unit
507
in debugging apparatus
503
, state storage unit
516
stores a debugged state into state storage file
518
when a debugged state storage command is issued or at a predetermined timing determined for the debugging apparatus. Predetermined timing here signifies a timing after several instructions are executed or several commands are issued or when simulation/debugging comes to an end. State restoration unit
517
performs, when a state restoration command is issued, based on an arbitrary one of state storage files
518
, processing to return the debugged state to the state when the file was stored.
A conventional debugging method is described in detail with reference to the drawings.
FIGS. 2A and 2B
are flow charts illustrating a processing flow of a conventional debugging method.
The debugging apparatus when started enters a command input waiting mode (
601
) so that it receives an inputted command from a user and performs an operation conforming to the command to realize simulation or debugging. If a command is inputted (
602
), then the debugging apparatus analyzes the command. In this instance, if a debugged state changes as a result of processing of the command, then a command counter is incremented (
603
). If a result of the command analysis reveals that the command is an execution command (
604
), then an execution flag is set to ON (
605
) and one instruction is executed (
606
).
Then, debugging processing which is to be processed incidentally to the execution of one instruction is performed. First, if a back execution information acquisition flag is ON (
607
), then information of a memory, a register or the like which has changed as a result of the execution of the instruction is stored into a back execution information storage buffer (
608
). The ON/OFF operation of the back execution information acquisition flag is performed with a back execution information acquisi

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

Debugging method and debugging apparatus for microcomputer... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Debugging method and debugging apparatus for microcomputer..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Debugging method and debugging apparatus for microcomputer... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2559191

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