JPH0793184A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPH0793184A
JPH0793184A JP5237076A JP23707693A JPH0793184A JP H0793184 A JPH0793184 A JP H0793184A JP 5237076 A JP5237076 A JP 5237076A JP 23707693 A JP23707693 A JP 23707693A JP H0793184 A JPH0793184 A JP H0793184A
Authority
JP
Japan
Prior art keywords
file
stop
program
condition
information
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
JP5237076A
Other languages
Japanese (ja)
Other versions
JP2570593B2 (en
Inventor
Kenji Hiramatsu
健司 平松
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP5237076A priority Critical patent/JP2570593B2/en
Publication of JPH0793184A publication Critical patent/JPH0793184A/en
Application granted granted Critical
Publication of JP2570593B2 publication Critical patent/JP2570593B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To display information with respect to a file to which a debug target program is operated and to control the execution of the debug target program by using the information. CONSTITUTION:A command processor 20 receives a command from an input device 10, and stores a stoppage condition in a stoppage condition memory device 23 when it is a stoppage condition setting command, and acquires the information from a file operating information storage device 24 when it is a file operating information display command, and displays it on an output device 11. A program controller 21 sets a break point on a function with respect to a file operation in advance, and stored a file operating content in the file operating information storage device 24 when the debug target program 13 stops execution by the file operation, and also, inquires whether or not the execution should be stopped of a stoppage discrimination device 22. The stoppage discrimination device 22 decides the stoppage by comparing the stoppage condition in the stoppage condition storage device 23 with the information in the file operating information storage device 24.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はファイル操作情報を記憶
するデバッグ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debug device for storing file operation information.

【0002】[0002]

【従来の技術】従来この種のデバッグ装置は、外部から
与えらえたコマンドによりデバッグ対象プログラムの実
行を制御し、デバッグ対象プログラムやプログラム実行
結果を記憶したメモリの内容を調べることによりデバッ
グ対象プログラム中の誤りを発見するために用いられて
いる。
2. Description of the Related Art Conventionally, a debug device of this type controls the execution of a debug target program by a command given from the outside, and checks the contents of the debug target program and the memory storing the program execution result, thereby It is used to discover the error.

【0003】従来のデバッグ装置は、指定されたソース
プログラムの行番号に対応するアドレスや関数の先頭ア
ドレスや関数の先頭アドレスにユーザにより設定可能な
プログラムの停止機能であるブレークポイントを設定す
る機能、該ブレークポイントの設定部分をデバッグ対象
プログラムが実行した場合に実行中断する機能や、該ブ
レークポイントの設定部分をデバッグ対象プログラムが
実行した場合プログラムやプログラム実行状態の内容を
調べ指定された条件を満足した場合のみプログラム実行
を停止する機能,および中断されたプログラム実行を再
開する機能を有する。また、デバッグ対象プログラム中
の変数の値を参照したり設定したりする機能も有する。
これら機能は、1993年6月日本電気(株)発行の刊
行物「EWS−UX ソフトウェア コマンドリファレ
ンス(a−1),EMY21−1,「dbx(1)」を
参照できる。
A conventional debug device sets a breakpoint, which is a program stop function that can be set by a user, at an address corresponding to a line number of a designated source program, a function start address, or a function start address, A function that suspends execution when the debug target program executes the breakpoint setting part, and when the debug target program executes the breakpoint setting part Examine the contents of the program and program execution state and satisfy the specified conditions It has the function to stop the program execution only when it does, and the function to restart the interrupted program execution. It also has the function of referring to and setting the values of variables in the program to be debugged.
For these functions, the publications "EWS-UX Software Command Reference (a-1), EMY21-1," dbx (1) "issued by NEC Corporation in June 1993 can be referred to.

【0004】また、プログラムがファイルに対して行う
操作として、オープン,クローズ,書込み,読出しおよ
びファイル内の位置の移動等があげられる。これらの操
作の中でオープン以外の操作は、オープン時に与えられ
た識別子を用いてファイルを識別する。例えば、UNI
Xオペレーティングシステムではファイル識別子,MS
−DOSではハンドルという識別子が使用されている。
The operations performed on the file by the program include opening, closing, writing, reading, and moving the position in the file. Among these operations, operations other than open identify the file using the identifier given at the time of opening. For example, UNI
X operating system, file identifier, MS
-In DOS, an identifier called a handle is used.

【0005】[0005]

【発明が解決しようとする課題】従来のデバッグ装置で
は、実行停止の条件としてソースプログラム中の変数名
等を用いた条件式を利用することができるが、システム
コール後特定の番号のみが使われデバッグ対象プログラ
ム中で使われるファイル識別子とファイル名との対応が
取れないために、ファイル名を直接使って実行停止の条
件を記述することはできない。
In the conventional debug device, a conditional expression using a variable name or the like in the source program can be used as a condition for execution stop, but only a specific number is used after the system call. Since the file identifier used in the program to be debugged and the file name cannot be matched, it is not possible to directly use the file name to describe the execution stop condition.

【0006】また、ファイルからの読出しおよびファイ
ルへの書込み操作は、ファイル内の位置を順次移動しな
がら処理を行うため、ある読出しおよび書込み操作がフ
ァイル内のどの位置範囲を操作対象としているか認識す
ることはできず、ファイル内の位置範囲を使用して実行
停止の条件を記述することはできない。
Further, since the reading operation from the file and the writing operation to the file are performed while sequentially moving the positions in the file, it is recognized which position range in the file a certain reading and writing operation is to be operated on. Cannot be used to describe the condition for execution stop using the position range in the file.

【0007】また、ファイルから読み出したもしくはフ
ァイルに書き込んだデータをチェックしないため、ファ
イルから読出したもしくはファイルに書込んだデータの
値を使用して実行停止の条件を記述することはできな
い。
Further, since the data read from the file or written in the file is not checked, it is not possible to describe the execution stop condition using the value of the data read from the file or written in the file.

【0008】また、デバッグ対象プログラムがアクセス
したファイルに関する情報を記憶しないため、デバッグ
対象プログラムがアクセスしたファイルに関する情報を
表示することはできない。
Further, since the information regarding the file accessed by the debug target program is not stored, the information regarding the file accessed by the debug target program cannot be displayed.

【0009】[0009]

【課題を解決するための手段】本発明のデバッグ装置
は、デバッグ対象プログラムが操作したファイルに関す
る情報および該ファイルの操作内容に関する情報を記憶
するファイル操作情報記憶手段と、デバッグ対象プログ
ラムがファイルに対する操作を行った場合に停止すべき
条件を記憶する停止条件記憶手段と、入力手段から与え
られたコマンドを解析して対応する命令を発行し必要に
応じて処理結果を出力手段に表示するコマンド処理手段
と、前記デバッグ対象プログラムの停止状態に加え前記
ファイル操作情報記憶手段に記憶された情報と前記停止
条件記憶手段に記憶された条件とを比較しプログラムの
実行を停止するか否かを判定する停止判定手段と、前記
コマンド処理手段から発行された命令を実行するととも
に前記デバッグ対象プログラムがファイルに対する操作
を行った場合そのファイル操作に関する情報を前記ファ
イル操作情報記憶手段に記憶し、前記停止判定手段に前
記デバッグ対象プログラムの実行を停止するか否かを問
合わせ、停止させる場合は前記コマンド処理手段に停止
のメッセージを発行し、停止させない場合はデバッグ対
象プログラムの実行を再開させるプログラム制御手段と
を含む。
A debugging device according to the present invention includes a file operation information storage unit for storing information on a file operated by a debug target program and information on operation contents of the file, and a debug target program operating on the file. Stop condition storing means for storing a condition to be stopped when performing the above, and command processing means for analyzing a command given from the input means, issuing a corresponding instruction, and displaying a processing result on the output means as necessary. In addition to the stopped state of the debug target program, the information stored in the file operation information storage means is compared with the condition stored in the stop condition storage means to determine whether to stop the execution of the program. The debug means for executing the instruction issued from the judging means and the command processing means When the program operates a file, the information about the file operation is stored in the file operation information storage means, the stop determination means is queried as to whether or not the execution of the debug target program is stopped, and when the program is stopped, Program control means for issuing a stop message to the command processing means and for restarting the execution of the debug target program if not stopped.

【0010】[0010]

【実施例】次に本発明の一実施例について図面を参照し
て詳細に説明する。
An embodiment of the present invention will now be described in detail with reference to the drawings.

【0011】図1を参照すると、本発明の一実施例は、
コマンド入力するためのキーボード等の入力装置10
と,発行されたコマンドの返答やファイルに関する情報
やデバッグ対象プログラムの停止メッセージを表示する
ディスプレイ装置等の出力装置11と,入力装置10か
らのコマンドにより動作するデバッグ装置12と,ファ
イル操作を行うデバッグ対象プログラム13,およびこ
のデバッグ対象プログラムが操作するファイル14−1
〜14−nを備えている。
Referring to FIG. 1, one embodiment of the present invention is
Input device 10 such as a keyboard for inputting commands
An output device 11 such as a display device for displaying a response to the issued command, information about the file, and a stop message of the program to be debugged, a debug device 12 operated by a command from the input device 10, and a debug for operating a file. Target program 13 and file 14-1 operated by this debug target program
.About.14-n.

【0012】デバッグ装置12は、入力されたコマンド
を解析し停止条件設定コマンドであれば停止条件記憶装
置23,ファイル操作情報表示コマンドであればファイ
ル操作情報記憶装置24,およびそれ以外のコマンドで
あればプログラム制御装置21に対応する命令を発行し
処理し必要に応じて処理結果を出力装置11に表示する
コマンド処理装置20,デバッグ対象プログラム13が
ファイル操作を行なった際に停止すべき条件すなわちフ
ァイル名,リード,ライト,クローズ,オープンといっ
た操作およびファイル内の位置範囲,ファイルに書込む
データの値やファイルから読出すデータの値を図3で示
すようなテーブル内に保持する停止条件記憶装置23,
デバッグ対象プログラム13がファイル14−1〜14
−nに関する例えばファイル名およびファイル内位置お
よびファイルに書込むデータの値やファイルから読出す
データの値という情報およびその操作内容に関する情報
を図4で示すようなテーブルに記憶するファイル操作情
報記憶装置24,停止条件記憶装置23に記憶されたフ
ァイル操作に関する停止条件とプログラム制御装置から
与えられるデバッグ対象プログラム13の停止状態のみ
ならずファイル操作情報記憶装置24に記憶された現在
のファイル操作に関する情報とを比較しデバッグ対象プ
ログラムを停止すべきか否かを判定する停止判定装置2
2,およびデバッグ対象プログラムの実行制御およびメ
モリ内容の参照および設定を行うプログラム制御装置2
1を備える。
The debug device 12 analyzes the input command, and if it is a stop condition setting command, it may be the stop condition storage device 23, if it is a file operation information display command, it may be the file operation information storage device 24, or any other command. For example, the command processor 20 for issuing and processing the command corresponding to the program controller 21 and displaying the processing result on the output device 11 as necessary, the condition to be stopped when the debug target program 13 performs a file operation, that is, the file A stop condition storage device 23 that holds operations such as name, read, write, close, open, position range in the file, data value to be written to the file, and data value to be read from the file in a table as shown in FIG. ,
The debug target program 13 is a file 14-1 to 14-14.
A file operation information storage device for storing, for example, information such as a file name, a position in the file, a value of data to be written in the file, a value of data read from the file, and information about the operation content thereof regarding -n in a table as shown in FIG. 24, the stop condition relating to the file operation stored in the stop condition storage device 23 and the information regarding the current file operation stored in the file operation information storage device 24 as well as the stop state of the debug target program 13 given from the program control device; Stop determination device 2 for comparing whether or not to stop the program to be debugged
2, and a program controller 2 for controlling execution of a program to be debugged and for referring to and setting memory contents
1 is provided.

【0013】次に本発明の一実施例の動作について図面
を参照して詳細に説明する。
Next, the operation of the embodiment of the present invention will be described in detail with reference to the drawings.

【0014】図1および図2を参照すると、デバッグ対
象プログラム13のデバッグを開始する場合には、プロ
グラム制御装置21が、デバッグ対象プログラム中のフ
ァイル操作に関する関数もしくはシステムコールに対し
てブレークポイントをあらかじめ設定する(ステップA
1)。
Referring to FIGS. 1 and 2, when starting debugging of the debug target program 13, the program control device 21 sets a breakpoint in advance for a function or system call relating to file operation in the debug target program. Set (Step A
1).

【0015】コマンド処理装置20は入力装置10から
のコマンド入力、もしくはプログラム制御装置21から
のデバッグ対象プログラム13が停止したことを知らせ
るメッセージを待つ(ステップA2)。
The command processing device 20 waits for a command input from the input device 10 or a message from the program control device 21 notifying that the debug target program 13 has stopped (step A2).

【0016】コマンド処理装置20は、入力装置10か
らコマンドが入力された場合は入力されたコマンドを解
析し、停止条件設定コマンドであれば停止条件記憶装置
23、ファイル操作情報表示コマンドであればファイル
操作情報記憶装置24、それ以外のコマンドであればプ
ログラム制御装置21に対応する命令を発行する。発行
したコマンドに対する返答がある場合は、その返答を出
力装置11に表示する(ステップA3〜A5)。
When a command is input from the input device 10, the command processing device 20 analyzes the input command, and if it is a stop condition setting command, it is a stop condition storage device 23, and if it is a file operation information display command, it is a file. If it is a command other than the operation information storage device 24, a command corresponding to the program control device 21 is issued. If there is a response to the issued command, the response is displayed on the output device 11 (steps A3 to A5).

【0017】ステップA5でコマンドが停止条件の設定
コマンドであった場合、コマンド処理装置20は停止条
件記憶装置23に停止条件を格納する(ステップA
6)。
If the command is a stop condition setting command in step A5, the command processing device 20 stores the stop condition in the stop condition storage device 23 (step A).
6).

