JPH0535526A - Target program debugging system - Google Patents

Target program debugging system

Info

Publication number
JPH0535526A
JPH0535526A JP3207154A JP20715491A JPH0535526A JP H0535526 A JPH0535526 A JP H0535526A JP 3207154 A JP3207154 A JP 3207154A JP 20715491 A JP20715491 A JP 20715491A JP H0535526 A JPH0535526 A JP H0535526A
Authority
JP
Japan
Prior art keywords
debug
program
instruction
bit
debugged
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.)
Pending
Application number
JP3207154A
Other languages
Japanese (ja)
Inventor
Haruo Maeda
晴男 前田
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 JP3207154A priority Critical patent/JPH0535526A/en
Publication of JPH0535526A publication Critical patent/JPH0535526A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To attain a target program debugging system of high efficiency by providing debug interruption generating bit to an executing instruction operand of a debugged program end turning on end off control the corresponding bit with the debug control processing CONSTITUTION:A host computer 1 includes an instruction execution control mechanism 20 and 8 debug interruption generating mechanism 30 together with a debugged program 10 stored in 8 main program, end a debug control processor 40. Each instruction of the program 10 consists of an instruction code (OP code) and an operand which partly holds a debug interruption generating bit. A means which can set the ON/OFF states of a debug bit sets the debug bit of the operand in the ON/OFF states to the corresponding instruction when the debug information is acquired. Then a means which informs a debug control program of the generation of a debug interruption. Thus the debug control is attained without reproducing the program 10.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ターゲットプログラム
をデバッグする際の制御方式に関し、被デバッグプログ
ラムをデバッグ用に作成することなく、ホストコンピュ
ータ上でデバッグを実行するターゲットプログラムデバ
ッグ方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control method for debugging a target program, and more particularly to a target program debug method for executing debugging on a host computer without creating a program to be debugged for debugging.

【0002】[0002]

【従来の技術】従来のホストコンピュータによるデバッ
グ方式では、被デバッグプログラムに対し実行プログラ
ム作成時にデバッグ指定を行うためデバッグ完了後の実
行プログラムを再作成していた。または、被デバッグプ
ログラムの目的アドレスに対し、該当命令を不定命令コ
ードに置き換えて故意に例外を発生させ、その後デバッ
グ制御プログラムにて本来の命令を肩代わり実行してい
る。
2. Description of the Related Art In a conventional debugging method using a host computer, an execution program after debugging is completed is recreated because a debug designation is made when creating an execution program for a program to be debugged. Alternatively, for the target address of the program to be debugged, the relevant instruction is replaced with an indefinite instruction code to intentionally generate an exception, and then the original instruction is executed on behalf of the debug control program.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のデバッ
グ方式では、デバッグ対象のターゲットプログラムに対
し、実行形式プログラム作成時(コンパイル時)にデバ
ッグ指定を必要とし、デバッグ完了後には再度実行プロ
グラムを作成しなおすといった手間を必要とする。ある
いは、実行命令を不定命令で置き換えデバッグ制御プロ
グラムで命令実行の肩代わりを行うため、デバッグ時の
効率が悪いといった課題があった。
In the above-mentioned conventional debugging method, it is necessary to specify debug for the target program to be debugged at the time of creating the execution format program (at the time of compiling), and create the execution program again after the completion of debugging. It requires time and effort such as reworking. Alternatively, the execution instruction is replaced with an indefinite instruction, and the instruction execution is performed by the debug control program, so that there is a problem that the efficiency at the time of debugging is low.

【0004】本発明の目的は上述の課題を解決する被デ
バッグプログラムを再作成することなく不定命令に書き
換えたことによる命令実行の肩代わりを必要としないタ
ーゲットプログラムデバッグ方式を提供することであ
る。
An object of the present invention is to provide a target program debugging method which solves the above-mentioned problems and which does not require the execution of instruction execution by rewriting an indefinite instruction without recreating a debugged program.

【0005】[0005]

