JPS62179032A - Loop checking system for program - Google Patents

Loop checking system for program

Info

Publication number
JPS62179032A
JPS62179032A JP61019737A JP1973786A JPS62179032A JP S62179032 A JPS62179032 A JP S62179032A JP 61019737 A JP61019737 A JP 61019737A JP 1973786 A JP1973786 A JP 1973786A JP S62179032 A JPS62179032 A JP S62179032A
Authority
JP
Japan
Prior art keywords
loop
branch
success
tracing
abnormal
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
JP61019737A
Other languages
Japanese (ja)
Inventor
Toshio Inoue
登志夫 井上
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.)
Fuji Facom Corp
Original Assignee
Fuji Facom 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 Fuji Facom Corp filed Critical Fuji Facom Corp
Priority to JP61019737A priority Critical patent/JPS62179032A/en
Publication of JPS62179032A publication Critical patent/JPS62179032A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To detect the scope of the abnormal loop of a program without fail and rapidly without troubling a person by inspecting the tracing data obtained by the branch success tracing function of a service processor. CONSTITUTION:A service processor 3 decides whether or not the branch is a success, and has at least a branch success tracing part 3b to store the address data when the branch is the success, into a tracing area 3a, and an information processing part 3d to execute the input output processing, etc., of the information from a central processing unit 1 by using a work area 3c. The branch success tracing processing part 3b is constituted of a branch success tracing function and an abnormal loop checking means to execute the arithmetic processing at the time of the occurrence of the abnormal loop and detect the abnormal loop. By the branch success tracing function of such a service processor 3, it is inspected whether or not the same executing route is repeated, and in case the route is repeated, the abnormal loop is decided and the scope is displayed, for example, at the display device.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、コンピュータの操作と保守とを行うために
設けられたサービスプロセッサによりプログラムをデバ
ッグするプログラムのループチェック方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program loop check method for debugging a program using a service processor provided for operating and maintaining a computer.

〔従来の技術〕[Conventional technology]

一般に、ソフトウェアの開発過程として、結合テスト以
降の段階において、問題プログラムモードで走行するプ
ログラムの異常ループ及び複数プログラムに跨がった範
囲の異常ループが発生することがある。
Generally, in the software development process, an abnormal loop in a program running in a problem program mode or an abnormal loop in a range spanning multiple programs may occur at a stage after an integration test.

この異常ループが発生した場合、従来はコンピュータの
停止、起動を繰り返すことによって得られる命令アドレ
スの範囲から異常ループの範囲を絞り込んでいた。
When this abnormal loop occurs, conventionally the range of the abnormal loop has been narrowed down from the range of instruction addresses obtained by repeatedly stopping and starting the computer.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら、上記従来のプログラムの異常ループチェ
ック方式にあっては、コンピュータを停止するタイミン
グによっては、正確な情報が得られないという問題点が
あると共に、人手が多く掛かり過ぎるという問題点があ
った。
However, the conventional program abnormal loop check method described above has the problem that accurate information cannot be obtained depending on the timing at which the computer is stopped, and it also requires too much manpower.

そこで、サービスプロセッサのプログラムデパック機能
を用いて異常ループの発生を検出することが考えられ、
そのデバッグ機能として以下のものがある。
Therefore, it is possible to detect the occurrence of abnormal loops using the program depacking function of the service processor.
Its debug functions include the following:

a)ループ ディテクション ハンドラー(LoopD
etection Handier 、以下LDHと称
す)b)iC)レース C)ブランチ成功トレース しかし、a)項のLDHにあっては、一定時間ウェイト
せずにスーパーバイザモードで走行するプログラムを監
視する機能であり、前述した異常ループの検出には適用
できない。
a) Loop detection handler (LoopD
(hereinafter referred to as LDH) b) iC) Race C) Branch success trace However, the LDH in item a) is a function that monitors a program that runs in supervisor mode without waiting for a certain period of time, and is It cannot be applied to detecting abnormal loops.