【0018】停止条件記憶装置23は、デバッグ対象プ
ログラム13がファイル操作を行なって際に停止する条
件を、図3で示すようなテーブル内に保持する。ファイ
ル名の欄にはデバッグ対象プログラム13がファイル操
作を行なう対象のファイル名、操作内容の欄にはそのフ
ァイル操作の操作内容、および条件の欄には更に詳しい
停止条件が格納される。特にファイル操作に関する停止
条件として、ファイル操作を行なうファイル内の位置、
ファイル操作を行なうファイル内の位置範囲、ファイル
内容の書込み/読出しを行なったその内容、およびこれ
らの条件の組み合わせ等が挙げられる。
The stop condition storage device 23 holds the condition for stopping when the debug target program 13 performs a file operation in a table as shown in FIG. The file name column stores the file name of the file operation target of the debug target program 13, the operation content column stores the operation content of the file operation, and the condition column stores more detailed stop conditions. Especially, as a stop condition for file operation, the position in the file where the file operation is performed,
The position range in the file where the file is operated, the contents of the file contents that have been written / read, the combination of these conditions, and the like.

【0019】ファイル操作情報記憶装置24は、図4で
示すようなテーブルを保持する。ファイル名の欄にはデ
バッグ対象プログラムがファイル操作を行なったファイ
ルの名前、ファイル識別子の欄にはファイルのオープン
時に与えられたファイル識別子、およびポジションの欄
にはデバッグ対象プログラム13がファイル操作を行な
っているファイル内の位置を格納する。
The file operation information storage device 24 holds a table as shown in FIG. The file name column is the name of the file on which the debug target program has performed file operations, the file identifier column is the file identifier given when the file was opened, and the position column is the debug target program 13 has performed file operations. Stores the position in the file