【課題を解決するための手段】本発明によるデバッグ方
式は、ターゲットプログラムのデバッグ機能を有するホ
ストコンピュータにおいて、被デバッグプログラムをデ
バッグする際、プログラムを実行する各命令のオペラン
ドにデバッグのための割り込みを発生させるデバッグビ
ットを設ける機構を有し、デバッグ制御プログラムで
は、被デバッグプログラムの目的の命令または、目的の
アドレスにてデバッグ情報を取得する際、該当の命令に
対しオペランドのデバッグビットを必要に応じて、オン
/オフを設定できる手段と、上記オン/オフを設定でき
る手段にてデバッグビットをオンとした命令を実行する
際、当該命令実行後にデバッグ割り込み発生をデバッグ
制御プログラムに通知する手段を有することで、ターゲ
ットプログラムを作り直すことなく、また効率よくデバ
ッグを制御することを特徴としている。
According to the debugging method of the present invention, when a program to be debugged is debugged in a host computer having a debug function of a target program, an interrupt for debugging is added to an operand of each instruction for executing the program. The debug control program has a mechanism to provide a debug bit to generate, and when the debug control program acquires the debug information at the target instruction or target address of the program to be debugged, the debug bit of the operand for the corresponding instruction is necessary. And a means for setting ON / OFF and a means for notifying the debug control program of the occurrence of a debug interrupt after the execution of the instruction when the instruction with the debug bit turned on is executed by the means for setting the ON / OFF. The target program It is characterized in that without also controlling the debugging efficiently to fix.

【0006】[0006]

【作用】本発明のターゲットプログラムデバッグ方式に
おけるデバッグビットのオン/オフを設定できる手段
は、デバッグ情報を取得する際に該当の命令に対しオペ
ランドのデバッグビットをオン/オフ設定して、デバッ
グ割り込み発生をデバッグ制御プログラムに通知する手
段が命令実行終了を通知復元するので被デバッグプログ
ラムを再作成することなくデバッグ制御ができる。
The means for setting the debug bit on / off in the target program debugging method of the present invention is to set the debug bit of the operand to the instruction at the time of acquiring debug information to generate a debug interrupt. Is notified to the debug control program and the instruction execution end is notified and restored, so that debug control can be performed without recreating the program to be debugged.

【0007】[0007]

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

【0008】図1は本発明の一実施例を示すターゲット
プログラムデバッグ方式の全体の構成図である。
FIG. 1 is an overall configuration diagram of a target program debug system showing an embodiment of the present invention.

【0009】図2は本発明の被デバッグプログラム命令
形式例を示す図である。
FIG. 2 is a diagram showing an example of the debugged program instruction format of the present invention.

【0010】図3は、本発明のデバッグ情報設定処理の
処理の流れ図である。
FIG. 3 is a flow chart of the debug information setting process of the present invention.

【0011】図4は、本発明のデバッグ情報検索処理の
処理の流れ図である。
FIG. 4 is a flow chart of the debug information search process of the present invention.

【0012】図5は、本発明のデバッグ情報復元処理の
処理の流れ図である。
FIG. 5 is a flow chart of processing of the debug information restoration processing of the present invention.

【0013】図1において、ホストコンピュータ1は命
令実行制御機構20と、デバッグ割り込み発生機構30
を含み、メインメモリ上に被デバッグプログラム10と
デバッグ制御処理40から構成されている。また、被デ
バッグプログラム10の各命令は図2に示すように、命
令コード(OPコード)とオペランドから構成され、オ
ペランドの一部にデバッグ割り込み発生ビットを保持し
ている。
In FIG. 1, the host computer 1 includes an instruction execution control mechanism 20 and a debug interrupt generation mechanism 30.
And includes a program to be debugged 10 and a debug control process 40 on the main memory. As shown in FIG. 2, each instruction of the debugged program 10 is composed of an instruction code (OP code) and an operand, and a debug interrupt generation bit is held in a part of the operand.

【0014】以下、被デバッグプログラム10のデバッ
グ方式について図3、図4、図5に従って順に実施例の
動作を説明する。 (1)デバッグ情報設定について図3を参照して説明す
る。
The operation of the embodiment of the debugging method of the program to be debugged 10 will be described below in order with reference to FIGS. 3, 4 and 5. (1) Debug information setting will be described with reference to FIG.

【0015】デバッグ制御処理40のデバッグ情報設定
処理では、被デバッグプログラム10に必要なデバッグ
情報を収集するため、目的の命令(または、アドレス)
に対しデバッグのための割り込み表示を設定するため目
的のアドレス情報群を予め獲得する(ステップST5
0)。(例えば、デバッグ制御処理40のパラメータと
して)デバッグ情報設定処理では、獲得した目的アドレ
スに従って対応命令のオペランドのデバッグ割り込み発
生ビットをオンとする(ステップST51)。
In the debug information setting process of the debug control process 40, in order to collect the debug information necessary for the program to be debugged 10, the target instruction (or address) is acquired.
, The target address information group is acquired in advance to set the interrupt display for debugging (step ST5).
0). In the debug information setting process (for example, as a parameter of the debug control process 40), the debug interrupt generation bit of the operand of the corresponding instruction is turned on according to the acquired target address (step ST51).