また、上記b)項の1C1−レースにあっては、−命令
毎のトレースであるためトレース領域の制限が致命的な
問題となると共に、人手による作業が多くなるという問
題点が依然として残っている。
In addition, in the case of 1C1-race in item b) above, there still remains the problem that the limitation of the trace area is a fatal problem because it is traced for each instruction, and that it requires a lot of manual work. .

さらに、上記C)項のブランチ成功トレースにあっては
、プログラム内のループにしても、複数プログラムに跨
がったループにしても、何れも同一のアドレスからブラ
ンチすることを考えれば、異常ループの調査にとって有
効な情報であるといえるが、トレース領域の制限が緩和
されるということを除いては上記b)項と同様の問題点
を持っている。
Furthermore, in the branch success trace in section C) above, considering that both loops within a program and loops spanning multiple programs branch from the same address, abnormal loops However, it has the same problems as in item b) above, except that the restrictions on the trace area are relaxed.

そこで、この発明は、上記従来例の問題点に着目してな
されたものであり、結合テスト以降のソフトウェア開発
段階において、問題プログラムモードで走行するプログ
ラムの異常ループ及び複数プログラムに跨がった範囲の
異常ループが発生したとき、人手による作業を介さずに
ループ状態の検査及びループ範囲の検出を行うことが可
能なプログラムのループチェック方式を提供することを
目的としている。
Therefore, the present invention has been made by focusing on the problems of the above-mentioned conventional example. An object of the present invention is to provide a program loop check method that can inspect the loop state and detect the loop range without manual work when an abnormal loop occurs.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的を達成するために、この発明は、コンピュータ
に付属し且つブランチ成功トレース機能を備えたサービ
スプロセッサに、前記ブランチ成功トレース機能によっ
て得られるブランチ成功時の命令アドレスを用いて異常
ループの有無のチェックを行う異常ループチェック手段
を設け、該異常ループチェック手段で前記コンピュータ
のプログラムの異常ループの可能性を検査するようにし
ている。
In order to achieve the above object, the present invention allows a service processor attached to a computer and equipped with a branch success tracing function to detect the presence or absence of an abnormal loop by using the instruction address at the time of a successful branch obtained by the branch success tracing function. An abnormal loop check means is provided to check the possibility of an abnormal loop in the computer program.

〔作用〕[Effect]

この発明においては、通常のプログラムは必ずブランチ
する個所があるという点に着目して、サービスプロセッ
サのブランチ成功トレース機能によって得られるブラン
チ元アドレスの情報から、同一の実行ルートが繰り返さ
れているか否かを検査し、繰り返されているときに異常
ループと判定して、その範囲を例えばディスプレイ装置
に表示することによって、プログラムの異常ループとそ
の範囲を検出するものである。
In this invention, focusing on the fact that a normal program always has a branch point, the branch source address information obtained by the branch success trace function of the service processor is used to determine whether the same execution route is repeated or not. An abnormal loop in a program and its range are detected by inspecting the loop, determining that it is an abnormal loop when it is repeated, and displaying the range on, for example, a display device.

〔実施例〕〔Example〕

以下、この発明の実施例を図面に基づいて説明する。 Embodiments of the present invention will be described below based on the drawings.

第1図はこの発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.

図中、■は中央演算処理装置、2は中央演算処理装置l
に接続された主記憶装置、3は中央演算処理装置lの出
力側に接続されたサービスプロセッサ、4はサービスプ
ロセッサ3に接続されたディスプレイ装置である。
In the figure, ■ is the central processing unit, 2 is the central processing unit l
3 is a service processor connected to the output side of the central processing unit 1, and 4 is a display device connected to the service processor 3.