【0020】ステップA5ではコマンドがファイル状態
表示コマンドであった場合、コマンド処理装置20はフ
ァイル操作情報記憶装置24からデバッグ対象プログラ
ム13の操作ファイル14−1〜14−n関連情報を取
りだし、出力装置11上に表示する(ステップA8)。
If the command is the file status display command in step A5, the command processing device 20 extracts the operation file 14-1 to 14-n related information of the debug target program 13 from the file operation information storage device 24, and the output device. 11 is displayed (step A8).

【0021】ステップA5でコマンドがその他のコマン
ドであった場合、コマンド処理装置20はプログラム制
御装置21と情報をやり取りしながらコマンドの処理を
行う。なお、コマンド処理装置20およびプログラム制
御装置21がその他のコマンドを処理する方法に関して
は、従来のデバッガの方法を使用することができる。こ
こでは、本発明に直接関与しないため詳細な説明は省略
する。
If the command is another command in step A5, the command processing device 20 processes the command while exchanging information with the program control device 21. As a method for the command processing device 20 and the program control device 21 to process other commands, a conventional debugger method can be used. Here, detailed description is omitted because it is not directly related to the present invention.

【0022】デバッグ対象プログラム13が実行を停止
した場合、プログラム制御装置21はデバッグ対象プロ
グラム13の停止状態を取込み、その停止状態からプロ
グラム13がステップA1で設定したブレークポイント
で停止したのかどうかを調べる(ステップA3およびA
9)。ステップA1で設定したブレークポイントで停止
した場合は、現在のファイル操作に関する情報をファイ
ル操作情報記憶装置24に格納し(ステップA10)、
その後停止判定装置22にプログラムの実行を停止する
かどうかを問い合わせる(ステップA11)。停止判定
装置22は停止条件記憶装置23に記憶されたファイル
操作に関する停止条件とプログラム制御装置21から与
えられたプログラム13の停止状態のみならずファイル
操作情報記憶装置24に記憶された現在のファイル操作
に関する情報とを比較し、デバッグ対象プログラム13
を停止すべきかどうかを判定する。
When the program to be debugged 13 has stopped execution, the program control unit 21 takes in the stopped state of the program to be debugged 13 and checks from the stopped state whether the program 13 has stopped at the breakpoint set in step A1. (Steps A3 and A
9). When the program is stopped at the breakpoint set in step A1, the information about the current file operation is stored in the file operation information storage device 24 (step A10),
After that, the stop determination device 22 is inquired whether to stop the execution of the program (step A11). The stop determination device 22 determines not only the stop condition relating to the file operation stored in the stop condition storage device 23 and the stop state of the program 13 given from the program control device 21 but also the current file operation stored in the file operation information storage device 24. Compare the information on the debug target program 13
Determine whether to stop.