【0016】これによって、命令実行時デバッグ情報収
集が可能となる。 (2)デバッグ情報検索処理について図4を参照する
と、デバッグ情報設定後、被デバッグプログラム10の
実行を開始する。命令実行制御機構20ではメインメモ
リに展開された命令を読みだし、当該命令を実行する
(ステップST60)。
This makes it possible to collect debug information during instruction execution. (2) Debug Information Retrieval Process Referring to FIG. 4, after the debug information is set, execution of the program to be debugged 10 is started. The instruction execution control mechanism 20 reads the instruction expanded in the main memory and executes the instruction (step ST60).

【0017】命令実行後、当該命令のオペランドにデバ
ッグ割り込み発生ビットが設定(オン)されている場合
(ステップST61)、デバッグ割り込み発生機構30
をとおしてデバッグ制御処理40のデバッグ情報検索処
理に制御が渡される(ステップST62)。デバッグ情
報検索処理では、割り込み発生時点のレジスタ情報、メ
モリ情報等をデバッグ制御処理40が保持する被デバッ
グプログラム10のデバッグパラメータに従って、検
索、表示、内容変更を実施する(ステップST63)。
After the instruction is executed, if the debug interrupt generation bit is set (turned on) in the operand of the instruction (step ST61), the debug interrupt generation mechanism 30
Control is passed to the debug information search process of the debug control process 40 (step ST62). In the debug information search process, search, display, and content change are performed according to the debug parameters of the program to be debugged 10 held by the debug control process 40 such as register information and memory information at the time of interruption (step ST63).

【0018】その後、被デバッグプログラムの割り込み
発生時点に復帰することで被デバッグプログラムの実行
を再開する。 (3)デバッグ情報復元処理について図5を参照する
と、被デバッグプログラム10の実行を終了する際(ス
テップST70)、デバッグ制御処理40が保持してい
る目的のアドレス情報群から、被デバッグプログラム1
0のデバッグ割り込み発生表示がオンとなっている命令
に接近し、当該命令のデバッグ割り込み発生ビットをオ
フにする(ステップST71)。
Thereafter, the execution of the program to be debugged is restarted by returning to the point of time when the interrupt to the program to be debugged occurs. (3) Debug Information Restoration Processing Referring to FIG. 5, when the execution of the debugged program 10 is terminated (step ST70), the debugged program 1 is selected from the target address information group held by the debug control processing 40.
The instruction of which the debug interrupt generation display of 0 is turned on is approached, and the debug interrupt generation bit of the instruction is turned off (step ST71).

【0019】これによりデバッグ情報設定処理にて設定
したデバッグ割り込み発生表示がオフ状態に復元され、
以降被デバッグプログラムの実行に際し、デバッグ割り
込みは発生しない。
As a result, the debug interrupt occurrence display set in the debug information setting process is restored to the off state,
After that, the debug interrupt does not occur when the debugged program is executed.

【0020】[0020]

【発明の効果】以上説明したように本発明は、実行命令
自体にデバッグ割り込み発生表示を設け、これをオン/
オフすることで被デバッグプログラムを再作成すること
なく、またデバッグ制御処理にて不定命令に書き換えた
ことによる命令実行の肩代わりを行うことが不要となる
ため、効率のよいデバッグが可能となる効果がある。
As described above, according to the present invention, a debug interrupt occurrence display is provided in the execution instruction itself, and this is turned on / off.
By turning it off, it is not necessary to recreate the program to be debugged, and it is not necessary to shoulder the instruction execution by rewriting it to an indefinite instruction in the debug control processing, so the effect that efficient debugging can be achieved is there.

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

【図1】本発明の一実施例を示すターゲットプログラム
デバッグ方式の全体構成図である。
FIG. 1 is an overall configuration diagram of a target program debug system showing an embodiment of the present invention.

【図2】本発明の被デバッグプログラムの命令形式例を
示す図である。
FIG. 2 is a diagram showing an instruction format example of a program to be debugged according to the present invention.