サービスプロセッサ3は、ブランチ成功か否かを判定し
ブランチが成功したときに、そのときのアドレスデータ
をトレース領域3aに格納するブランチ成功トレース処
理部3bと、中央処理装置1からの情報の入出力処理等
を作業領域3cを使用して行う情報処理部3dとを少な
くとも有して構成されている。
The service processor 3 includes a branch success trace processing unit 3b that determines whether or not the branch is successful and stores address data at that time in the trace area 3a when the branch is successful, and a branch success trace processing unit 3b that inputs and outputs information from the central processing unit 1. It is configured to include at least an information processing section 3d that performs processing and the like using a work area 3c.

ブランチ成功トレース処理部3bは、ブランチ成功トレ
ース機能と、異常ループの発生時に、第2図に示す演算
処理を実行して、異常ループを検出する異常ループチェ
ック手段とで構成されている。
The branch success trace processing section 3b is composed of a branch success trace function and an abnormal loop check means for detecting an abnormal loop by executing the arithmetic processing shown in FIG. 2 when an abnormal loop occurs.

すなわち、ステップ■でループ検査の範囲を設定する。That is, in step (2), the range of loop inspection is set.

この場合の設定は、予め設定されたトレース領域3aに
格納し得るトレース数の2を最大検査範囲MAXとして
設定する。
In this case, the maximum inspection range MAX is set to 2, which is the number of traces that can be stored in the preset trace area 3a.

次いで、ステップ■に移行して、検索するトレースデー
タの順位を設定する順位設定変数mを“0”にセントす
る。
Next, the process moves to step (3), where a ranking setting variable m for setting the ranking of trace data to be searched is set to "0".

次いで、ステップ■に移行して、ループ範囲内の検索個
数を表す変数lを“O”にセントし、且つループ患を表
す変数Xを“0”にセットする。
Next, the process moves to step (2), where a variable l representing the number of items searched within the loop range is set to "O", and a variable X representing a loop problem is set to "0".

次いで、ステップ■に移行して、順位設定変数mをそれ
に“l”を加算した値m+lとすることにより現在のト
レースデータから何個前のトレースデータを検査するか
を設定する。
Next, the process moves to step (2), and by setting the rank setting variable m to a value m+l, which is obtained by adding "l" to the rank setting variable m, it is set how many pieces of trace data before the current trace data is to be examined.

次いで、ステップ■に移行して検査の範囲を越えたか否
かを判定する。この場合の判定は、順位設定変数mが最
大検査範囲MAXを越えたか否かで判定し、m>MAX
であるときには、検査範囲を越えたものと判定して、ス
テップ■に移行し、ループしていないか又は検査の範囲
異常のループであるため検出不可能とディスプレイ装置
4に表示をしてからループ検査処理を終了する。
Next, the process moves to step (2), and it is determined whether or not the inspection range has been exceeded. In this case, the determination is made based on whether or not the rank setting variable m exceeds the maximum inspection range MAX.
If so, it is determined that the test range has been exceeded, and the process moves to step (2), where the display device 4 displays that the loop is not detectable because the loop is not looping or the loop is abnormal in the test range, and then the loop is resumed. Finish the inspection process.

一方、m≦MAXであるときには、検査範囲内にあるも
のと判定して、ステップ■に移行し、最新のブランチ成
功トレースデータを示すポインタのトレースデータaと
現在検査しているトレースデータ(a−m)とが等しい
か否かを判定する。
On the other hand, if m≦MAX, it is determined that it is within the inspection range, and the process moves to step (2), where the trace data a of the pointer indicating the latest branch success trace data and the trace data currently being inspected (a- m) is equal to each other.

このとき、a≠(a−m)であるときには、トレースデ
ータを示すポインタのデータとが不一致であり、ループ
が形成されていないものと判定してステップ■に戻り、
a=(a−m)であるときには、両データが一致しルー
プが形成されているものと判定してステップ■に移行す
る。
At this time, if a≠(a-m), the data of the pointer indicating the trace data does not match, and it is determined that no loop is formed, and the process returns to step (2).
When a=(a-m), it is determined that both data match and a loop is formed, and the process moves to step (2).

