JPS63298539A - Tracing device for program execution history - Google Patents

Tracing device for program execution history

Info

Publication number
JPS63298539A
JPS63298539A JP62134526A JP13452687A JPS63298539A JP S63298539 A JPS63298539 A JP S63298539A JP 62134526 A JP62134526 A JP 62134526A JP 13452687 A JP13452687 A JP 13452687A JP S63298539 A JPS63298539 A JP S63298539A
Authority
JP
Japan
Prior art keywords
infinite loop
group
program
register
instruction
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
JP62134526A
Other languages
Japanese (ja)
Inventor
Akira Kato
明 加藤
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 Home Electronics Ltd
NEC Corp
Original Assignee
NEC Home Electronics Ltd
Nippon Electric Co Ltd
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 Home Electronics Ltd, Nippon Electric Co Ltd filed Critical NEC Home Electronics Ltd
Priority to JP62134526A priority Critical patent/JPS63298539A/en
Publication of JPS63298539A publication Critical patent/JPS63298539A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To facilitate investigation of the cause of generation of an infinite loop by setting in advance an instruction sequence of a known infinite loop to a first register group, shifting an instruction group which is read out in the course of executing a program, to a second register group, and collating the contents of both the register groups. CONSTITUTION:At the time of tracing a program execution history, when it is fallen into an infinite loop once, the instruction sequence of a one-cycle portion of this infinite loop can be known easily from the contents of a trace memory. Therefore, about the one-cycle portion of the known instruction sequence is set in advance to the first register groups 11a-11n. Also, while shifting an instruction group which is read out in the course of executing a program, to the second register groups 12a-12n which is cascaded, the contents of both the register groups are collated at every stage. In such a way, by detecting an appearance of the sequence of the infinite loop and inhibiting the trace, history information immediately before the generation of the infinite loop can be collected surely.

Description

【発明の詳細な説明】 発明の目的 産業上の利用分野 本発明は、ディジタル情報処理の技術分野においてプロ
グラム開発時のデバッグなどに利用されるプログラム実
行履歴のトレース装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a program execution history tracing device used for debugging during program development in the technical field of digital information processing.

従来の技術 ディジタル情報処理の分野では、プログラムの開発など
に際し、試験対象のプログラムを実際に走行させ、この
走行に伴いメモリから読出された命令群をその読出しの
順にトレース・メモリに保存してゆくことによりその実
行履歴を収集するトレース装置が汎用されている。
Conventional technology In the field of digital information processing, when developing a program, the program to be tested is actually run, and the instructions read from memory as it runs are stored in trace memory in the order in which they were read. Therefore, trace devices that collect the execution history are widely used.

このようなトレース装置では、トレース・メモリの記憶
容量上の制限から、トレース・メモリの内容が満杯にな
ると最新の履歴情報を上書きすることにより収集済みの
履歴情報を古い順から抹消してゆくという循環的な記録
を行わせたり、適宜な箇所にブレーク・ポイントと称す
る動作の中断点を設定したりしている。
In such tracing devices, due to the storage capacity limit of the trace memory, when the contents of the trace memory become full, the collected history information is deleted from the oldest by overwriting the latest history information. It performs cyclical recording and sets operation interruption points called break points at appropriate locations.

発明が解決しようとする問題点。The problem that the invention seeks to solve.

上記循環的な記録が行われるトレース装置では、プログ
ラムの誤りなどによってその走行が無限ループに陥って
しまうと、トレース・メモリの内容がそのような無限ル
ープの履歴情報で占められてしまう。従って、そのよう
な無限ループ発生原因の究明に必要な発生前の履歴情報
が完全に抹消されてしまうという問題がある。
In the above-mentioned trace device that performs cyclic recording, if the program falls into an infinite loop due to an error in the program, the contents of the trace memory will be occupied by the history information of such an infinite loop. Therefore, there is a problem in that the history information before the occurrence of such an infinite loop, which is necessary for investigating the cause of the occurrence of the infinite loop, is completely erased.

