JPH01277942A - Source row display system for execution abnormal instruction - Google Patents

Source row display system for execution abnormal instruction

Info

Publication number
JPH01277942A
JPH01277942A JP63106559A JP10655988A JPH01277942A JP H01277942 A JPH01277942 A JP H01277942A JP 63106559 A JP63106559 A JP 63106559A JP 10655988 A JP10655988 A JP 10655988A JP H01277942 A JPH01277942 A JP H01277942A
Authority
JP
Japan
Prior art keywords
instruction
program
source
nop
storage means
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
JP63106559A
Other languages
Japanese (ja)
Inventor
Akihiko Takahashi
明彦 高橋
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 JP63106559A priority Critical patent/JPH01277942A/en
Publication of JPH01277942A publication Critical patent/JPH01277942A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To simplify a program and to reduce the number of dynamic steps by setting a source row number to a NOP instruction effective address part given from hardware at the time of issue of an instruction where there is a probability of abnormality due to wrong data during execution of an object program. CONSTITUTION:A source program is inputted to a main program storage means 3 through a source program storage means 5, and the end of input is discriminated in the means 3, and the processing is continued when the end is not discriminated, and the end is discriminated otherwise. An object program is generated for the program stored in the means 3 and is outputted to an object program storage means 4, and it is checked whether a NOP instruction should be generated or not. Thereafter, the source row number for the object program which is discriminated by the processing which discriminates an instruction where abnormality may occur is inputted to the means 3 from a source row number storage means 6, and the obtained source row number is set to the effective address part of the NOP instruction, and the object program including the NOP instruction is outputted to the means 4.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は実行異常命令に対するソース行表示方式に関し
、特に目的プログラムの実行時に発生した異常終了の後
処理で表示されるノース行に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a source line display method for an execution abnormal instruction, and particularly to a north line displayed in post-processing of an abnormal termination that occurs during execution of a target program.

(従来の技術) 従来、この踵の実行異常命令に対するソース行表示方式
においては、目的プログラムの実行時に不正データによ
り異常が発生する可能性があることは勿論である、 このようなハード9エア命令の出力される前に、ソース
行番号の定数イメージをレジスタに取出す命令と、その
レジスタの内容を固定テーブルに設定する命令とをプロ
グラムで出力している。目的プログラムの実行時、不正
データにより異常が発生したならば、異常終了の後処理
で固定テーブルからソース行番号を取出し、ソースプロ
グラムのノース行番号をメツセージによって表示する方
式が公知である。
(Prior Art) Conventionally, in the source line display method for this heel execution abnormal instruction, it goes without saying that an abnormality may occur due to invalid data during execution of the target program. Before outputting , the program outputs an instruction to fetch the constant image of the source line number into a register, and an instruction to set the contents of that register in a fixed table. If an abnormality occurs due to invalid data during execution of a target program, a method is known in which the source line number is retrieved from a fixed table in post-processing after the abnormal termination, and the north line number of the source program is displayed by a message.

(発明が解決しようとする課題) 上述した従来の実行異常命令に対するソース行表示方式
では、目的プログラムの実行時、不正データにより異常
が発生する可能性のある命令の出力される前に、ソース
行番号の定数イメージをレジスタに取出す命令と、その
レジスタの内容を固定テーブルに設定する命令とを出力
するため、目的プログラムが大きくなり、且つ、ダイナ
ミックステップ数も多くなるとともに、固定テーブルが
必要であるという欠点がある。
(Problem to be Solved by the Invention) In the conventional source line display method for execution abnormal instructions described above, when the target program is executed, the source line is displayed before outputting an instruction that may cause an abnormality due to invalid data. Because it outputs an instruction to fetch a constant image of a number into a register and an instruction to set the contents of that register in a fixed table, the target program becomes large, the number of dynamic steps increases, and a fixed table is required. There is a drawback.

本発明の目的は、目的プログラムの実行時、不正データ
で異常が発生する可能性のある命令の出力され穴径にハ
ードウェアの与えるNOP命令の実行アドレス部にソー
ス行番号を組込むことにより上記欠点を除去し、プログ
ラムを簡易化できるように構成した実行異常命令に対す
るソース行表示方式を提供することKある。
It is an object of the present invention to solve the above-mentioned problems by incorporating a source line number into the execution address part of a NOP instruction given by hardware to the output hole diameter of an instruction that may cause an abnormality due to invalid data when executing a target program. An object of the present invention is to provide a source line display method for an execution abnormal instruction, which is configured to simplify a program.