【図3】本発明のデバッグ情報設定処理の処理の流れ図
である。
FIG. 3 is a flow chart of processing of a debug information setting processing of the present invention.

【図4】本発明のデバッグ情報検索処理の処理の流れ図
である。
FIG. 4 is a flow chart of a debug information search process of the present invention.

【図5】本発明のデバッグ情報復元処理の処理の流れ図
である。
FIG. 5 is a flow chart of a debug information restoration process of the present invention.

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

1 ホストコンピュータ 10 被デバッグプログラム 20 命令実行制御機構 30 デバッグ割り込み発生機構 40 デバッグ制御処理。 1 host computer 10 debugged program 20 instruction execution control mechanism 30 debug interrupt generation mechanism 40 debug control processing.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ターゲットプログラムのデバッグ機能を
有するホストコンピュータにおいて、被デバッグプログ
ラムをデバッグする際、プログラムを実行する各命令の
オペランドにデバッグのための割り込みを発生させるデ
バッグビットを設ける機構を有し、 デバッグ制御プログラムでは、被デバッグプログラムの
目的の命令または、目的のアドレスにてデバッグ情報を
取得する際、該当の命令に対しオペランドのデバッグビ
ットを必要に応じて、オン/オフを設定できる手段と、 上記オン/オフを設定できる手段にてデバッグビットを
オンとした命令を実行する際、当該命令実行後にデバッ
グ割り込み発生をデバッグ制御プログラムに通知する手
段を有し、ターゲットプログラムのデバッグを制御する
ことを特徴としたターゲットプログラムデバッグ方式。
1. A host computer having a debug function for a target program, when debugging a program to be debugged, has a mechanism for providing a debug bit for generating an interrupt for debugging in an operand of each instruction for executing the program, In the debug control program, when acquiring debug information at the target instruction or target address of the program to be debugged, means for setting the debug bit of the operand for the relevant instruction to ON / OFF as necessary, When executing an instruction in which the debug bit is turned on by the means that can be set to ON / OFF, it has means for notifying the debug control program of the occurrence of a debug interrupt after execution of the instruction, and controlling the debugging of the target program. Characterized target program Debug system.
JP3207154A 1991-07-25 1991-07-25 Target program debugging system Pending JPH0535526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3207154A JPH0535526A (en) 1991-07-25 1991-07-25 Target program debugging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3207154A JPH0535526A (en) 1991-07-25 1991-07-25 Target program debugging system

Publications (1)

Publication Number Publication Date
JPH0535526A true JPH0535526A (en) 1993-02-12

Family

ID=16535121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3207154A Pending JPH0535526A (en) 1991-07-25 1991-07-25 Target program debugging system

Country Status (1)

Country Link
JP (1) JPH0535526A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8839206B2 (en) 2002-08-26 2014-09-16 International Business Machines Corporation Time-based breakpoints in debuggers

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8839206B2 (en) 2002-08-26 2014-09-16 International Business Machines Corporation Time-based breakpoints in debuggers

Similar Documents

Publication Publication Date Title
JPS6364144A (en) Inter-memory data transfer system
JPH0535526A (en) Target program debugging system
JP3381253B2 (en) Simulation equipment
JP2715988B2 (en) Program simulator device and program debugging method
JP2663895B2 (en) CPU simulator
JP2007249828A (en) Programmable controller system, debut method of programmable controller, programming supporting program, and debut control program of programmable controller
JP2697230B2 (en) Debug support device
JPH0262639A (en) Interruption system for language debugger
JP3111372B2 (en) Programmable controller
JP2001166966A (en) Method for managing execution environment of program to be tested in debugger
JPH06103107A (en) Program tracing method
JPH07319730A (en) Test debugging method
JPS61241843A (en) Information processor
JPH04133135A (en) Debug device of computer
JPH05127945A (en) Program execution situation analysis system
JPH09128228A (en) Computer device
JPH0816431A (en) Debugging process system for user program
JPH09101899A (en) Processing system for procedure
JPH113221A (en) Debugging system
JPS59180755A (en) Tracing system
JPH05204710A (en) Event tracer
Cowling et al. MICROSIM as a teaching aid
JPH1165886A (en) Program debugging system of computer
JPH05250208A (en) Program reexecution processing system
JPH04324525A (en) Program transplantation supporting device