そのような事態を避けるためブレーク・ポイントを設定
しようとした場合、これを無限ループの発生箇所の後に
設定したのでは意味がなく、またある程度手前に設定し
たのでは発生原因が究明できない。従って、そのような
ブレーク・ポイントを無限ループ発生箇所の直前に設定
しなければならず、設定に多数回の試行錯誤が必要にな
り、手間がかかるという問題がある。
If you try to set a breakpoint to avoid such a situation, setting it after the point where the infinite loop occurs is meaningless, and setting it a certain distance before the point makes it impossible to determine the cause of the occurrence. Therefore, it is necessary to set such a break point immediately before the point where the infinite loop occurs, and setting the break point requires a large number of trial and error processes, resulting in a time-consuming problem.

発明の構成 問題点を解決するための手段 本発明に係わるプログラム実行履歴のトレース装置は、
試験対象のプログラム中の命令又はその記憶装置上の格
納アドレスの集合から成る所定のシーケンスを保持する
第1のレジスタ群と、このプログラムの実行中に記憶装
置から読出される命令又はその格納アドレスを命令の読
出し順に転送しつつ保持する縦列接続された第2のレジ
スタ群と、これら第1.第2のレジスタ群の対応する各
段の保持内容を照合する照合回路群と、この照合回路群
の全てにおいて照合が一致した時にトレース・メモリへ
の書込みを禁止する書込み禁止手段とを備えている。
Means for solving the structural problems of the invention A program execution history tracing device according to the present invention has the following features:
a first group of registers holding a predetermined sequence consisting of a set of instructions in the program under test or their storage addresses on a storage device; A second group of cascade-connected registers that transfer and hold instructions in the order in which they are read; It includes a group of collation circuits that collates the contents held in each corresponding stage of the second group of registers, and a write prohibition means that prohibits writing to the trace memory when all of the collation circuits match. .

作用 すなわち、プログラム実行履歴のトレースに際し−H無
限ループに陥った場合、この無限ループの1サイクル分
の命令シーケンスをトレース・メモリの内容から容易に
知ることができる。
In other words, if a -H infinite loop occurs when tracing the program execution history, the instruction sequence for one cycle of this infinite loop can be easily known from the contents of the trace memory.

そこで、この既知の命令シーケンスのほぼ1サイクル分
を第1のレジスタ群に予め設定しておくと共に、プログ
ラム実行中に読出された命令群を縦列接続された第2の
レジスタ群にシフトさせつつ、両レジスタ群の内容を各
段ごとに照合することによって無限ループのシーケンス
の出現を検出しトレースを禁止してやれば、無限ループ
の発生直前までの履歴情報を確実に収集することが可能
となる。
Therefore, approximately one cycle of this known instruction sequence is set in advance in the first register group, and while the instruction group read during program execution is shifted to the cascade-connected second register group, By comparing the contents of both register groups at each stage to detect the appearance of an infinite loop sequence and prohibit tracing, it becomes possible to reliably collect history information up to just before the infinite loop occurs.

以下、本発明の更に詳細を実施例と共に説明する。Hereinafter, further details of the present invention will be explained together with examples.

実施例 第1図は、本発明の一実施例に係わるプログラム履歴情
報のトレース装置の構成を示すブロック図であり、トレ
ース制御部10とトレース・メモIJ 20とから構成
されている。
Embodiment FIG. 1 is a block diagram showing the configuration of a program history information tracing device according to an embodiment of the present invention, which is composed of a trace control section 10 and a trace memo IJ 20.