(牒題を解決するための手段) 本発明による実行異常命令に対するソース行表示方式は
、NOP命令出力手段と、プログラム障害後処理手段と
を具備して構成したものである。
(Means for solving the problem) The source line display method for an execution abnormal instruction according to the present invention is configured to include a NOP instruction output means and a program failure post-processing means.

NOP命令出力手段は、目的プログラムの実行時に不正
データによる異常が発生する可能性のあるハードウェア
命令と、次のハードウェア命令との間に、ハードウェア
で与えられているNOP命令を挿入し、NOP命令の実
効アドレス部にソース行番号を設定するためのものであ
る。
The NOP instruction output means inserts a NOP instruction given by hardware between a hardware instruction that may cause an abnormality due to invalid data during execution of the target program and the next hardware instruction, This is for setting the source line number in the effective address field of the NOP instruction.

プログラム障害後処理手段は、目的プログラムの実行時
に不正データにより異常が発生したとき、オペレーティ
ングシステムから制御が移され、異常の発生した命令の
アドレスを得て直後のNOP命令を検出し、NOP命令
の実効アドレス部からソース行番号を取出して異常の発
生した命令に対するソースプログラムの行番号をメツセ
ージによって表示する念めのものである。
When an error occurs due to invalid data during execution of the target program, the program error post-processing means transfers control from the operating system, obtains the address of the instruction where the error occurred, detects the immediately following NOP instruction, and This is for the purpose of extracting the source line number from the effective address field and displaying the line number of the source program corresponding to the instruction in which the error occurred by means of a message.

(実施例) 次に、本発明について図面を参照して説明する。(Example) Next, the present invention will be explained with reference to the drawings.

第1図は、本発明による実行異常命令に対するソース行
表示方式の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a source line display method for an abnormally executed instruction according to the present invention.

第1図において、1はNOP命令出力手段、2はプログ
ラム障害後処理手段、3は主プログラム格納手段、4は
目的プログラム格納手段、5はソースプログラム格納手
段、6はンース行番号格納手段、7は印字装置である。
In FIG. 1, 1 is a NOP command output means, 2 is a program failure post-processing means, 3 is a main program storage means, 4 is a target program storage means, 5 is a source program storage means, 6 is a first line number storage means, and 7 is a printing device.

実行異常命令に対するノース行表示方式だおいて、コン
パイラの主プログラム格納手段3ヘソースプログラム格
納手段5からソースプログラムが入力されると、目的プ
ログラムが目的プロゲラみ格納手段4へ出力される。そ
の後、主プログラムに対してデバッグオブンヨンの指定
があるとき、目的プログラムを実行するものと仮定する
In the north line display method for execution abnormal instructions, when a source program is input from the source program storage means 5 to the main program storage means 3 of the compiler, the target program is output to the target program storage means 4. After that, when debugging is specified for the main program, it is assumed that the target program is executed.

このとき、不正データにより異常が発生する可能性があ
る命令であれば、その出力後にンース行番号格納手段6
からノース行番号が取出される。
At this time, if the instruction has a possibility of causing an abnormality due to invalid data, the second line number storage means 6
The north row number is retrieved from.

そこで、次の命令が出力される前に、ノース番号がハー
ドウェアにより与えられているNOP命令の実効アドレ
ス部へNOP命令出力手段1を使用して設定される。
Therefore, before the next instruction is output, the NOP instruction output means 1 is used to set the NOP number to the effective address field of the NOP instruction given by the hardware.

ここで、NOP命令出力手段1はNOP命令を目的プロ
グラム格納手段4へ出力するためのものである。
Here, the NOP instruction output means 1 is for outputting the NOP instruction to the target program storage means 4.

一方、目的プログラムの実行時に不正データにより異常
が発生しなならば、オペレーテイングンステムからプロ
グラム障害後処理手段2に制御が移される。プログラム
障害後処理手段2では異常の発生した命令のアドレスを
得て、その直後のNOP命令を検索し、NOP命令を検
出する。そこで、印字装置7ではNOP命令の実効アド
レス部からノース行番号を取出し、異常発生命令に対す
るソースプログラムの行番号をメツセージによって表示
する。
On the other hand, if no abnormality occurs due to invalid data during execution of the target program, control is transferred from the operating system to the program failure post-processing means 2. The program failure post-processing means 2 obtains the address of the instruction in which the abnormality has occurred, searches for the NOP instruction immediately after it, and detects the NOP instruction. Therefore, the printing device 7 extracts the north line number from the effective address field of the NOP instruction and displays the line number of the source program corresponding to the abnormal instruction in the form of a message.

