JP2001051872A - Program debugging device and recording medium where program is recorded - Google Patents

Program debugging device and recording medium where program is recorded

Info

Publication number
JP2001051872A
JP2001051872A JP11221418A JP22141899A JP2001051872A JP 2001051872 A JP2001051872 A JP 2001051872A JP 11221418 A JP11221418 A JP 11221418A JP 22141899 A JP22141899 A JP 22141899A JP 2001051872 A JP2001051872 A JP 2001051872A
Authority
JP
Japan
Prior art keywords
instruction
execution result
program
work memory
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP11221418A
Other languages
Japanese (ja)
Other versions
JP3645452B2 (en
Inventor
Toshiki Ando
俊城 安藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP22141899A priority Critical patent/JP3645452B2/en
Publication of JP2001051872A publication Critical patent/JP2001051872A/en
Application granted granted Critical
Publication of JP3645452B2 publication Critical patent/JP3645452B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily perform return debugging. SOLUTION: This debugging device executes instructions 3 of each step constituting a program 1 by using the execution results of instructions 3 which are temporarily stored in a work memory 6 and executed in last steps and overwrites the execution results in the work memory. This device is equipped with means 11 to 13 which store and hold the execution results of the instructions written to the work memory in a trace file 14 together with step numbers, a means 16 which extracts the execution results of the step numbers of the instructions executed right before the step numbers stored in the trace file and writes them to the work memory 6, and a means 5 which executes the instruction of specified step numbers after the mentioned means writes the execution results 18 to the work memory.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、作成されたプログ
ラムをデバッグするプログラムデバッグ装置、及びこの
プログラムデバッグ装置に組込まれ、プログラムデバッ
グを行うためのプログラムを記録した記録媒体に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program debugging device for debugging a created program, and a recording medium which is incorporated in the program debugging device and records a program for program debugging.

【0002】[0002]

【従来の技術】作成されたプログラムをデバッグするプ
ログラムデバッグ装置は例えば図5に示すように構成さ
れている。作成されたプログラム1においては、各ステ
ップ番号2に対して命令3が書き込まれている。プログ
ラムカウンタ4はステップ番号を計数する。プログラム
実行部5は、プログラムカウンタ4のカウント値(計数
値)が指定するステップ番号2の命令3を実行し、その
実行結果をワークメモリ6へ書込む。この場合、一つ前
に実行された命令3の実行結果を用いて次の命令3を実
行する場合が多々ある。ワークメモリ5は各命令3の実
行結果を一時的に記憶する機能を有しているので、新た
な命令3の実行結果が生じると、この実行結果は先に実
行された命令の実行結果に上書きされる。
2. Description of the Related Art A program debugging apparatus for debugging a created program is configured, for example, as shown in FIG. In the created program 1, an instruction 3 is written for each step number 2. The program counter 4 counts step numbers. The program execution unit 5 executes the instruction 3 of the step number 2 specified by the count value (count value) of the program counter 4, and writes the execution result to the work memory 6. In this case, the next instruction 3 is often executed using the execution result of the instruction 3 executed immediately before. Since the work memory 5 has a function of temporarily storing the execution result of each instruction 3, when a new execution result of the instruction 3 occurs, the execution result overwrites the execution result of the previously executed instruction. Is done.

【0003】また、プログラム実行部5は、各ステップ
の命令3を実行する過程で、入出力I/O7を介して、
外部メモリ8へデータを書込んだり、外部メモリ8から
データを取込む。
In the course of executing the instruction 3 of each step, the program execution section 5 receives, via an input / output I / O 7,
Data is written to the external memory 8 or data is taken from the external memory 8.

【0004】さらに、操作部9を介して、操作者が指定
したステップ番号2でプログラムカウンタ4の計数動作
を一時停止させて、そのステップ番号2の命令3の実行
結果を表示部10に表示させることができる。
Further, the counting operation of the program counter 4 is temporarily stopped at the step number 2 designated by the operator via the operation unit 9 and the execution result of the instruction 3 of the step number 2 is displayed on the display unit 10. be able to.

【0005】このように、操作者は、作成されたプログ
ラム1におけるデバッグ動作において、任意のステップ
番号2で、デバッグ動作を一時停止させて、その時点で
の命令3の実行結果を表示部10で確認できる。
[0005] As described above, the operator suspends the debugging operation at an arbitrary step number 2 in the debugging operation of the created program 1, and displays the execution result of the instruction 3 at that time on the display unit 10. You can check.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、図5に
示したプログラムデバッグ装置においても、まだ改良す
べき次のような課題があった。
However, the program debug device shown in FIG. 5 still has the following problems to be improved.

【0007】すなわち、操作者は、プログラム1のデバ
ッグ動作過程における任意位置での実行結果を確認する
ことができる。しかし、このデバッグ動作はプログラム
1におけるステップ番号の若い順に各命令3が実行され
ていくので、未実行の命令3のステップ番号2を指定し
て、この命令3の実行結果を確認することが可能であ
る。
That is, the operator can confirm the execution result of the program 1 at an arbitrary position in the debugging operation process. However, in this debugging operation, since each instruction 3 is executed in ascending order of the step number in the program 1, it is possible to specify the step number 2 of the unexecuted instruction 3 and confirm the execution result of this instruction 3. It is.

【0008】しかし、実行済みのステップ番号における
命令3の実行結果を表示させることができない。この理
由は、各ステップにおける各命令3の実行結果はワーク
メモリ6に一旦、記憶されるが、次のステップの命令3
が実行されると、その実行結果により上書きされ、ワー
クメモリ6上から消去されるから、たとえ、ステップ番
号2で命令3を指定しても、該当命令3の一つ前の命令
3の実行結果が不明であるので、該当命令3を実行でき
ないからである。
However, the result of execution of the instruction 3 at the executed step number cannot be displayed. The reason is that the execution result of each instruction 3 in each step is temporarily stored in the work memory 6, but the instruction 3 in the next step is stored.
Is executed, the execution result is overwritten by the execution result and is erased from the work memory 6. Therefore, even if the instruction 3 is specified by the step number 2, the execution result of the instruction 3 immediately before the instruction 3 Is unknown, and the corresponding instruction 3 cannot be executed.

【0009】したがって、作成済みのプログラムに対す
る1回目のデバック処理の終了後、このデバッグ実行結
果に異常点が発見された場合、その異常原因を究明する
ために、ステップ番号を指定して、該当位置の命令を再
実行させる必要がある。このような場合、プログラム1
のデバッグ動作をステップ番号2の先頭から再度やり直
す必要がある。
Therefore, if an abnormal point is found in the result of the debugging after the first debugging process for the created program is completed, a step number is specified in order to investigate the cause of the abnormality, and the corresponding position is designated. Must be re-executed. In such a case, program 1
Needs to be restarted from the beginning of step number 2.

【0010】そのため、デバッグ対象のプログラムが長
い場合、その都度、プログラムの最初からデバッグ動作
を実行すると、デバッグ作業に多大の手間と作業時間が
必要となり、このプログラムデバッグ装置を用いたプロ
グラムに対するデバッグ作業能率が大幅に低下する。
[0010] Therefore, when the program to be debugged is long, if the debugging operation is executed from the beginning of the program each time, a large amount of labor and time are required for the debugging operation, and the debugging operation for the program using this program debugging apparatus is required. Efficiency is greatly reduced.

【0011】なお、ワープロソフトにおいては、オペレ
ータが誤ってキー操作した場合において、この誤ったキ
ー操作をキャンセルするために、プログラムの実行状態
を一つ前のキー操作状態に戻す「UNDO」機能が組込
まれている。
Incidentally, in the word processing software, in order to cancel the erroneous key operation when the operator erroneously operates the key, an "UNDO" function for returning the execution state of the program to the immediately previous key operation state is provided. It is built in.

【0012】しかし、この「UNDO」機能において
は、キー入力単位で、過去の実行状態をメモリに記憶保
持している。一つのキー操作で複数の命令が実行される
ことは頻繁に発生するので、たとえこの「UNDO」機
能をプログラムデバッグ装置に組込んだとしても、操作
者は、各命令毎の実行結果を得ることができない。
However, in the "UNDO" function, a past execution state is stored in a memory for each key input. Since a plurality of instructions are frequently executed by one key operation, even if this "UNDO" function is incorporated in the program debugging device, the operator must obtain an execution result for each instruction. Can not.

【0013】さらに、この「UNDO」機能において
は、実行されたキー操作を、キー操作一つ一つ順番に遡
って行くので、1回の操作で目標のキー操作の実行状態
を再現できない。
Further, in the "UNDO" function, the executed key operations are traced back one by one, so that the execution state of the target key operation cannot be reproduced by one operation.

【0014】本発明はこのような事情に鑑みてなされた
ものであり、各ステップの命令の実行結果を記憶保持す
ることによって、デバック実行済みのプログラムにおけ
る任意位置の命令を単独で実行させることができ、プロ
グラムにおけるデバック作業能率を大幅に向上できるプ
ログラムデバック装置及びプログラムデバッグを行うた
めのプログラムを記録した記録媒体を提供することを目
的とする。
The present invention has been made in view of such circumstances, and by executing and storing the execution results of the instructions in each step, it is possible to independently execute an instruction at an arbitrary position in a debug-executed program. It is an object of the present invention to provide a program debugging device and a recording medium on which a program for performing program debugging is recorded, which can greatly improve a debugging operation efficiency of the program.

【0015】[0015]

【課題を解決するための手段】本発明は、作成されたプ
ログラムを構成する各ステップの命令を、ワークメモリ
に一時記憶された一つ前のステップで実行された命令の
実行結果を用いて実行し、この実行結果をワークメモリ
の一つ前の実行結果に上書きすると共に、必要に応じて
この実行結果を出力するプログラムデバッグ装置に適用
される。
According to the present invention, an instruction of each step constituting a created program is executed using an execution result of an instruction executed in the immediately preceding step temporarily stored in a work memory. Then, this execution result is applied to a program debugging device that overwrites the previous execution result in the work memory and outputs this execution result as necessary.

【0016】そして、上記課題を解消するために、本発
明のプログラムデバッグ装置においては、各ステップの
命令が実行される毎に、ワークメモリに書込まれた該当
命令の実行結果をステップ番号と共にトレースファイル
に記憶保持していく手段と、ステップ番号を指定したデ
バッグ再実行指令に応動して、トレースファイルに記憶
された該当ステップ番号の一つ前に実行された命令のス
テップ番号の実行結果を抽出してワークメモリに書込む
手段と、この手段にてワークメモリに実行結果が書込ま
れた後に、指定されたステップ番号の命令を実行する手
段とを備えている。
In order to solve the above-mentioned problems, in the program debugging apparatus of the present invention, each time an instruction of each step is executed, the execution result of the instruction written in the work memory is traced together with the step number. Extracts the execution result of the step number of the instruction executed one step before the corresponding step number stored in the trace file in response to the means for storing and holding in the file and the debug re-execution command specifying the step number And a means for executing an instruction of a designated step number after the execution result is written to the work memory by this means.

【0017】このように構成されたプログラムデバック
装置においては、作成されたプログラムにおける各ステ
ップの命令が実行される毎に、ワークメモリに書込まれ
た該当命令の実行結果がステップ番号と共にトレースフ
ァイルに記憶保持される。
In the program debugging apparatus thus configured, every time the instruction of each step in the created program is executed, the execution result of the instruction written in the work memory is stored in the trace file together with the step number. It is stored.

【0018】このように、実行済みの各命令の実行結果
が破棄されずに、トレースファイルに記憶保持されてい
ることは、任意位置の命令における一つ前の命令に対す
る実行結果も記憶保持されていることになる。その結
果、任意位置の命令を一つ前の命令に対する実行結果を
用いて即座に実行することができる。
As described above, the fact that the execution result of each executed instruction is not discarded but is stored and held in the trace file means that the execution result of the immediately preceding instruction at the arbitrary position is also stored and held. Will be. As a result, an instruction at an arbitrary position can be immediately executed using the execution result of the immediately preceding instruction.

【0019】よって、デバック済みのプログラムにおけ
る任意位置の命令に対するデバックが再実行可能とな
り、作成済みのプログラムに対する1回目のデバック処
理の終了後、このデバッグ実行結果に異常点が発見され
た場合における異常原因究明作業の能率を向上できる。
Therefore, debugging of an instruction at an arbitrary position in a debugged program can be re-executed. After the first debugging process for a created program is completed, an error is detected when an abnormal point is found in the debugging execution result. The efficiency of the cause investigation work can be improved.

【0020】また、別の発明のプログラムデバック装置
においては、各ステップの命令が実行される毎に、ワー
クメモリに書込まれた該当命令の実行結果をステップ番
号及び該当命令と共にトレースファイルに記憶保持して
いく手段と、プログラムに含まれる一つの命令を指定し
たデバッグ再実行指令に応動して、トレースファイルに
記憶された該当命令の一つ前に実行された命令の実行結
果を抽出してワークメモリに書込む手段と、この手段に
てワークメモリに実行結果が書込まれた後に、指定され
た命令を実行する手段とを備えている。
Further, in the program debugging device of another invention, every time the instruction of each step is executed, the execution result of the relevant instruction written in the work memory is stored and held in the trace file together with the step number and the relevant instruction. In response to a debug re-execution instruction specifying one instruction included in the program, the execution result of the instruction executed immediately before the corresponding instruction stored in the trace file is extracted and the work is performed. There are provided means for writing to the memory, and means for executing the designated instruction after the execution result is written to the work memory by the means.

【0021】このように構成されたプログラムデバック
装置においても、作成されたプログラムにおける各ステ
ップの命令が実行される毎に、ワークメモリに書込まれ
た該当命令の実行結果がステップ番号及び命令と共にト
レースファイルに記憶保持される。
In the program debugging apparatus thus constructed, each time an instruction of each step in the created program is executed, the execution result of the instruction written in the work memory is traced together with the step number and the instruction. Stored in a file.

【0022】したがって、上述した発明のプログラムデ
バック装置と同様に、デバック済みのプログラムにおけ
る任意位置の命令に対するデバックが再実行可能とな
る。さらに、この発明においては、命令を指定したデバ
ックの再実行を可能としている。
Therefore, similarly to the program debugging device of the invention described above, debugging of an instruction at an arbitrary position in a debugged program can be re-executed. Further, according to the present invention, it is possible to re-execute debugging in which an instruction is specified.

【0023】さらに別の発明は、作成されたプログラム
を構成する各ステップの命令を、ワークメモリに一時記
憶された一つ前のステップで実行された命令の実行結果
を用いて実行し、この実行結果をワークメモリの一つ前
の実行結果に上書きすると共に、必要に応じてこの実行
結果を出力するプログラムデバッグ装置に組込まれたプ
ログラムを記録した記録媒体である。
According to still another invention, an instruction of each step constituting a created program is executed using an execution result of the instruction executed in the immediately preceding step temporarily stored in the work memory, and the execution is executed. This is a recording medium that records a program incorporated in a program debugging device that overwrites the result with the immediately preceding execution result in the work memory and outputs the execution result as necessary.

【0024】そして、この記録媒体に記憶されたプログ
ラムは、コンピユータに対して、各ステップの命令が実
行される毎に、ワークメモリに書込まれた該当命令の実
行結果をステップ番号と共にトレースファイルに記憶保
持させ、ステップ番号を指定したデバッグ再実行指令に
応動して、トレースファイルに記憶された該当ステップ
番号の一つ前に実行された命令のステップ番号の実行結
果を抽出してワークメモリに書込ませ、ワークメモリに
実行結果が書込まれた後に、指定されたステップ番号の
命令を実行させるようにしている。
The program stored in the recording medium stores the execution result of the corresponding instruction written in the work memory together with the step number in a trace file every time the instruction of each step is executed. In response to the debug re-execution command specifying the step number, the execution result of the step number of the instruction executed immediately before the corresponding step number stored in the trace file is extracted and written to the work memory. After the execution result is written in the work memory, the instruction of the designated step number is executed.

【0025】[0025]

【発明の実施の形態】以下、本発明の一実施形態を図面
を用いて説明する。図1は実施形態に係るプログラムデ
バック装置の概略構成を示すブロック図である。図5に
示す従来のプログラムデバック装置と同一部分には同一
符号を付して重複する部分の詳細説明を省略する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a program debugging device according to the embodiment. The same parts as those of the conventional program debugging apparatus shown in FIG. 5 are denoted by the same reference numerals, and detailed description of the overlapping parts will be omitted.

【0026】作成されたプログラム1においては、各ス
テップ番号2に対して命令3が書き込まれている。プロ
グラムカウンタ4はステップ番号を計数する。プログラ
ム実行部5は、プログラムカウンタ4のカウント値(計
数値)CNが指定するステップ番号2の命令3を実行
し、その実行結果をワークメモリ6へ書込む。ワークメ
モリ5は各命令3の実行結果を一時的に記憶する機能を
有し、新たな命令3の実行結果が生じると、この実行結
果はワークメモリ6に記憶された先に実行された命令の
実行結果に上書きされる。
In the created program 1, an instruction 3 is written for each step number 2. The program counter 4 counts step numbers. The program execution unit 5 executes the instruction 3 of the step number 2 specified by the count value (count value) CN of the program counter 4 and writes the execution result to the work memory 6. The work memory 5 has a function of temporarily storing an execution result of each instruction 3. When a new execution result of the instruction 3 is generated, the execution result is stored in the work memory 6 of the previously executed instruction. Overwritten with the execution result.

【0027】また、プログラム実行部5は、各ステップ
の命令3を実行する過程で、入出力I/O7を介して、
外部メモリ8へデータを書込んだり、外部メモリ8から
データを取込む。
In the course of executing the instruction 3 of each step, the program execution unit 5 receives, via the input / output I / O 7,
Data is written to the external memory 8 or data is taken from the external memory 8.

【0028】さらに、操作部9を介して、操作者が指定
したステップ番号2でプログラムカウンタ4の計数動作
を一時停止させて、そのステップ番号2の命令3の実行
結果を表示部10に表示させることができる。
Further, the counting operation of the program counter 4 is temporarily stopped at the step number 2 designated by the operator via the operation unit 9, and the execution result of the instruction 3 of the step number 2 is displayed on the display unit 10. be able to.

【0029】さらに、この実施形態のプログラムデバッ
グ装置においては、データ取込部11、実行結果バッフ
ァ12、実行結果書込部13、トレースファイル14、
戻り位置指定部15、実行結果抽出部16が設けられて
いる。
Further, in the program debugging device of this embodiment, the data fetching unit 11, the execution result buffer 12, the execution result writing unit 13, the trace file 14,
A return position designation unit 15 and an execution result extraction unit 16 are provided.

【0030】このプログラム実行部5、データ取込部1
1、実行結果書込部13、実行結果抽出部16は、RA
MやROM等の記憶媒体に記録されたプログラムで実現
される。
The program execution unit 5 and the data acquisition unit 1
1. The execution result writing unit 13 and the execution result extraction unit 16
It is realized by a program recorded in a storage medium such as M or ROM.

【0031】トレースファイル14内には、図2に示す
ように、プログラム実行部5における命令3の実行番号
17順に、該当プログラム実行部5で実行したプログラ
ム1の各命令3、各ステップ番号2,各実行結果18が
書込まれる。なお、実行番号17とステップ番号2とが
一致しないのは、命令3が分岐命令等で、次に実行する
命令3が必ずしも次のステップ番号2の命令3であると
は限らないからである。
As shown in FIG. 2, in the trace file 14, each instruction 3 of the program 1 executed by the corresponding program execution unit 5, each step number 2, Each execution result 18 is written. The reason why the execution number 17 does not match the step number 2 is that the instruction 3 is a branch instruction or the like, and the instruction 3 to be executed next is not necessarily the instruction 3 of the next step number 2.

【0032】データ取込部11は、プログラム実行部5
が実行してワークメモリ6に書込まれた各実行結果18
を、実行番号17、ステップ番号2、命令3と共に取込
んで実行結果バッファ12へ書込む。
The data fetching unit 11 includes the program execution unit 5
Is executed and written in the work memory 6
Along with the execution number 17, the step number 2, and the instruction 3, and writes them into the execution result buffer 12.

【0033】実行結果書込部13は、実行結果バッファ
12が、実行結果18で満杯になると実行結果バッファ
12に記憶された実行結果18をトレースファイル14
へ移動させる。
When the execution result buffer 12 becomes full with the execution result 18, the execution result writing unit 13 writes the execution result 18 stored in the execution result buffer 12 into the trace file 14.
Move to

【0034】戻り位置指定部15は、操作者からステッ
プ番号2又は命令3を指定したデバッグ再実行指令が入
力されると、入力されたステップ番号2又は命令3をプ
ログラム実行部5及び実行結果抽出部16へ送出すると
共に、入力されたステップ番号2をプログラムカウンタ
4の計数値CNに設定する。
When the operator inputs a debug re-execution command specifying the step number 2 or the command 3, the return position specifying unit 15 converts the input step number 2 or the command 3 into the program execution unit 5 and the execution result extraction. At the same time, the input step number 2 is set to the count value CN of the program counter 4.

【0035】実行結果抽出部16は、戻り位置指定部1
5から指定されたステップ番号2又は命令3の一つ前
(直前)に実行された命令3の実行結果18をワークメ
モリ6へ書込む。
The execution result extraction unit 16 is provided with the return position designation unit 1
The execution result 18 of the instruction 3 executed immediately before (immediately before) the step number 2 or the instruction 3 designated from 5 is written in the work memory 6.

【0036】このような構成のプログラムデバック装置
は図3に示す流れ図に従って作成されたプログラム1に
対する1回目のデバック処理動作を実行する。
The program debug device having such a configuration executes the first debug processing operation for the program 1 created according to the flowchart shown in FIG.

【0037】まず、プログラムカウンタ4の計数値CN
を「0」の初期値に設定する(S1)。次に、プログラ
ム実行部5が起動してプログラムカウンタ4の計数値C
Nが示すステップ番号2の命令3を読出して実行する
(S2)。そして、その実行結果18を実行番号17,
ステップ番号2、該当命令3と共にワークメモリ6へ書
込む(S3)。この命令3の実行過程で、必要ならば、
ワークメモリ6に記憶されている一つ前に実行された命
令3の実行結果を用いる。
First, the count value CN of the program counter 4
Is set to the initial value of "0" (S1). Next, the program execution unit 5 is activated and the count value C of the program counter 4 is calculated.
The instruction 3 of the step number 2 indicated by N is read and executed (S2). Then, the execution result 18 is stored in the execution number 17,
The data is written into the work memory 6 together with the step number 2 and the corresponding instruction 3 (S3). During the execution of this instruction 3, if necessary
The execution result of the previously executed instruction 3 stored in the work memory 6 is used.

【0038】次に、データ取込部11が起動して、ワー
クメモリ6に今回書込まれた実行結果18を実行番号1
7、ステップ番号2、命令3と共に、実行結果バッファ
12へ書込む(S4)。
Next, the data fetching unit 11 is activated, and the execution result 18 written this time in the work memory 6 is stored in the execution number 1
7, along with the step number 2 and the instruction 3, are written into the execution result buffer 12 (S4).

【0039】実行結果バッファ12が満杯になると(S
5)、実行結果書込部13が起動して、実行結果バッフ
ァ12に記憶された実行結果18を読出して図2に示す
トレースファイル14へ追加書込する(S6)。その
後、プログラムカウンタ4の計数値CNを1だけ更新す
る(S7)。
When the execution result buffer 12 becomes full (S
5), the execution result writing unit 13 is activated, reads the execution result 18 stored in the execution result buffer 12, and additionally writes it to the trace file 14 shown in FIG. 2 (S6). Thereafter, the count value CN of the program counter 4 is updated by 1 (S7).

【0040】CN=CN+1 更新後の計数値CNがプログラム1の最終のステップ数
で定まる最大値CNmaxを超えていないことを確認する
と(S8)、S2へ戻り、次のステップ番号の命令3を
読出して実行する。
CN = CN + 1 When it is confirmed that the updated count value CN does not exceed the maximum value CNmax determined by the final number of steps of the program 1 (S8), the process returns to S2 and reads the instruction 3 of the next step number. Run.

【0041】更新後の計数値CNが最大値CNmaxを超
えると、作成されたプログラム1に対する1回目のデバ
ック処理動作を終了する。
When the updated count value CN exceeds the maximum value CNmax, the first debug processing operation for the created program 1 ends.

【0042】なお、図3の流れ図においては、作成され
たプログラム1の各命令3に分岐条件が含まれない場合
を示したが、分岐命令が含まれる場合は、分岐命令の実
行結果に基づいて、プログラムカウンタ4の計数値CN
が分岐先のステップ番号に移行する。しかし、たとえス
テップ番号2が不連続に移動したとしても、プログラム
実行部5が行う各命令3の実行番号17は一連の続き番
号を維持する。
Although the flowchart of FIG. 3 shows a case where no branch condition is included in each instruction 3 of the created program 1, if a branch instruction is included, it is determined based on the execution result of the branch instruction. , The count value CN of the program counter 4
Shifts to the step number of the branch destination. However, even if the step number 2 moves discontinuously, the execution number 17 of each instruction 3 executed by the program execution unit 5 maintains a series of consecutive numbers.

【0043】また、作成されたプログラム1に対する1
回目のデバック処理動作が終了した後に、操作者が戻り
位置指定部15からステップ番号2を指定したデバッグ
再実行指令が入力されると、図4に示す流れ図に従っ
て、デバッグ再実行処理を実行する。
Also, 1 for the created program 1
When the operator inputs a debug re-execution command specifying the step number 2 from the return position specifying unit 15 after the end of the second debug processing operation, the debug re-execution processing is executed according to the flowchart shown in FIG.

【0044】ステップ番号2を指定したデバッグ再実行
指令が入力されると(Q1)、実行結果抽出部16が起
動して、戻り位置指定部15から指定されたステップ番
号(CNa)の一つ前(直前)ステップ番号(CNa−
1)の命令3の実行結果18をトレースメモリ14から
読出して(Q2)、ワークメモリ6へ書込む(Q3)。
次に、プログラムカウンタ4の計数値CNを指定ステッ
プ番号CNaに一致させる(Q4)。
When a debug re-execution command designating step number 2 is input (Q1), the execution result extraction unit 16 is started up and immediately before the step number (CNa) designated by the return position designation unit 15. (Immediately before) step number (CNa-
The execution result 18 of the instruction 3 of 1) is read from the trace memory 14 (Q2) and written to the work memory 6 (Q3).
Next, the count value CN of the program counter 4 is matched with the designated step number CNa (Q4).

【0045】CN=CNa そして、プログラム実行部5を起動して、プログラムカ
ウンタ4の計数値CNが指定するステップ番号2の命令
3を読出して実行する。この場合、必要ならば、ワーク
メモリ6に実行結果抽出部16にて書込まれた一つ前に
実行された命令の実行結果を用いる(Q5)。そして、
今回の新たな実行結果18をワークメモリ6へ書込む
(Q6)。その後、今回の実行結果18を表示部10に
表示出力する(Q7)。
CN = CNa Then, the program execution unit 5 is started, and the instruction 3 of the step number 2 designated by the count value CN of the program counter 4 is read and executed. In this case, if necessary, the execution result of the previously executed instruction written in the work memory 6 by the execution result extraction unit 16 is used (Q5). And
The new execution result 18 is written to the work memory 6 (Q6). Thereafter, the current execution result 18 is displayed on the display unit 10 (Q7).

【0046】そして、操作部9からデバッグの継続実行
指示が入力されなければ、所定の終了処理を実行して
(Q9)、今回のデバッグ再実行処理を終了する。
If the instruction to continue the debugging is not input from the operation unit 9, a predetermined ending process is executed (Q9), and the current debugging re-execution process is ended.

【0047】また、操作部9からデバッグの継続実行指
示が入力されると、図3のS7へ移行して、プログラム
カウンタ4のの計数値CNを1だけ更新した後、S2へ
戻り、次のステップ番号2の命令3を読出して実行す
る。すなわち、指定されたステップ番号からプログラム
1のデバッグ処理動作を開始する。
When an instruction to continuously execute debugging is input from the operation unit 9, the flow shifts to S7 in FIG. 3, updates the count value CN of the program counter 4 by 1, returns to S2, and returns to S2. Instruction 3 of step number 2 is read and executed. That is, the debug operation of the program 1 is started from the designated step number.

【0048】このように構成されたプログラムデバック
装置においては、作成されたプログラム1に対する1回
目のデバッグ処理動作過程において、各ステップ番号2
の命令3がプログラム実行部5で実行される毎に、ワー
クメモリ6に書込まれた該当命令3の実行結果18が実
行番号17、ステップ番号2、該当命令3と共にトレー
スファイル14に時系列的に記憶保持されて行く。
In the program debugging apparatus thus configured, in the first debugging operation of the created program 1, each step number 2
Each time the instruction 3 is executed by the program execution unit 5, the execution result 18 of the instruction 3 written in the work memory 6 is stored in the trace file 14 in chronological order along with the execution number 17, the step number 2, and the instruction 3. Will be kept in memory.

【0049】そして、作成されたプログラム1に対する
1回目のデバック処理動作が終了した後に、デバッグ実
行結果に異常点が発見された場合に、ステップ番号2を
指定してデバッグ再実行指令を入力すると、ステップ番
号2の命令3一つ前の命令3に対する実行結果を用いて
即座に実行される。
After the first debug processing operation for the created program 1 is completed, if an abnormal point is found in the debug execution result, a debug re-execution instruction is input with the step number 2 specified. The instruction 3 of the step number 2 is immediately executed using the execution result of the instruction 3 immediately before.

【0050】よって、デバック済みのプログラム1にお
ける任意位置の命令3に対するデバックが再実行可能と
なり、作成済みのプログラム1に対する1回目のデバッ
ク処理の終了後、このデバッグ実行結果に異常点が発見
された場合における異常原因究明作業の能率を向上でき
る。
Therefore, debugging of the instruction 3 at an arbitrary position in the debugged program 1 can be re-executed. After the first debugging process for the created program 1 is completed, an abnormal point is found in the debugging execution result. In this case, the efficiency of the work for investigating the cause of the abnormality can be improved.

【0051】なお、本発明は上述した実施形態に限定さ
れるものではない。実施形態装置においては、ステップ
番号で再度デバッグする命令3を指定した。しかし、命
令3とステップ番号2とは対応しているので、直接命令
3を指定することも可能である。
Note that the present invention is not limited to the above embodiment. In the embodiment device, the instruction 3 to be debugged again is designated by the step number. However, since the instruction 3 corresponds to the step number 2, the instruction 3 can be directly specified.

【0052】また、上述した実施形態に説明した装置
は、記録媒体に格納したプログラムをコンピュータに読
み込ませることで実現させることができる。
The apparatus described in the above embodiment can be realized by causing a computer to read a program stored in a recording medium.

【0053】ここで本発明における記録媒体としては、
磁気ディスク、フロッピー(登録商標)ディスク、ハー
ドディスク、光ディスク(CD−ROM、CD−R、D
VD等)、光磁気ディスク(MO等)、半導体メモリ
等、プログラムを記録でき、かつコンピュータが読み取
り可能な記録媒体であれば、その記録形式は何れの形態
であってもよい。
Here, as the recording medium in the present invention,
Magnetic disk, floppy (registered trademark) disk, hard disk, optical disk (CD-ROM, CD-R, D
VD or the like, a magneto-optical disk (MO or the like), a semiconductor memory, or the like, as long as it is a recording medium that can record a program and that can be read by a computer.

【0054】また、記録媒体からコンピュータにインス
トールされたプログラムの指示に基づきコンピュータ上
で稼働しているOS(オペレーティングシステム)や、
データベース管理ソフト、ネットワークソフト等のMW
(ミドルウェア)等が本実施形態を実現するための各処
理の一部を実行してもよい。
An OS (Operating System) running on the computer based on the instructions of the program installed in the computer from the recording medium,
MW for database management software, network software, etc.
(Middleware) or the like may execute a part of each process for realizing the present embodiment.

【0055】さらに、本発明における記録媒体は、コン
ピュータと独立した媒体に限らず、LANやインターネ
ット等により伝送されたプログラムをダウンロードして
記録又は一時記録した記録媒体も含まれる。
Further, the recording medium in the present invention is not limited to a medium independent of a computer, but also includes a recording medium in which a program transmitted via a LAN, the Internet or the like is downloaded and recorded or temporarily recorded.

【0056】また、記録媒体は1つに限らず、複数の媒
体から本実施形態における処理が実行される場合も本発
明における記録媒体に含まれ、媒体構成は何らの構成で
あってもよい。
Further, the number of recording media is not limited to one, and the case where the processing in the present embodiment is executed from a plurality of media is also included in the recording medium of the present invention, and the medium may have any configuration.

【0057】なお、本発明におけるコンピュータは、記
録媒体に記録されたプログラムに基づき、本実施形態に
おける各処理を実行するものであって、パソコン等の1
つからなる装置、複数の装置がネットワーク接続された
システム等の何れの構成であってもよい。
The computer according to the present invention executes each process in the present embodiment based on a program recorded on a recording medium.
Any configuration such as a single device, a system in which a plurality of devices are connected to a network, or the like may be used.

【0058】また、本発明におけるコンピュータとは、
パソコンに限らず、情報処理機器に含まれる演算処理装
置、マイコン等も含み、プログラムによって本発明の機
能を実現することが可能な機器、装置を総称している。
The computer in the present invention is
It is not limited to a personal computer, but also includes a processing device, a microcomputer, and the like included in an information processing device, and generically refers to a device and a device capable of implementing the functions of the present invention by a program.

【0059】[0059]

【発明の効果】以上説明したように、本発明のプログラ
ムデバッグ装置及びログラムを記録した記録媒体におい
ては、作成されたプログラムに対する1回目のデバッグ
処理動作過程において、各ステップの命令の実行結果を
トレースファイルに記憶保持している。
As described above, in the program debugging apparatus and the recording medium on which the program is recorded according to the present invention, the execution result of the instruction of each step is traced in the first debugging operation of the created program. Stored in a file.

【0060】その結果、一つ前の命令の実行結果が既知
となるので、デバック実行済みのプログラムにおける任
意位置の命令を単独で実行させることができ、プログラ
ムにおけるデバック作業能率を大幅に向上できる。
As a result, the execution result of the immediately preceding instruction is known, so that the instruction at an arbitrary position in the debug-executed program can be executed independently, and the debugging work efficiency in the program can be greatly improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態に係わるプログラムデバッ
グ装置の概略構成を示すブロック図
FIG. 1 is a block diagram showing a schematic configuration of a program debugging device according to an embodiment of the present invention;

【図2】同プログラムデバッグ装置内に形成されたトレ
ースファイルの記憶内容を示す図
FIG. 2 is a view showing storage contents of a trace file formed in the program debugging device;

【図3】同プログラムデバッグ装置が行うプログラムに
対する1回目のデバック処理動作を示す流れ図
FIG. 3 is a flowchart showing a first debug processing operation for a program performed by the program debug device.

【図4】同プログラムデバッグ装置が行うプログラムに
対するデバッグ再実行処理動作を示す流れ図
FIG. 4 is a flowchart showing a debug re-execution processing operation for a program performed by the program debug device.

【図5】従来のプログラムデバッグ装置の概略構成を示
すブロック図
FIG. 5 is a block diagram showing a schematic configuration of a conventional program debug device.

【符号の説明】 1…プログラム 2…ステップ番号 3…命令 4…プログラムカウンタ 5…プログラム実行部 6…ワークメモリ y…入出力I/F 8…外部メモリ 9…操作部 10…表示部 11…データ取込部 12…実行結果バッファ 13…実行結果書込部 14…トレースファイル 15…戻り位置指定部 16…実行結果抽出部 17…実行番号 18…実行結果[Description of Signs] 1 ... Program 2 ... Step number 3 ... Instruction 4 ... Program counter 5 ... Program execution unit 6 ... Work memory y ... Input / output I / F 8 ... External memory 9 ... Operation unit 10 ... Display unit 11 ... Data Acquisition unit 12 Execution buffer 13 Execution result writing unit 14 Trace file 15 Return position designation unit 16 Execution result extraction unit 17 Execution number 18 Execution result

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 作成されたプログラムを構成する各ステ
ップの命令を、ワークメモリに一時記憶された一つ前の
ステップで実行された命令の実行結果を用いて実行し、
この実行結果を前記ワークメモリの前記一つ前の実行結
果に上書きすると共に、必要に応じてこの実行結果を出
力するプログラムデバッグ装置において、 前記各ステップの命令が実行される毎に、前記ワークメ
モリに書込まれた該当命令の実行結果をステップ番号と
共にトレースファイルに記憶保持していく手段と、 ステップ番号を指定したデバッグ再実行指令に応動し
て、前記トレースファイルに記憶された該当ステップ番
号の一つ前に実行された命令のステップ番号の実行結果
を抽出して前記ワークメモリに書込む手段と、 この手段にて前記ワークメモリに実行結果が書込まれた
後に、前記指定されたステップ番号の命令を実行する手
段とを備えたプログラムデバッグ装置。
An instruction of each step constituting a created program is executed using an execution result of an instruction executed in a previous step temporarily stored in a work memory,
A program debugging device that overwrites the previous execution result with the previous execution result of the work memory and outputs the execution result as needed. Means for storing and storing the execution result of the corresponding instruction written in the trace file together with the step number in the trace file; and responding to the debug re-execution command specifying the step number, Means for extracting the execution result of the step number of the instruction executed immediately before and writing the result in the work memory; and after the execution result is written in the work memory by this means, the specified step number And a means for executing the instruction.
【請求項2】 作成されたプログラムを構成する各ステ
ップの命令を、ワークメモリに一時記憶された一つ前の
ステップで実行された命令の実行結果を用いて実行し、
この実行結果を前記ワークメモリの前記一つ前の実行結
果に上書きすると共に、必要に応じてこの実行結果を出
力するプログラムデバッグ装置において、 前記各ステップの命令が実行される毎に、前記ワークメ
モリに書込まれた該当命令の実行結果をステップ番号及
び該当命令と共にトレースファイルに記憶保持していく
手段と、 前記プログラムに含まれる一つの命令を指定したデバッ
グ再実行指令に応動して、前記トレースファイルに記憶
された該当命令の一つ前に実行された命令の実行結果を
抽出して前記ワークメモリに書込む手段と、 この手段にて前記ワークメモリに実行結果が書込まれた
後に、前記指定された命令を実行する手段とを備えたプ
ログラムデバッグ装置。
2. An instruction of each step constituting the created program is executed using an execution result of the instruction executed in the immediately preceding step temporarily stored in the work memory,
A program debugging device that overwrites the previous execution result with the previous execution result of the work memory and outputs the execution result as needed. Means for storing and storing in a trace file the execution result of the corresponding instruction written in the program together with the step number and the corresponding instruction; and responding to a debug re-execution instruction specifying one instruction included in the program, and Means for extracting the execution result of the instruction executed immediately before the corresponding instruction stored in the file and writing the result in the work memory; and after the execution result is written in the work memory by the means, Means for executing a specified instruction.
【請求項3】 作成されたプログラムを構成する各ステ
ップの命令を、ワークメモリに一時記憶された一つ前の
ステップで実行された命令の実行結果を用いて実行し、
この実行結果を前記ワークメモリの前記一つ前の実行結
果に上書きすると共に、必要に応じてこの実行結果を出
力するプログラムデバッグ装置に組込まれ、コンピユー
タに対して、 前記各ステップの命令が実行される毎に、前記ワークメ
モリに書込まれた該当命令の実行結果をステップ番号と
共にトレースファイルに記憶保持させ、 ステップ番号を指定したデバッグ再実行指令に応動し
て、前記トレースファイルに記憶された該当ステップ番
号の一つ前に実行された命令のステップ番号の実行結果
を抽出して前記ワークメモリに書込ませ、 前記ワークメモリに実行結果が書込まれた後に、前記指
定されたステップ番号の命令を実行させるためのプログ
ラムを記録した記録媒体。
3. An instruction of each step constituting the created program is executed using an execution result of the instruction executed in the immediately preceding step temporarily stored in the work memory,
The execution result is overwritten on the previous execution result in the work memory, and is incorporated in a program debugging device that outputs the execution result as necessary. The instructions of the respective steps are executed on a computer. Each time the execution result of the corresponding instruction written in the work memory is stored in the trace file together with the step number, and in response to the debug re-execution command specifying the step number, the corresponding result stored in the trace file is stored. The execution result of the step number of the instruction executed immediately before the step number is extracted and written in the work memory. After the execution result is written in the work memory, the instruction of the specified step number is written. Recording medium on which a program for executing the program is recorded.
JP22141899A 1999-08-04 1999-08-04 Program debugging apparatus and recording medium recording program Expired - Fee Related JP3645452B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22141899A JP3645452B2 (en) 1999-08-04 1999-08-04 Program debugging apparatus and recording medium recording program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22141899A JP3645452B2 (en) 1999-08-04 1999-08-04 Program debugging apparatus and recording medium recording program

Publications (2)

Publication Number Publication Date
JP2001051872A true JP2001051872A (en) 2001-02-23
JP3645452B2 JP3645452B2 (en) 2005-05-11

Family

ID=16766438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22141899A Expired - Fee Related JP3645452B2 (en) 1999-08-04 1999-08-04 Program debugging apparatus and recording medium recording program

Country Status (1)

Country Link
JP (1) JP3645452B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005165600A (en) * 2003-12-02 2005-06-23 Nec Corp Transaction processing system and method, and program
CN104145249A (en) * 2012-02-29 2014-11-12 飞思卡尔半导体公司 Debugging method and computer program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005165600A (en) * 2003-12-02 2005-06-23 Nec Corp Transaction processing system and method, and program
CN104145249A (en) * 2012-02-29 2014-11-12 飞思卡尔半导体公司 Debugging method and computer program product

Also Published As

Publication number Publication date
JP3645452B2 (en) 2005-05-11

Similar Documents

Publication Publication Date Title
US20150006961A1 (en) Capturing trace information using annotated trace output
JPH10333937A (en) Method and device for debugging microcomputer system, and recording medium recorded with debugging program
JP2001051872A (en) Program debugging device and recording medium where program is recorded
JPH11224186A (en) Device and method for analyzing software
JP3206096B2 (en) Input data processing device
JPH0934754A (en) Instrument and method for measuring performance of program
JP2731047B2 (en) Program operand check method
JP2002318712A (en) Program running history analyzing method
JP2560892B2 (en) Error information processing device
JPH0561717A (en) Program debugging device
JPH07200350A (en) Software debugger
JP2642788B2 (en) Execution monitoring point reduction method
JPH04134535A (en) Exception information sampling mechanism for multitask program
JPH05225026A (en) Fault recovery system
JP2500385B2 (en) Input data management method
JPH07168711A (en) Program managing method
JPH05143422A (en) Updated journal managing system
JP2658699B2 (en) Method of managing device under test of input / output device test program
JPH0269837A (en) Program debug support device
CN115729557A (en) Script processing method and device
JPH0468446A (en) Debugging supporting device
JPH11110253A (en) Program debugging device and method
JP2001202272A (en) Debugging method, debugging device using this method and recording medium with debugging method recorded thereon
JPH0434626A (en) Error logging method
JPS626341A (en) Information processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041221

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050201

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050203

LAPS Cancellation because of no payment of annual fees