【0023】停止判定装置22が停止の判定を行った場
合、プログラム制御装置21はコマンド処理装置20に
停止したことを通知し、コマンド処理装置20は出力装
置11にデバッグ対象プログラムが停止したことを表示
しステップA2に戻る(ステップA13)。
When the stop determination device 22 determines the stop, the program control device 21 notifies the command processing device 20 of the stop, and the command processing device 20 notifies the output device 11 that the debug target program has stopped. Display and return to step A2 (step A13).

【0024】停止判定装置22が実行継続の判定を行っ
た場合、プログラム制御装置21はデバッグ対象プログ
ラム13の実行を再開させステップA2に戻る(ステッ
プA12)。
When the stop determination device 22 determines to continue the execution, the program control device 21 restarts the execution of the debug target program 13 and returns to step A2 (step A12).

【0025】次に、UNIXオペレーティングシステム
上での具体例を用いて説明する。
Next, a specific example on the UNIX operating system will be described.

【0026】UNIXオペレーティングシステムには、
ファイルを操作するシステムコールとして、open,
close,read,write,およびlseek
等が存在する。プログラム制御装置21は、デバッグ開
始時にこれらのシステムコールに対してブレークポイン
トを設定する。
UNIX operating systems include:
As a system call to operate a file, open,
close, read, write, and lseek
And so on. The program controller 21 sets breakpoints for these system calls at the start of debugging.