第2図は、主プログラムの処理を示すフローチャートで
ある。
FIG. 2 is a flowchart showing the processing of the main program.

7A2図におりて、ソースプログラムをソースプログラ
ム格納手段Sから主プログラム格納手段3へ入力した後
、ソースプログラムの入力の終了全判定する。終了でな
ければ処理ヲ続行するよう判定し、終了であれば終了で
あるものと判定する。
In FIG. 7A2, after inputting the source program from the source program storage means S to the main program storage means 3, it is determined whether the input of the source program is complete. If the process has not ended, it is determined to continue the process, and if it has ended, it is determined that the process has ended.

次に、ソースプログラム格納手段Sから主プログラム格
納手段3への入力により得られたソースプログラムに対
して目的プログラムを生成し、生成された目的プログラ
ムを目的プログラム格納手段4に出力する。そこで、N
OP命令を生成するか否かをチエツクする。
Next, a target program is generated for the source program obtained by inputting it from the source program storage unit S to the main program storage unit 3, and the generated target program is output to the target program storage unit 4. Therefore, N
Check whether to generate an OP instruction.

第3図は、目的プログラムの出力処理を示すフローチャ
ートである。
FIG. 3 is a flowchart showing the output processing of the target program.

第4図は、目的プログラムの出力呼出し処理を示すフロ
ーチャートである。
FIG. 4 is a flowchart showing the output calling process of the target program.

第4図において、まず主プログラムに対してデバッグオ
プションが指定されている場合には「あり」、指定され
ていない場合には「なし」と判定される。第8図に示す
目的プログラムの出力処理により出力された目的プログ
ラムの実行時、不正データによって異常の発生する可能
性がある命令であれば「可」、可能性のない命令であれ
ば「不可]であると判定する。
In FIG. 4, first, if a debug option is specified for the main program, it is determined that it is present, and if it is not specified, it is determined that it is not present. When executing the target program output by the output process of the target program shown in Figure 8, if the instruction has the possibility of causing an abnormality due to invalid data, select "Acceptable"; if the instruction has no possibility, select "Not possible". It is determined that

次に、異常発生可能命令判定処理により判定された目的
プログラムに対するソース行番号をソース行番号格納手
段8から主プログラム格納手段3へ入力する。そこで、
得られ九ソース行番号をNOP命令の実効アドレス部に
設定し、NOP命令を生成する。次に、NOP命令を含
む目的プログラムを目的プログラム格納手段4に出力す
る。
Next, the source line number for the target program determined by the abnormality occurrence instruction determination processing is input from the source line number storage means 8 to the main program storage means 3. Therefore,
The obtained nine source line numbers are set in the effective address field of the NOP instruction to generate the NOP instruction. Next, the target program including the NOP instruction is output to the target program storage means 4.

第5図は、目的プログラムを出力する処理を示すフロー
チャートである。
FIG. 5 is a flowchart showing the process of outputting the target program.

第5図において、目的プログラムの実行時に不正データ
により異常が発生したならば、オペレーティングシステ
ムから異常が発生した命令のアドレスを得て、その直後
のNOP命令を検出し、NOP命令の実効アドレス部か
らノース行番号を取出す。上記処理により得られた行番
号をメツセージによって表示するため、印字装置7に出
力する。
In Figure 5, if an error occurs due to invalid data during execution of the target program, the address of the instruction where the error occurred is obtained from the operating system, the NOP instruction immediately after it is detected, and the effective address part of the NOP instruction is detected. Get the north row number. The line numbers obtained through the above processing are output to the printing device 7 in order to be displayed as a message.

(発明の効果) 以上説明したように本発明は、目的プログラムの実行時
、不正データで異常が発生する可能性のある命令の出力
され死後に、ハードウェアの与えるNOP命令の実効ア
ドレス部にソース行番号を組込むことKより、目的プロ
グラムの規模が大きくなり、且つ、ダイナミックステッ
プ数も多くなる七いう欠点がある。
(Effects of the Invention) As explained above, the present invention provides a source program for the effective address section of the NOP instruction given by hardware after the instruction that may cause an error due to invalid data is output when the target program is executed. Incorporating line numbers has the following disadvantages: the scale of the target program becomes larger and the number of dynamic steps increases.