トレース制御部10は、縦列接続されたn段の照合命令
レジスタ群11a、11b、llc・・・llnと、同
じく縦列接続されたn段の実行命令レジスタ群12a、
12b、12(’、’  12nと、これら両レジスタ
群の各段の内容を照合するn個の照合回路13.a、1
3b、  13cm・−13、nとを備えている。さら
に、このトレース制御部10は、照合回路133〜13
nのそれぞれの出力を選択的に“1″又は“0″に固定
するスイッチ14a、14b、14c・・ 14nと、
照合回路13a〜13nの出力をそれぞれの入力端子に
受けるn入力アンド・ゲート15と、このアンド・ゲー
トの出力を計数するカウンタ16とを備えている。
The trace control unit 10 includes n-stage collation instruction register groups 11a, 11b, llc...lln connected in cascade, and an n-stage execution instruction register group 12a also cascade-connected.
12b, 12(', ' 12n, and n matching circuits 13.a, 1 that match the contents of each stage of both register groups.
3b, 13cm・-13, and n. Furthermore, this trace control unit 10 includes matching circuits 133 to 13.
switches 14a, 14b, 14c, . . . , 14n that selectively fix the respective outputs of n to "1" or "0";
It includes an n-input AND gate 15 that receives the outputs of the collation circuits 13a to 13n at respective input terminals, and a counter 16 that counts the outputs of the AND gates.

トレース・メモリ20は、n入力アンド・ゲート15か
ら出力される変更指令がローじ0”)であれば、実行命
令レジスタ12nから出力される実行命令をフェッチ・
クロックに同期して書込み、アドレスを歩進する。一方
、トレース・メモリ20は、n入力アンド・ゲート15
から出力される変更指令がハイ (“1”)であれば、
上記一連のシーケンスの実行命令の代わりにカウンタ1
6から出力される一致回数を所定の領域に書込み、アド
レスを元の値に戻す。
If the change command output from the n-input AND gate 15 is low (0''), the trace memory 20 fetches the execution instruction output from the execution instruction register 12n.
Write in synchronization with the clock and increment the address. On the other hand, the trace memory 20 has an n-input AND gate 15
If the change command output from is high (“1”),
Counter 1 instead of the execution command of the above series of sequences
The number of matches output from 6 is written in a predetermined area, and the address is returned to its original value.

まず、トレース制御部1.0本来の機能を停止させた状
態で、試験対象プログラムを走行させる。
First, the program to be tested is run with the original function of the trace control unit 1.0 stopped.

この制御機能の停止は、トレース制御部10のスイッチ
14a〜14nを全て信号線17側に切換えると共にこ
の信号線17の論理状態をローに固定してアンド・ゲー
ト15から出力される変更指令をローに固定することに
よって達成される。
This control function can be stopped by switching all the switches 14a to 14n of the trace control unit 10 to the signal line 17 side, fixing the logic state of the signal line 17 to low, and lowering the change command output from the AND gate 15. This is achieved by fixing the

この制御機能停止状態で試験対象プログラムを走行させ
ると、図示しないプログラム・メモリから読出された命
令がフェッチ・クロックに同期して実行命令レジスタ1
23〜12n内を順次転送されてゆき、最終段の実行命
令レジスタ12nから履歴情報として無条件にトレース
・メモリ20内に書込まれてゆく。このプログラムの走
行に伴い無限ループが発生すると、トレース・メモリ2
0の内容はこの無限ループのシーケンスの繰り返しだけ
で一杯になる。このプログラムの走行は適宜な時点で強
制終了させられ、この後にトレース・メモリ20の内容
が読取られ、無限ループのシーケンスが判明する。
When the test target program is run with this control function stopped, the instructions read from the program memory (not shown) are executed in the execution instruction register 1 in synchronization with the fetch clock.
23 to 12n, and is unconditionally written into the trace memory 20 as history information from the execution instruction register 12n at the final stage. When an infinite loop occurs as this program runs, trace memory 2
The contents of 0 are filled with just the repetition of this infinite loop sequence. The running of this program is forcibly terminated at an appropriate point, after which the contents of the trace memory 20 are read and the infinite loop sequence is determined.

判明した無限ループのシーケンスのほぼ1サイクル分が
、シフト・パルスに同期して照合命令レジスタlla、
llb、llc・・・に設定されてゆくと共に、スイッ
チ14a、14b、14c・・・が対応の照合命令レジ
スタの出力端子側に切換えられる。なお、この照合命令
レジスタ群の段数が設定すべきシーケンス長に比べて大
きすぎる場合には、対応のスイッチを信号線17側に切
換えた状態にしておくと共に信号線17を論理のハイに
固定することにより照合回路の一部を無効にし、照合段
数を実質的に削減する。
Approximately one cycle of the infinite loop sequence found is synchronized with the shift pulse and is executed in the collation instruction register lla,
llb, llc, . . . , the switches 14a, 14b, 14c, . . . are switched to the output terminal side of the corresponding collation instruction register. Note that if the number of stages in this collation command register group is too large compared to the sequence length to be set, the corresponding switch is left switched to the signal line 17 side, and the signal line 17 is fixed at logic high. This disables part of the matching circuit and substantially reduces the number of matching stages.

この照合命令レジスタ群11a−11nへのシーケンス
の設定が終了すると、再度プログラムの走行が開始され
、プログラム・メモリから読出された実行命令がフェッ
チ・クロックに同期して実行命令レジスタ123〜12
n内を転送されてゆく。無限ループが発生するまでは、
照合回路群13a〜13nのうち有効なものにおいて同
時には照合一致が生ぜず、このためn入力アンド・ゲー
ト15の出力はロー状態を保持し続ける。これに伴い、
命令実行レジスタ12nから出力される実行命令がフェ
ッチ・クロックに同期してトレース・メモリ20に順次
書込まれてゆく。
When the setting of the sequence to the collation instruction register group 11a-11n is completed, the program starts running again, and the execution instructions read from the program memory are sent to the execution instruction registers 123-12 in synchronization with the fetch clock.
It is transferred within n. Until an infinite loop occurs,
Verification matches do not occur simultaneously in the valid verification circuit groups 13a to 13n, and therefore the output of the n-input AND gate 15 continues to maintain a low state. Along with this,
Execution instructions output from the instruction execution register 12n are sequentially written into the trace memory 20 in synchronization with the fetch clock.

こののち無限ループが発生すると、有効な照合回路13
aの全てにおいて照合一致が生じ、n入力アンド・ゲー
ト15から出力される変更指令がハイに立上がる。この
ハイ出力は、カウンタ16にも供給され、−数回数とし
てカウントされる。
After this, if an infinite loop occurs, the effective matching circuit 13
A match occurs in all of a, and the change command output from the n-input AND gate 15 rises high. This high output is also supplied to the counter 16 and is counted as - several times.

上記変更指令の立上りに伴い、実行命令レジスタ12n
の出力の代わりにカウンタ16で計数された照合−数回
数がトレース・メモリ20の所定の領域に書込まれる。
With the rise of the above change command, the execution command register 12n
Instead of the output of , the number of verifications counted by the counter 16 is written into a predetermined area of the trace memory 20.

プログラムの走行に伴い上記所定のシーケンスが出現す
るたびに上述のような書込み対象の変更動作が繰り返さ
れ、カウンタ16で歩進された新たな照合−数回数がト
レース・メモリ20の所定の領域内で更新されてゆ(。
Each time the above-mentioned predetermined sequence appears as the program runs, the operation of changing the write target as described above is repeated, and the new collation number incremented by the counter 16 is stored in the predetermined area of the trace memory 20. It has been updated with (.

カウンタ16は、そのカウント値が所定値に達するとオ
ーバーフローし、プログラムの走行を強制終了させるた
めのブレークの指令として利用される。
When the count value reaches a predetermined value, the counter 16 overflows and is used as a break command to forcibly terminate the running of the program.

なお、無限ループのシーケンスと類似のシーケンスが有
限回数繰り返される正常のループについては、カウンタ
16のオーバーフロー値未満のカウント値だけが照合−
数回数としてトレース・メモリ20に記録される。
Note that for a normal loop in which a sequence similar to the infinite loop sequence is repeated a finite number of times, only the count value less than the overflow value of the counter 16 is verified.
It is recorded in the trace memory 20 as several times.

以上、シーケンスの照合が一致した場合には、実行命令
の代わりに照合−数回数をトレース・メモリに書込む構
成を例示したが、単に実行命令の書込みだけを禁止する
構成としてもよい。この場合、カウンタ16によるカウ
ント動作と、そのオーバーフローによるブレーク指令の
生成を省略してもよい。
In the above example, when the sequences match, the number of times of matching is written in the trace memory instead of the execution command. However, it is also possible to simply prohibit writing of the execution command. In this case, the counting operation by the counter 16 and the generation of a break command due to its overflow may be omitted.

また、プログラムの走行に伴い記憶装置から読出される
実行命令をトレースする構成を例示したが、この実行命
令の記憶装置上の格納アドレスを実行命令に代えである
いは実行命令に加えてトレースする構成としてもよい。
In addition, although we have illustrated a configuration in which an execution instruction read from a storage device as a program runs, a configuration in which the storage address of this execution instruction on a storage device is traced instead of or in addition to the execution instruction may also be used. Good too.

さらに、照合命令群を保持させる際の便宜を考慮して対
応のレジスタ群を縦列接続する構成を例示したが、この
レジスタ群は必ずしも縦列接続されなくともよい。
Furthermore, although a configuration has been illustrated in which corresponding register groups are connected in cascade in consideration of convenience in holding collation instruction groups, these register groups do not necessarily need to be cascaded.

発明の効果 以上詳細に説明したように、本発明に係わるプログラム
実行履歴のトレース装置は、既知の無限ループのほぼ1
サイクル分の命令シーケンスを第1のレジスタ群に予め
設定しておくと共に、プログラム実行中に読出された命
令群を縦列接続された第2のレジスタ群にシフトさせつ
つ、両レジスタ群の内容を各段ごとに照合することによ
って無限ループのシーケンスの出現を検出してトレース
を禁止する構成であるから、無限ループの発生直前まで
の履歴情報を迅速・確実収集でき、そのような無限ルー
プの発生原因の究明が容易になるという効果がある。
Effects of the Invention As explained in detail above, the program execution history tracing device according to the present invention can eliminate almost one known infinite loop.
An instruction sequence for a cycle is set in advance in the first register group, and while the instruction group read during program execution is shifted to the cascade-connected second register group, the contents of both register groups are transferred to each register group. Since the system detects the appearance of an infinite loop sequence by checking each stage and prohibits tracing, it is possible to quickly and reliably collect history information up to the point immediately before the occurrence of an infinite loop, and to identify the cause of such an infinite loop. This has the effect of making it easier to investigate.

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

°第1図は、本発明の一実施例に係わるプログラム実行
履歴のトレース装置の構成を示すブロック図である。 10・・・トレース制御部、lla〜lln・・・既知
の無限ループのほぼ1サイクル分のシーケンスを予め設
定しておく第1のレジスタ群、12a〜12n・・・プ
ログラムの走行に際し記憶装置から読出される実行命令
群を転送させつつ保持する第2のレジスタ群、13a−
13n・・・第1.第2のレジスタ群の対応の段の内容
を照合する照合回路群、15・・・n入力アンド・ゲー
ト、16・・・カウンタ、20・・・トレース・メモリ
。 特許出願人 日本電気ホームエレクトロニクス株式会社
FIG. 1 is a block diagram showing the configuration of a program execution history tracing device according to an embodiment of the present invention. 10...Trace control unit, lla to lln...First register group in which a sequence for approximately one cycle of a known infinite loop is set in advance, 12a to 12n... From the storage device when the program runs a second register group 13a- that transfers and holds the read execution instruction group;
13n... 1st. A group of collation circuits for collating the contents of the corresponding stage of the second group of registers, 15... n-input AND gate, 16... counter, 20... trace memory. Patent applicant: NEC Home Electronics Co., Ltd.

Claims (1)

【特許請求の範囲】 トレース・メモリと、 試験対象のプログラム中の命令又はその記憶装置上の格
納アドレスの集合から成る所定のシーケンスを保持する
第1のレジスタ群と、 前記プログラムの実行中に前記記憶装置から読出される
命令又はその格納アドレスを命令の読出し順に転送しつ
つ保持する縦列接続された第2のレジスタ群と、 前記第1、第2のレジスタ群の対応する各段の保持内容
を照合する照合回路群と、 この照合回路群の全てにおいて照合が一致した時に前記
トレース・メモリへの書込みを禁止する書込み禁止手段
とを備えたことを特徴とするプログラム実行履歴のトレ
ース装置。
[Scope of Claims] A trace memory; a first group of registers holding a predetermined sequence consisting of a set of instructions in a program to be tested or their storage addresses on a storage device; a cascade-connected second register group that transfers and holds instructions read from the storage device or their storage addresses in the order in which the instructions are read; and a second register group that stores the contents held in each corresponding stage of the first and second register groups. A program execution history tracing device comprising: a group of matching circuits for matching; and a write inhibiting means for prohibiting writing to the trace memory when all of the matching circuits match.
JP62134526A 1987-05-29 1987-05-29 Tracing device for program execution history Pending JPS63298539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62134526A JPS63298539A (en) 1987-05-29 1987-05-29 Tracing device for program execution history

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62134526A JPS63298539A (en) 1987-05-29 1987-05-29 Tracing device for program execution history

Publications (1)

Publication Number Publication Date
JPS63298539A true JPS63298539A (en) 1988-12-06

Family

ID=15130382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62134526A Pending JPS63298539A (en) 1987-05-29 1987-05-29 Tracing device for program execution history

Country Status (1)

Country Link
JP (1) JPS63298539A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762783B2 (en) 2010-06-24 2014-06-24 International Business Machines Corporation Error identification

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5121746A (en) * 1974-08-19 1976-02-21 Hitachi Ltd
JPS592155A (en) * 1982-06-29 1984-01-07 Hitachi Ltd Program tracing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5121746A (en) * 1974-08-19 1976-02-21 Hitachi Ltd
JPS592155A (en) * 1982-06-29 1984-01-07 Hitachi Ltd Program tracing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762783B2 (en) 2010-06-24 2014-06-24 International Business Machines Corporation Error identification

Similar Documents

Publication Publication Date Title
EP0155211B1 (en) System for by-pass control in pipeline operation of computer
US4423508A (en) Logic tracing apparatus
US4313200A (en) Logic test system permitting test pattern changes without dummy cycles
US20080016415A1 (en) Evaluation system and method
SE330559B (en)
JPS63298539A (en) Tracing device for program execution history
KR870000116B1 (en) History memory control method
KR0134036B1 (en) Apparatus for performing logic simulation
JPH07198782A (en) Diagnosis circuit
JPH07182165A (en) Processing method/device for instruction with committing condition
RU2030784C1 (en) Device for search for faults occurring intermittently in microprocessing systems
JPS59183434A (en) Prefetch control system of instruction
JPH0748183B2 (en) Trace circuit
JPS6142301B2 (en)
SU1674255A2 (en) Storage
SU1397922A1 (en) Device for shaping interrupt signal in program debugging
SU1550515A2 (en) Programmed controller processor
SU1524055A1 (en) Device for checking programs
JPS626341A (en) Information processor
JPH0716189Y2 (en) Break circuit
JPS59158450A (en) Program test device
SU1236474A2 (en) Control device
SU879563A1 (en) Device for checking programs
SU1615725A1 (en) Device for monitoring running of programs
KR950033821A (en) Trace device and emulator using it