【0027】入力装置10より「“file−A”とい
う名前のファイルからデータを読み出した場合にデバッ
グ対象プログラムを停止させる。」という意味のコマン
ドが入力された場合、コマンド処理装置20は、停止条
件記憶装置20内のテーブルに、ファイル名の欄が“f
ile−A”操作内容の欄がreadのフィールドを追
加する。このように、入力装置10より入力されたコマ
ンドにより、停止条件記憶装置内に図5で示されるよう
なテーブルができていたとする。
When a command of "Stop the program to be debugged when data is read from the file named" file-A "" is input from the input device 10, the command processing device 20 causes the command processing device 20 to stop. In the table in the storage device 20, the file name column is "f.
ile-A "operation content column adds a read field. It is assumed that the command input from the input device 10 has created a table as shown in FIG.

【0028】デバッグ対象プログラム13が“file
−A”をオープンした場合、openシステムコールに
設定したブレークポイントで停止される。プログラム制
御装置21はopenシステムコールに渡されたファイ
ル名、ファイル属性およびopenシステムコールから
返されるファイル識別子をファイル操作情報記憶装置2
4に格納する。ここで、openシステムコールから返
されるファイル識別子は、整数3であったとする(以
後、ファイル識別子−3と記述する)。その後、停止判
定装置22にプログラムを停止させるかどうかが問い合
わされる。
The debug target program 13 is "file".
When "-A" is opened, the program is stopped at the breakpoint set in the open system call. The program control unit 21 operates the file name and the file attribute passed to the open system call and the file identifier returned from the open system call. Information storage device 2
Store in 4. Here, it is assumed that the file identifier returned from the open system call is the integer 3 (hereinafter, referred to as file identifier-3). After that, the stop determination device 22 is inquired whether or not to stop the program.

【0029】停止判定装置22は、現在の停止状態が
“file−A”openであり停止条件記憶装置23
内のテーブルにその条件が存在しないため実行の継続を
指示し、プログラム制御装置21はデバッグ対象プログ
ラム13の実行を再開させる。
The stop determination device 22 determines that the current stop state is "file-A" open and the stop condition storage device 23.
Since that condition does not exist in the table in the table, the program control device 21 instructs the program control device 21 to resume the execution of the debug target program 13.

【0030】デバッグ対象プログラム13が“file
−B”をオープンした場合、openシステムコールに
設定したブレークポイントで停止される。プログラム制
御装置21はopenシステムコールに渡されたファイ
ル名、ファイル属性およびopenシステムコールから
返されるファイル識別子をファイル操作情報記憶装置2
4に格納する。ここで、openシステムコールから返
されるファイル識別子は、整数4であったとする(以
後、ファイル識別子−4と記述する)。その後、停止判
定装置22にプログラムを停止させるかどうかが問い合
わされる。
The debug target program 13 is "file".
When "-B" is opened, the program is stopped at the breakpoint set in the open system call. The program controller 21 operates the file name and file attribute passed to the open system call and the file identifier returned from the open system call. Information storage device 2
Store in 4. Here, it is assumed that the file identifier returned from the open system call is the integer 4 (hereinafter, referred to as file identifier-4). After that, the stop determination device 22 is inquired whether or not to stop the program.

【0031】停止判定装置22は、現在の停止状態が
“file−B”openであり停止条件記憶装置23
内のテーブルにその条件が存在するため実行の停止を指
示し、プログラム制御装置21はコマンド処理装置20
に停止メッセージを発行する。コマンド処理装置21は
そのメッセージを受け、出力装置11上にプログラムの
停止メッセージを表示する。
The stop determination device 22 has a current stop state of "file-B" open and the stop condition storage device 23.
Since the condition exists in the table in the table, the program controller 21 instructs the command processor 20 to stop the execution.
Issue a stop message to. The command processing device 21 receives the message and displays a program stop message on the output device 11.

【0032】デバッグ対象プログラム13が、ファイル
識別子−3に対して読出しを行った場合、readシス
テムコールに設定したブレークポイントで停止する。
When the debug target program 13 reads the file identifier-3, it stops at the breakpoint set in the read system call.