このステップ■では、ループ範囲内の各要素を抽出する
。すなわち、ループ魚を示すループ変数Xを“1”だけ
加算すると共に、データ(a−β)をループXのデータ
として抽出する。
In this step (2), each element within the loop range is extracted. That is, the loop variable X indicating the loop fish is added by "1" and the data (a-β) is extracted as the loop X data.

次いで、ステップ■に移行して、検査個数変数lを“1
”だけ加算してからステップ[相]に移行し、ループ内
の全ての要素を検査したか否かを判定する。この場合の
判定は、検査個数変数βが検査順位変数m以上であるか
否かを判定することにより行い、l<mであるときには
、検査中であると判定してステップ0に移行する。この
ステップ■では、最新のトレースデータより2個前のデ
ータ(a−1)と現在検査しているトレースデータより
1個前のデータ(a−m−j2)とが等しいか否かを判
定する。このとき、両トレースデータ(a −1)、 
 (a −m−1)が不一致であるときには、ループが
形成されていないものと判定してステップ■に戻り、一
致しているときには、ステップ■に戻る。
Next, proceed to step ■, and set the inspection number variable l to "1".
” and then moves to step [phase], where it is determined whether all elements in the loop have been inspected. In this case, the determination is made by determining whether the number of inspection variables β is greater than or equal to the inspection order variable m. If l<m, it is determined that the inspection is in progress and the process moves to step 0.In this step It is determined whether the trace data currently being inspected is equal to the previous data (a-m-j2).At this time, both trace data (a-1),
When (a-m-1) do not match, it is determined that no loop is formed and the process returns to step (2), and when they match, the process returns to step (2).