ま九、固定テーブルが必要であるという欠点がある。Nineteen, it has the disadvantage of requiring a fixed table.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明による実行異常命令に対するソース行
表示方式の一実施例を示すブロック図である。 第2図〜第5園は、それぞれ第1図に示すブロックによ
り実行される処理の流れを示すフローチャートである。 1・・・NOP命令出力手段 2・・・プログラム障害後処理手段 3・・・主プログラム格納手段 4・・・目的プログラム格納手段 5−・・ソースプログラム格納手段 6・・・ソース行番号格納手段 7・・・印字装置
FIG. 1 is a block diagram showing an embodiment of a source line display method for an abnormally executed instruction according to the present invention. 2 to 5 are flowcharts showing the flow of processing executed by the blocks shown in FIG. 1, respectively. 1...NOP command output means 2...Program failure post-processing means 3...Main program storage means 4...Object program storage means 5-...Source program storage means 6...Source line number storage means 7...Printing device

Claims (1)

【特許請求の範囲】[Claims] 目的プログラムの実行時に不正データによる異常が発生
する可能性のあるハードウェア命令と次のハードウェア
命令との間にハードウェアで与えられているNOP命令
を挿入し、前記NOP命令の実効アドレス部にソース行
番号を設定するためのNOP命令出力手段と、前記目的
プログラムの実行時に前記不正データにより異常が発生
したとき、オペレーティングシステムから制御が移され
、前記異常の発生した命令のアドレスを得て直後のNO
P命令を検出し、前記NOP命令の実効アドレス部から
ソース行番号を取出して前記異常の発生した命令に対す
るソースプログラムの行番号をメッセージによつて表示
するためのプログラム障害後処理手段とを具備して構成
したことを特徴とする実行異常命令に対するソース行表
示方式。
A NOP instruction given by hardware is inserted between a hardware instruction that may cause an abnormality due to invalid data when executing the target program and the next hardware instruction, and the effective address part of the NOP instruction is NOP command output means for setting a source line number; and when an error occurs due to the invalid data during execution of the target program, control is transferred from the operating system and immediately after obtaining the address of the instruction where the error occurred; NO
and a program failure post-processing means for detecting a P instruction, extracting a source line number from an effective address part of the NOP instruction, and displaying a message indicating the line number of the source program corresponding to the instruction in which the abnormality has occurred. A source line display method for an execution abnormal instruction, characterized in that the source line display method is configured as follows.
JP63106559A 1988-04-28 1988-04-28 Source row display system for execution abnormal instruction Pending JPH01277942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63106559A JPH01277942A (en) 1988-04-28 1988-04-28 Source row display system for execution abnormal instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63106559A JPH01277942A (en) 1988-04-28 1988-04-28 Source row display system for execution abnormal instruction

Publications (1)

Publication Number Publication Date
JPH01277942A true JPH01277942A (en) 1989-11-08

Family

ID=14436673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63106559A Pending JPH01277942A (en) 1988-04-28 1988-04-28 Source row display system for execution abnormal instruction

Country Status (1)

Country Link
JP (1) JPH01277942A (en)

Similar Documents

Publication Publication Date Title
JPH01277942A (en) Source row display system for execution abnormal instruction
EP0417916A2 (en) Procedure state descriptor system for digital data processors
JP2007304972A (en) Microprocessor system
JPS6118045A (en) Detecting system of program runaway
JPS629937B2 (en)
JPS621041A (en) Diagnosis circuit of information processor
KR100329189B1 (en) Method for outputting/changing internal register value of cpu in msc
JPS60263232A (en) Microdiagnostic system
JPH0764819A (en) Debugger
JP2001265619A (en) Data tracing system
JPH0512005A (en) Information processor
JPS6282439A (en) False trouble generating system
JPH11191072A (en) Debug break processing method and debug processor
JPH02115951A (en) Maintenance and debug system for high level language program
JPS62290935A (en) Monitor device for execution of instruction
JPH05100913A (en) Error factor searching system
JPH076103A (en) Fault processing system for input/output channel
JPH03105529A (en) Psw type error control circuit
JPH01125634A (en) Module incorporation test system
JPS6355646A (en) Controlling system for symbolic debugger
JPH0659931A (en) Debugging device
JPS63150732A (en) Program running supervisory equipment
JPH0561712A (en) Pseudo fault testing system
JPS6160146A (en) Check system of microprogram
JPH03242736A (en) Abnormality processing system