【0033】プログラム制御装置21はreadシステ
ムコールに渡されたファイル識別子、readシステム
コールが読出したデータやデータのサイズおよびファイ
ル内での位置の移動量についての情報をファイル操作情
報記憶装置24に格納する。
The program control device 21 stores in the file operation information storage device 24 the file identifier passed to the read system call, the data read by the read system call, the size of the data, and the amount of movement of the position within the file. To do.

【0034】読込み前のボジションが28で、read
システムコールにより100バイトのデータが読出され
たとすると、ファイル識別子−3のポジションの欄には
128が書込まれる。その後、プログラム制御装置21
は停止判定装置22にプログラムを停止させるかどうか
を問い合わせる。
The position before reading is 28, and read
If 100 bytes of data are read by the system call, 128 is written in the position column of file identifier-3. Then, the program control device 21
Asks the stop determination device 22 whether to stop the program.

【0035】停止判定装置22は、ファイル識別子−3
に対応するファイル名“file−A”を、ファイル操
作情報記憶装置24から獲得し、現在の停止状態が“f
ile−A”readであることを認識する。停止判定
装置22は、停止条件記憶装置23内に“file−
A”readの条件が存在するための実行の停止を指示
し、プログラム制御装置21は、コマンド処理装置20
に対し停止メッセージを発行する。コマンド処理装置2
1はその信号を受け、出力装置11上にプログラムの停
止メッセージを表示する。
The stop determination device 22 uses the file identifier -3.
The file name "file-A" corresponding to the file is acquired from the file operation information storage device 24, and the current stop state is "f.
The stop determination device 22 recognizes “file-A” read.
The program control device 21 instructs the command processing device 20 to stop the execution because the condition of A "read exists.
Issue a stop message to. Command processing device 2
1 receives the signal and displays a program stop message on the output device 11.

【0036】デバッグ対象プログラム13が、ファイル
識別子−3に対して書込みを行った場合、writeシ
ステムコールに設定したブレークポイントで停止する。
When the debug target program 13 writes to the file identifier-3, it stops at the breakpoint set in the write system call.

【0037】プログラム制御装置21はwriteシス
テムコールに渡されたファイル識別子、writeシス
テムコールが書込んだデータやデータのサイズおよびフ
ァイル内での位置の移動量についての情報をファイル操
作情報記憶装置24に格納する。
The program control device 21 stores in the file operation information storage device 24 the file identifier passed to the write system call, the data written by the write system call, the size of the data, and the amount of movement of the position within the file. Store.

【0038】書込み前のポジションが128で、wri
teシステムコールにより10バイトのデータが読出さ
れたとすると、ファイル識別子−3のポジションの欄に
は138が書込まれる。その後、プログラム制御装置2
1は停止判定装置22にプログラムを停止させるかどう
かを問い合わせる。
The position before writing is 128, and wri
If 10 bytes of data are read by the te system call, 138 is written in the position column of file identifier-3. After that, the program control device 2
1 inquires of the stop determination device 22 whether to stop the program.

【0039】停止判定装置22は、ファイル識別子−3
に対応するファイル名“file−A”を、ファイル操
作情報記憶装置24から獲得し、現在の停止状態が“f
ile−A”writeであることを認識する。また、
書込みの範囲が128−138であることも認識する。
停止判定装置22、停止条件記憶装置23内に“fil
e−A”write range 100−150の条
件が成立するため実行の停止を指示し、プログラム制御
装置21は、コマンド処理装置20に対し停止メッセー
ジを発行する。コマンド処理装置21はその信号を受
け、出力装置11上にプログラムの停止メッセージを表
示する。
The stop determination device 22 uses the file identifier -3.
The file name "file-A" corresponding to the file is acquired from the file operation information storage device 24, and the current stop state is "f.
Recognize that it is an ile-A "write.
It also recognizes that the write range is 128-138.
“Fil” is stored in the stop determination device 22 and the stop condition storage device 23.
Since the condition of e-A "write range 100-150 is satisfied, the instruction to stop the execution is issued, and the program control device 21 issues a stop message to the command processing device 20. The command processing device 21 receives the signal, A program stop message is displayed on the output device 11.

【0040】図6には、デバッグ対象プログラム13の
デバッグ中の、ファイル操作情報記憶装置内のテーブル
の内容例が示される。
FIG. 6 shows an example of the contents of the table in the file operation information storage device during debugging of the debug target program 13.

【0041】[0041]

【発明の効果】本発明の特徴の1つは、デバッグ対象プ
ログラム13が操作したファイルに関する情報をファイ
ル操作情報記憶装置24に格納しデバッグ対象プログラ
ムがファイルを操作する毎に、停止条件記憶装置23内
のファイル名と操作中のファイル名とを比較し、プログ
ラムの実行停止の判定を行うことにある。この特徴によ
り本発明は、ファイルを用いて実行停止の条件を記述す
ることができるという効果を有する。
One of the features of the present invention is that information about files operated by the debug target program 13 is stored in the file operation information storage device 24, and the stop condition storage device 23 is operated each time the debug target program operates a file. The purpose is to compare the file name in the file with the file name being operated to determine whether to stop the execution of the program. Due to this feature, the present invention has an effect that a condition for stopping execution can be described using a file.