そして、ステップ[相]の判定結果がl≧mとなって、
全てのループ要素の検査を終了したときには、ステップ
@に移行してループの範囲に存在したブランチ元アドレ
ス(ループ(11〜ループ(X))をディスプレイ装置
4に表示してからループ検査処理を終了する。
Then, the determination result of step [phase] is l≧m,
When all the loop elements have been inspected, the process moves to step @, where the branch source addresses (loop (11 to loop (X)) existing in the loop range are displayed on the display device 4, and the loop inspection process ends. do.

而して、今、第3図に示すように、プログラムAが(a
lの範囲で異常ループが形成されたものとすると、ブラ
ンチ成功トレース処理部3bで第2図の演算処理が実行
され、このときのトレース領域3aに格納されているブ
ランチ成功トレースデータを参照することにより、最新
のトレースデータがアドレス1であるものとすると、ス
テップ■で最新トレースデータの1個前のトレースデー
タ(アドレス2)を検査することを設定し、次いでステ
ップ■でm>MAXであるので、ステップ■に移行して
、最新トレースデータ(アドレスl)と現在検査中のト
レースデータ(アドレス2)とが不一致であるのでステ
ップ■に戻り、最新のトレースデータの2個前のトレー
スデータ(アドレス1)を検査することを設定し、次い
でステップ■を経てステップ■に移行して最新のトレー
スデータ(アドレス1)と現在検査中のトレースデータ
(アドレス1)とが一致するので、一応異常ループが形
成されているものと判定して、ステップ■に移行する。
Now, as shown in Figure 3, program A is (a
Assuming that an abnormal loop is formed in the range l, the branch success trace processing unit 3b executes the arithmetic processing shown in FIG. 2, and the branch success trace data stored in the trace area 3a at this time is referred to. Assuming that the latest trace data is address 1, in step ■ it is set to inspect the trace data (address 2) immediately before the latest trace data, and then in step ■, since m>MAX, , the process moves to step ■, and since there is a mismatch between the latest trace data (address l) and the trace data currently being inspected (address 2), the process returns to step ■, and the trace data two pieces before the latest trace data (address 1) is set to be inspected, and then passes through step ■ and moves to step ■, where the latest trace data (address 1) and the trace data currently being inspected (address 1) match, so there is an abnormal loop. It is determined that it has been formed, and the process moves to step (2).

このステップ■では、ループ変数Xを“1”とすると共
に、ループ(1)のデータを最新トレースデータ(アド
レス1(a−0=a))としてからステップ■に移行し
て、検査個数変数2を“I”だけ加算して6=1とする
In this step (2), the loop variable is added by "I" to make 6=1.

次いで、ステップ[相]に移行して、!! = l <
 m =2であるので、検査未了と判定してステップ0
に移行し、最新のトレースデータ(アドレス1)より1
個前のトレースデータ(アドレス2)と現在検査してい
るトレースデータ(アドレス1)より1個前のトレース
データ(アドレス2)とが一致するので、ステップ■に
戻り、ループ変数Xを2とすると共に、ループ(2)と
して最新データの1つ前のデータ(a−1)(アドレス
2)をセットし、次いでステップ■で検査変数2を2に
セットする。
Next, move to step [phase] and! ! = l <
Since m = 2, it is determined that the inspection has not been completed and step 0 is performed.
1 from the latest trace data (address 1)
Since the previous trace data (address 2) matches the trace data (address 2) that is one trace before the currently inspected trace data (address 1), return to step ■ and set the loop variable X to 2. At the same time, data (a-1) (address 2) immediately before the latest data is set as loop (2), and then test variable 2 is set to 2 in step (2).

このように検査変数lが2にセットされると、前記ステ
ップ■で設定された検査順位設定変数m(=2)と等し
くなるので、ステップ[相]からステップ0に移行して
、ループ範囲内に存在するブランチ元アドレス(アドレ
ス1,2)をディスプレイ装置4に出力して表示して処
理を終了する。そして、アドレス1,2に基づき主記憶
装置f2上のプログラム配置を調査することにより、プ
ログラムAでループしていたことを検出することができ
る。
When the inspection variable l is set to 2 in this way, it becomes equal to the inspection order setting variable m (=2) set in step The branch source addresses (addresses 1 and 2) existing in are output to the display device 4 and displayed, and the process ends. Then, by checking the program location on the main storage device f2 based on addresses 1 and 2, it is possible to detect that the program A is in a loop.

同様に、第4図で(b)で示すように、異常ループが複
数のプログラムA−Cに跨がっているときにも、上記と
同様の処理を実行することにより、順次異常ループに含
まれるアドレス2,1.7.6゜5.4.3をディスプ
レイ装置4に表示し、この状態で主記憶装置2のプログ
ラム配置を調査することにより、アドレス1〜7から異
常ループがプログラムA−Cに跨がっていたことを検出
することができる。
Similarly, as shown in (b) in Figure 4, even when an abnormal loop spans multiple programs A-C, by executing the same process as above, the programs are included in the abnormal loop sequentially. By displaying the addresses 2, 1.7.6° 5.4.3 on the display device 4 and investigating the program location in the main storage device 2 in this state, the abnormal loop can be traced to program A-7 from addresses 1 to 7. It is possible to detect that the object is straddling C.

なお、プログラム間の制御の受は渡しに、スーパーバイ
ザのプログラムを経由していたとしても、この発明の思
想に何ら影響を与えるものではない。
Note that even if control is transferred between programs via a supervisor program, this does not affect the idea of the present invention in any way.

〔発明の効果〕 以上説明したように、この発明によれば、サービスプロ
セッサのブランチ成功トレース機能によって得られるト
レースデータを検査して、異常ループとその範囲とを検
出するようにしたので、プログラムの異常ループの範囲
の検出を人手を煩わすことなく確実且つ迅速に検出する
ことができるという効果が得られる。
[Effects of the Invention] As explained above, according to the present invention, the trace data obtained by the branch success trace function of the service processor is inspected to detect abnormal loops and their ranges, so that the program can be improved. An effect is obtained in that the range of the abnormal loop can be detected reliably and quickly without any manual effort.

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

第1図はこの発明の一実施例の概要を示す概略構成図、
第2図はループ検査のアルゴリズムを示すフローチャー
ト、第3図及び第4図は夫々異常ループ範囲検出の一例
を示す説明図である。 図中、1は中央演算処理装置、2は主記憶装置、3はサ
ービスプロセッサ、3aはトレース領域、3bはブラン
チ成功トレース処理部、3cは作業領域、3dは情報処
理部、4はディスプレイ装置である。
FIG. 1 is a schematic configuration diagram showing an outline of an embodiment of the present invention;
FIG. 2 is a flowchart showing an algorithm for loop inspection, and FIGS. 3 and 4 are explanatory diagrams showing an example of abnormal loop range detection, respectively. In the figure, 1 is a central processing unit, 2 is a main memory, 3 is a service processor, 3a is a trace area, 3b is a branch success trace processing unit, 3c is a work area, 3d is an information processing unit, and 4 is a display device. be.

Claims (1)

【特許請求の範囲】[Claims] コンピュータに付属し且つブランチ成功トレース機能を
備えたサービスプロセッサに、前記ブランチ成功トレー
ス機能によって得られるブランチ成功時の命令アドレス
を用いて異常ループの有無のチェックを行う異常ループ
チェック手段を設け、該異常ループチェック手段で前記
コンピュータのプログラムの異常ループの可能性を検査
することを特徴とするプログラムのループチェック方式
A service processor attached to the computer and equipped with a branch success trace function is provided with an abnormal loop check means for checking the presence or absence of an abnormal loop using the instruction address at the time of branch success obtained by the branch success trace function, A program loop check method, characterized in that a loop check means checks the possibility of an abnormal loop in the computer program.
JP61019737A 1986-01-31 1986-01-31 Loop checking system for program Pending JPS62179032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61019737A JPS62179032A (en) 1986-01-31 1986-01-31 Loop checking system for program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61019737A JPS62179032A (en) 1986-01-31 1986-01-31 Loop checking system for program

Publications (1)

Publication Number Publication Date
JPS62179032A true JPS62179032A (en) 1987-08-06

Family

ID=12007643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61019737A Pending JPS62179032A (en) 1986-01-31 1986-01-31 Loop checking system for program

Country Status (1)

Country Link
JP (1) JPS62179032A (en)

Similar Documents

Publication Publication Date Title
US7574697B2 (en) Testing parallel applications using code instrumentation
US5631857A (en) Measuring test tool effectiveness
JPS62179032A (en) Loop checking system for program
JPS59186054A (en) Test method of computer program
JPH08305609A (en) Program test method and device
Itoh et al. Ordered sequence testing criteria for concurrent programs and the support tool
Levrouw et al. An efficient record-replay mechanism for shared memory programs
JPH03118644A (en) Program execution monitor
JPH03222639A (en) Patrol inspection system
JPH02227679A (en) Inspection device for substrate
JPH08179966A (en) Program test device
JPS60226132A (en) Semiconductor device tester
JPH03182941A (en) Program test system
JPH10232795A (en) Software component combination test method
JP2523692B2 (en) Electronic computer adjustment failure analysis support system
JPH03197881A (en) Output display method for defective data by in-circuit tester
CN114282699A (en) Approval process simulation operation method, system, terminal and medium
WO2004097545A2 (en) A method of executing a computer program
JPS63268040A (en) Program debugging system
JPS61199131A (en) Testing method for microcomputer
JPH01166228A (en) Automatic detection debug system for unpassed check point
JPH03282641A (en) Measuring method of executing time of data driving processor
JPH04171541A (en) Counting method for emulator processing time
JPS61240342A (en) Microprogram controller
JPH02272947A (en) Fault monitoring system