【0042】本発明の特徴の他の1つは、プログラムが
操作したファイルに関する情報を格納するファイル操作
情報記憶装置24を設けたことにある。この特徴により
本発明は、プログラムが操作したファイルに関する情報
を簡単に表示することができるという効果を有する。
Another feature of the present invention is that a file operation information storage device 24 for storing information on files operated by programs is provided. Due to this feature, the present invention has an effect that the information regarding the file operated by the program can be easily displayed.

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

【図1】本発明の一実施例の構成を示す図FIG. 1 is a diagram showing a configuration of an embodiment of the present invention.

【図2】本発明の一実施例の動作を説明するための図FIG. 2 is a diagram for explaining the operation of one embodiment of the present invention.

【図3】図1における停止条件記憶装置23内に保持さ
れるテーブルのフォーマットの一例を示す図
3 is a diagram showing an example of a format of a table held in a stop condition storage device 23 in FIG.

【図4】図1におけるファイル操作情報記憶装置24内
に保持されるテーブルのフォーマットの一例を示す図
4 is a diagram showing an example of a format of a table held in the file operation information storage device 24 in FIG.

【図5】図1における停止条件記憶装置23内に保持さ
れるテーブルの内容の一例を示す図
5 is a diagram showing an example of contents of a table held in a stop condition storage device 23 in FIG.

【図6】図1におけるファイル操作情報記憶装置24内
に保持されるテーブルの内容の一例を示す図
6 is a diagram showing an example of the contents of a table held in the file operation information storage device 24 in FIG.

【符号の説明】[Explanation of symbols]

10 入力装置 11 出力装置 12 デバッグ装置 13 デバッグ対象プログラム 14−1〜14−n ファイル 20 コマンド処理装置 21 プログラム制御装置 22 停止判定装置 23 停止条件記憶装置 24 ファイル操作情報記憶装置 10 Input Device 11 Output Device 12 Debug Device 13 Debug Target Program 14-1 to 14-n File 20 Command Processing Device 21 Program Control Device 22 Stop Judgment Device 23 Stop Condition Storage Device 24 File Operation Information Storage Device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 デバッグ対象プログラムが操作したファ
イルに関する情報および該ファイルの操作内容に関する
情報を記憶するファイル操作情報記憶手段と、 前記デバッグ対象プログラムがファイルに対する操作を
行った場合に停止すべき条件を記憶する停止条件記憶手
段と、 入力手段から与えられたコマンドを解析して対応する命
令を発行し必要に応じて処理結果を出力手段に表示する
コマンド処理手段と、 前記デバッグ対象プログラムの停止状態および前記ファ
イル操作情報記憶手段に記憶された情報と前記停止条件
記憶手段に記憶された条件とを比較しプログラムの実行
を停止するか否かを判定する停止判定手段と、 前記コマンド処理手段から発行された命令を実行すると
ともに前記デバッグ対象プログラムがファイルに対する
操作を行った場合そのファイルに関する情報を前記ファ
イル操作情報記憶手段に記憶し、前記停止判定手段に前
記デバッグ対象プログラムの実行を停止するか否かを問
合わせ、停止させる場合は前記コマンド処理手段に停止
のメッセージを発行し、停止させない場合はデバッグ対
象プログラムの実行を再開させるプログラム制御手段と
を含むことを特徴とするデバッグ装置。
1. A file operation information storage unit that stores information about a file operated by a debug target program and information about operation contents of the file, and a condition to be stopped when the debug target program operates on the file. Stop condition storing means for storing, command processing means for analyzing a command given from the input means, issuing a corresponding instruction, and displaying a processing result on the output means if necessary, a stop state of the debug target program, and A stop determination unit that compares the information stored in the file operation information storage unit with the condition stored in the stop condition storage unit to determine whether or not to stop the execution of the program, and is issued from the command processing unit. The instruction to be executed and the debug target program operates on the file. When it is performed, the information regarding the file is stored in the file operation information storage means, the stop determination means is inquired whether or not the execution of the debug target program is stopped, and when it is stopped, the command processing means is stopped. A debug device, comprising: a program control unit that issues a message and restarts execution of a program to be debugged if not stopped.
【請求項2】 前記ファイル操作情報記憶手段がファイ
ルに関する情報としてファイル名を記憶し、 前記停止条件記憶手段が停止すべき条件としてファイル
名を記憶し、 前記停止判定手段が操作するファイル名を用いて停止の
判定を行うことを特徴とする請求項1記載のデバッグ装
置。
2. The file operation information storage means stores a file name as information about a file, the stop condition storage means stores a file name as a condition to stop, and the stop determination means operates a file name. 2. The debug device according to claim 1, wherein the debug is determined by stop.
【請求項3】 前記ファイル操作情報記憶手段がファイ
ルに関する情報としてファイル名およびファイル内の位
置情報を記憶し、 前記停止条件記憶手段が停止すべき条件としてファイル
名およびファイル内の位置範囲を記憶し、 前記停止判定手段が操作するファイル名およびファイル
内の位置情報を用いて停止の判定を行うことを特徴とす
る請求項1記載のデバッグ装置。
3. The file operation information storage means stores a file name and position information in the file as information about the file, and the stop condition storage means stores a file name and a position range in the file as a condition to stop. The debug device according to claim 1, wherein the stop determination is performed using a file name operated by the stop determination means and position information in the file.
【請求項4】 前記ファイル操作情報記憶手段がファイ
ルに関する情報としてファイルに書込むデータの値およ
びファイルから読出すデータの値を記憶し、 前記停止条件記憶手段が停止すべき条件としてファイル
名,ファイルに書込むデータの値およびファイルから読
出すデータの値を記憶し前記停止判定手段がファイルに
書込むデータの値およびファイルから読出すデータの値
を用いて停止の判定を行うことを特徴とする請求項1記
載のデバッグ装置。
4. The file operation information storage means stores the value of data written in the file and the value of data read from the file as information about the file, and the stop condition storage means stores a file name and a file as a condition to stop. The stop determination means stores the value of the data to be written in and the value of the data to be read from the file, and the stop determination means makes a stop determination using the value of the data to be written to the file and the value of the data to be read from the file. The debug device according to claim 1.
JP5237076A 1993-09-24 1993-09-24 Debug device Expired - Fee Related JP2570593B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5237076A JP2570593B2 (en) 1993-09-24 1993-09-24 Debug device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5237076A JP2570593B2 (en) 1993-09-24 1993-09-24 Debug device

Publications (2)

Publication Number Publication Date
JPH0793184A true JPH0793184A (en) 1995-04-07
JP2570593B2 JP2570593B2 (en) 1997-01-08

Family

ID=17010066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5237076A Expired - Fee Related JP2570593B2 (en) 1993-09-24 1993-09-24 Debug device

Country Status (1)

Country Link
JP (1) JP2570593B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004075060A1 (en) * 2003-02-21 2004-09-02 Tabei, Hikaru Computer virus detection device
JP2013510361A (en) * 2009-11-03 2013-03-21 アンラブ,インコーポレイテッド Malignant site detection apparatus and method
JP2013239172A (en) * 2012-05-11 2013-11-28 Ahnlab Inc Non-executable file inspection apparatus and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04307636A (en) * 1991-04-04 1992-10-29 Nec Corp Program test system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04307636A (en) * 1991-04-04 1992-10-29 Nec Corp Program test system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004075060A1 (en) * 2003-02-21 2004-09-02 Tabei, Hikaru Computer virus detection device
JPWO2004075060A1 (en) * 2003-02-21 2006-06-01 田部井 光 Computer virus judgment method
JP2013510361A (en) * 2009-11-03 2013-03-21 アンラブ,インコーポレイテッド Malignant site detection apparatus and method
JP2013239172A (en) * 2012-05-11 2013-11-28 Ahnlab Inc Non-executable file inspection apparatus and method

Also Published As

Publication number Publication date
JP2570593B2 (en) 1997-01-08

Similar Documents

Publication Publication Date Title
JP2570593B2 (en) Debug device
JPH02226344A (en) Computer system
JPH09114513A (en) Numerical control system
JP3129889B2 (en) Numerical control unit
JPH10240571A (en) Address tracing circuit
JPH0262639A (en) Interruption system for language debugger
JP3130421B2 (en) Program analysis method and apparatus
JP2860054B2 (en) Program debugging device
JP2001067245A (en) Simulation method and simulation device
JPH04209007A (en) User program editing system for programmable controller
JPH0468446A (en) Debugging supporting device
JPH0228843A (en) Interactive debugger with memorandum function
JPS6282438A (en) Control system for interruption of debug in information processor
JP2001229048A (en) Debug device and debug method and recording medium with program for debug recorded
JPH01177644A (en) Debugging device
JPH05334118A (en) Preceding detection system for program step to be cause of program interruption
JPH0773049A (en) Program simulator device
JPS63170752A (en) Trace circuit
JP2001202272A (en) Debugging method, debugging device using this method and recording medium with debugging method recorded thereon
JPH0157375B2 (en)
JP2001265619A (en) Data tracing system
JPH01201741A (en) Trace circuit
JPH04191906A (en) User program execution control system for programmable controller
JPH03147130A (en) Operating system correcting system
JPH05233363A (en) Tracing device for emulator

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19960827

LAPS Cancellation because of no payment of annual fees