JPH02100146A - Trace decision system - Google Patents

Trace decision system

Info

Publication number
JPH02100146A
JPH02100146A JP63252511A JP25251188A JPH02100146A JP H02100146 A JPH02100146 A JP H02100146A JP 63252511 A JP63252511 A JP 63252511A JP 25251188 A JP25251188 A JP 25251188A JP H02100146 A JPH02100146 A JP H02100146A
Authority
JP
Japan
Prior art keywords
routine
program
trace
identification code
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
JP63252511A
Other languages
Japanese (ja)
Inventor
Haruo Sugizaki
杉崎 治男
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63252511A priority Critical patent/JPH02100146A/en
Publication of JPH02100146A publication Critical patent/JPH02100146A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To recognize the entire execution process of a program by providing an indentification code at a program routine, deciding whether or not trace should be performed by the information of a trace control register, and storing only the identification code. CONSTITUTION:When the program routine is executed, the identification code of the program routine and the content of a trace condition storage means 2 are referred. And a trace processing routine 3 which stores the identification code of the program routine in an identification code storage means 4 corresponding to the content is provided. In such a case, the program sends the identification code of the program to the trace processing routine 3, and the trace processing routine 3 stores the identification code of the program routine in the identification code storage means 4 when the code coincides with a trace condition stored in the trace control register 2. In such a way, it is possible to recognize the entire execution process of the program.

Description

【発明の詳細な説明】 〔概要〕 情報処理装置に於いて、 プログラムの実行の全体的な実行過程を記憶することを
目的とし、 プログラムを識別する識別コードを有し、前記識別コー
ドを自らのプログラム内に格納しているプログラムルー
チンと、前記プログラムルーチンのトレース実行の条件
を記憶するトレース条件記憶手段と、前記プログラムル
ーチンの識別コードを記憶する識別コード記憶手段と、
前記プログラムルーチンが実行される時、前記プログラ
ムルーチンの識別コードと、前記トレース条件記憶手段
の内容を参照し、その結果に応じて、前記プログラムル
ーチンの識別コードを、前記識別コード記憶手段に記憶
するトレース処理ルーチンを設ける構成とする。
[Detailed Description of the Invention] [Summary] In an information processing device, the purpose is to store the entire execution process of a program, and the information processing device has an identification code for identifying the program, and uses the identification code as its own. a program routine stored in a program; a trace condition storage means for storing trace execution conditions of the program routine; and an identification code storage means for storing an identification code of the program routine;
When the program routine is executed, the identification code of the program routine and the contents of the trace condition storage means are referred to, and the identification code of the program routine is stored in the identification code storage means according to the result. The configuration includes a trace processing routine.

〔産業上の利用分野〕[Industrial application field]

本発明は、プログラムの実行した履歴を記録し、前記プ
ログラムの保守、試験時に使用するトレース決定方式に
関する。
The present invention relates to a trace determination method that records the execution history of a program and is used during maintenance and testing of the program.

〔従来の技術〕[Conventional technology]

従来から、情報処理装置に於いて、プログラムの保守、
試験等を行う為に、プログラムを実行した時の状態履歴
を記憶(以下、トレースと略す)することが行われてい
る。従来のプログラムトレース方式に於いては、プログ
ラムの実行する全てのステップを、トレース記憶領域に
記憶する方式や、あるプログラム内のあるアドレス範囲
のプログラムが実行されている過程をトレースする方式
や、また、ある特定の命令が実行される時だけトレース
するものなどがあった。
Traditionally, in information processing equipment, program maintenance,
BACKGROUND ART In order to perform tests and the like, a state history of when a program is executed is stored (hereinafter abbreviated as "trace"). In conventional program tracing methods, there are methods that store all steps executed by a program in a trace storage area, methods that trace the process of program execution within a certain address range within a certain program, and methods that store all steps executed by a program in a trace storage area. , there were some that traced only when a specific instruction was executed.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

然し、前記3つの方式は、トレース結果の記憶領域が限
られている為、全てのプログラム実行のトレースの記録
を残すことはできない。前記記録を残す為には、記録領
域を増加すればよいが、その場合ハードウェアの量が増
大してしまい、コストがかかる。つまり、前記のトレー
スの方式は、プログラムの部分的なトレースは可能であ
るが、プログラムの全体的な実行過程の認識が不可能で
あった。
However, in the above three methods, since the storage area for trace results is limited, it is not possible to leave trace records of all program executions. In order to leave the record, the recording area may be increased, but in this case the amount of hardware will increase and the cost will increase. In other words, although the above-mentioned tracing method allows partial tracing of a program, it is impossible to recognize the entire execution process of the program.

情報処理装置の動作を制御するプログラムに於いては、
ある動作が実行される時に、その一連の動作で、どのよ
うなプログラムルーチンで行われたか知ることが、プロ
グラムの保守、試験時に、要望されている。
In a program that controls the operation of an information processing device,
When maintaining or testing a program, it is desired to know what program routine was used in a series of operations when a certain operation is executed.

従って、本発明の目的は、プログラムの実行の全体的な
実行過程の把握が可能で、尚且つ、操作者が望む処理を
選択してトレースすることが可能な方式を提供すること
である。
Accordingly, an object of the present invention is to provide a method that allows an operator to grasp the entire execution process of a program, and also allows an operator to select and trace desired processing.

〔課題を解決する為の手段〕[Means to solve problems]

プログラムを識別する識別コードを有し、前記識別コー
ドを自らのプログラム内に格納しているプログラムルー
チンと、前記プログラムルーチンのトレース実行の条件
を記憶するトレース条件記憶手段と、前記プログラムル
ーチンの識別コードを記憶する識別コード記憶手段と、
前記プログラムルーチンが実行される時、前記プログラ
ムルーチンの識別コードと、前記トレース条件記憶手段
の内容を参照し、その内容に応じて、前記プログラムル
ーチンの識別コードを、前記識別コード記憶手段に記憶
するトレース処理ルーチンを設ける構成とする。
a program routine having an identification code for identifying a program and storing the identification code in its own program; a trace condition storage means for storing conditions for tracing execution of the program routine; and an identification code for the program routine. an identification code storage means for storing the
When the program routine is executed, the identification code of the program routine and the contents of the trace condition storage means are referred to, and the identification code of the program routine is stored in the identification code storage means according to the contents. The configuration includes a trace processing routine.

〔作用〕[Effect]

あるプログラムルーチンが実行される時、前記プログラ
ムは、トレース処理ルーチンに、前記プログラムの識別
コードを送る。トレース処理ルーチンはトレース制御レ
ジスタに記憶されたトレース条件と一致した時に、識別
コード記憶手段に前記プログラムルーチンの識別コード
を記憶する。
When a program routine is executed, the program sends the program's identification code to the trace processing routine. When the trace processing routine matches the trace condition stored in the trace control register, it stores the identification code of the program routine in the identification code storage means.

〔実施例] 第1図は、本発明の一実施例のブロック図である。1は
MPU、2はトレース制御レジスタ、3はトレース処理
ルーチン、4はトレース記憶領域。
[Embodiment] FIG. 1 is a block diagram of an embodiment of the present invention. 1 is an MPU, 2 is a trace control register, 3 is a trace processing routine, and 4 is a trace storage area.

5はプログラム記憶領域で、内部には幾つかのプログラ
ムルーチンが記憶されている。6はレジスタ、7は外部
記憶入力装置である。第2図は、第1図内のプログラム
記憶領域5に記憶されている各プログラムルーチンの内
容である。
5 is a program storage area in which several program routines are stored. 6 is a register, and 7 is an external storage input device. FIG. 2 shows the contents of each program routine stored in the program storage area 5 in FIG.

第1図中、プログラム記憶領域5の図は、各プログラム
ルーチンをグループ毎に分類し、各ルーチンに識別コー
ドを重複しないように割り当てたことを示す図である。
In FIG. 1, the diagram of the program storage area 5 is a diagram showing that each program routine is classified into groups and an identification code is assigned to each routine so as not to overlap.

各数字が識別コードである。Each number is an identification code.

ルーチン11が実行中、前記ルーチン11が呼び出すル
ーチンは、ルーチン21.22.23とする。また前記
ルーチン21.22.23が実行中呼び出すルーチンは
、ルーチン31,32,33゜34である。ルーチン1
1を第1グループルーチン、ルーチン21.22.23
を第2グループルーチン、ルーチン31,32.33.
34を第3グループルーチンとする。
While routine 11 is running, the routines called by routine 11 are routines 21, 22, and 23. Further, the routines that the routines 21, 22, and 23 call during execution are routines 31, 32, 33, and 34. Routine 1
1 as the first group routine, routine 21.22.23
as the second group routine, routines 31, 32, 33 .
34 is the third group routine.

トレース制御レジスタ2は、外部入力装置7から、操作
者が書き換え可能なレジスタで、トレースの条件を記憶
している。前記レジスタ2に“°01”が記憶されてい
る時は、実行された全てのルーチンの識別コードを記憶
する、“10”が記憶されている時は、第2グループル
ーチンの識別コードのみ記憶する。11”が記憶されて
いる時は、第3グループのルーチンの識別コードのみ記
憶するものとする。
The trace control register 2 is a register that can be rewritten by the operator from the external input device 7, and stores trace conditions. When "°01" is stored in the register 2, the identification codes of all executed routines are stored; when "10" is stored, only the identification code of the second group routine is stored. . 11'' is stored, only the identification code of the third group routine is stored.

以下、図面に従って、実施例を説明する。Examples will be described below with reference to the drawings.

さて、今、ルーチン11が実行中で、前記ルーチン11
の中で、ルーチン21を呼出、また、前記ルーチン21
が実行中に、ルーチン32を呼び出すものとする。その
後、ルーチン32の処理が完了で、ルーチン21に復帰
し、前記ルーチン21の処理完了で、ルーチン11に復
帰し、更に、ルーチン23を呼出、前記ルーチン23の
処理完了後、ルーチン11に復帰するものとする。
Now, routine 11 is being executed, and the routine 11
, the routine 21 is called, and the routine 21 is
Assume that routine 32 is called during execution. After that, when the process of routine 32 is completed, the process returns to routine 21, and when the process of routine 21 is completed, the process returns to routine 11, and further calls routine 23, and after completing the process of routine 23, returns to routine 11. shall be taken as a thing.

さて、前記の動作の場合のトレースを説明する。Now, tracing in the case of the above operation will be explained.

トレース制御レジスタ2には、“01”が記憶されてい
るものとする。この場合は、前記ルーチンの全ての識別
コードを記憶する。
It is assumed that "01" is stored in the trace control register 2. In this case, all identification codes of the routine are stored.

さて、ルーチン11が実行中に、ルーチン21を呼び出
したとする。前記ルーチン21のステップは第2図の様
になっている。まず、ルーチン21は、ルーチン21の
識別コードをレジスタ6に書き込む。レジスタ6には前
記ルーチンの識別コード、21が書き込まれる。その後
、トレース処理ルーチン3を呼び出す。トレース処理ル
ーチン3は、前記レジスタ6と、トレース制御レジスタ
2の内容を読み取り、トレース制御レジスタ2内のトレ
ース条件情報から識別コードの処理条件を判定する。こ
の場合は、全てのルーチンの識別コードを記憶する場合
なので、前記識別コード2工は、トレース記憶領域4に
記憶され、トレースは完了し、ルーチン21に戻る。 
その後、ルーチン21は、実行中に、ルーチン32を呼
び出すが、この場合も上記同様の処理が行われる。ルー
チン23が実行される時も同様である。以上、上記のよ
うなルーチンを実行した場合は、トレース記憶領域4に
は、21,32.23が記憶される。
Now, suppose that routine 21 is called while routine 11 is being executed. The steps of the routine 21 are as shown in FIG. First, the routine 21 writes the identification code of the routine 21 into the register 6. The identification code 21 of the routine is written into the register 6. After that, trace processing routine 3 is called. The trace processing routine 3 reads the contents of the register 6 and the trace control register 2, and determines the processing conditions for the identification code from the trace condition information in the trace control register 2. In this case, since the identification codes of all routines are to be stored, the second identification code is stored in the trace storage area 4, the tracing is completed, and the routine returns to the routine 21.
Thereafter, the routine 21 calls the routine 32 during execution, and the same processing as described above is performed in this case as well. The same applies when routine 23 is executed. As described above, when the above routine is executed, 21, 32, and 23 are stored in the trace storage area 4.

また、トレース制御レジスタ2に“10°゛が記憶され
ている時、つまり、第2グループルーチンの識別コード
のみ記憶する場合は、上記同様のルーチンを実行した場
合は、ルーチン32の実行時にはトレース処理ルーチン
3の処理で条件が一致しないので何もせずに、ルーチン
32に戻るため、トレース記憶領域4には、21.23
のみが記憶される。また、“11”の場合は32のみ記
憶される。
In addition, when "10°" is stored in trace control register 2, that is, when only the identification code of the second group routine is stored, and when a routine similar to the above is executed, trace processing is performed when routine 32 is executed. Since the conditions do not match in the processing of routine 3, the process returns to routine 32 without doing anything, so 21.23 is stored in trace storage area 4.
only is stored. Further, in the case of "11", only 32 is stored.

以上、実施例に従い本発明を説明した。実施例では、ル
ーチンのグループが3つの場合を例に上げて説明したが
、これに限るものでなく、グループの分けがたにこだわ
るものではない。
The present invention has been described above according to examples. Although the embodiment has been described using an example in which there are three routine groups, the present invention is not limited to this and is not limited to the classification of the groups.

この様に、本発明は、本発明の要旨に従い、種々の変形
が可能であり、本発明はそれらを排除するものではない
As described above, the present invention can be modified in various ways in accordance with the gist of the present invention, and the present invention does not exclude them.

〔効果] 本発明は、プログラムルーチンに識別コードを設け、ト
レース制御レジスタの情報により、トレースを行うかど
うか決定し、前記決定により、識別コードのみを記憶す
るので、トレース記憶情報が多く成らず、尚且つ、プロ
グラムの全体的な実行過程の認識が可能である。
[Effects] The present invention provides an identification code in the program routine, determines whether or not to perform tracing based on the information in the trace control register, and stores only the identification code based on the determination, so that the amount of trace storage information does not increase. Furthermore, it is possible to recognize the entire program execution process.

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

第1図は、本発明の一実施例のブロック図、第2図は、
第1図内のプログラム記憶領域5に記憶されているプロ
グラムルーチンの内容である。 1・・・MPU 2・・・トレース制御レジスタ トレース処理ルーチン トレース記憶領域 プログラム記憶領域 レジスタ 外部入力装置
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a block diagram of an embodiment of the present invention.
This is the content of the program routine stored in the program storage area 5 in FIG. 1...MPU 2...Trace control register Trace processing routine Trace storage area Program storage area register External input device

Claims (1)

【特許請求の範囲】 プログラムを識別する識別コードを有し、前記識別コー
ドを自らのプログラム内に格納しているプログラムルー
チンと、 前記プログラムルーチンのトレース実行の条件を記憶す
るトレース条件記憶手段(2)と、前記プログラムルー
チンの識別コードを記憶する識別コード記憶手段(4)
と、 前記プログラムルーチンが実行される時、前記プログラ
ムルーチンの識別コードと、前記トレース条件記憶手段
の内容を参照し、その結果に応じて、前記プログラムル
ーチンの識別コードを、前記識別コード記憶手段に識別
コードを記憶するトレース処理ルーチン(3)を有する
ことを特徴とするトレース決定方式。
[Scope of Claims] A program routine having an identification code for identifying the program and storing the identification code in its own program; and trace condition storage means (2) for storing conditions for tracing execution of the program routine. ), and identification code storage means (4) for storing an identification code of the program routine.
and when the program routine is executed, the identification code of the program routine and the contents of the trace condition storage means are referred to, and the identification code of the program routine is stored in the identification code storage means according to the result. A trace determination method comprising a trace processing routine (3) for storing an identification code.
JP63252511A 1988-10-06 1988-10-06 Trace decision system Pending JPH02100146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63252511A JPH02100146A (en) 1988-10-06 1988-10-06 Trace decision system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63252511A JPH02100146A (en) 1988-10-06 1988-10-06 Trace decision system

Publications (1)

Publication Number Publication Date
JPH02100146A true JPH02100146A (en) 1990-04-12

Family

ID=17238387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63252511A Pending JPH02100146A (en) 1988-10-06 1988-10-06 Trace decision system

Country Status (1)

Country Link
JP (1) JPH02100146A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04233637A (en) * 1990-07-13 1992-08-21 Internatl Business Mach Corp <Ibm> Apparatus and method for measuring instruction sampling
JPH08137716A (en) * 1994-11-07 1996-05-31 Nec Corp Program operation history management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04233637A (en) * 1990-07-13 1992-08-21 Internatl Business Mach Corp <Ibm> Apparatus and method for measuring instruction sampling
JPH08137716A (en) * 1994-11-07 1996-05-31 Nec Corp Program operation history management system

Similar Documents

Publication Publication Date Title
US5819024A (en) Fault analysis system
JPH02100146A (en) Trace decision system
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JPH03158937A (en) Program execution control system
JPH05297911A (en) Sequence control circuit for sequence controller
JPH05165680A (en) Memory operation tracing device
CN117112137A (en) Method, equipment and medium for initializing unidbg simulation execution environment
JP3012618B1 (en) Debugging method of inspected program and its debugging method
JPH0391845A (en) Automation system for analysis of duplicated fault
JPH02242444A (en) Debugging mechanism for information processor
JPH04167146A (en) Address tracing system for information processor
JPH04273342A (en) Fault area output system for software fault
JPS62196706A (en) Method for searching sequence number at high speed
JPS63276629A (en) Sorting system for record in file
JPH0239251A (en) Collection/display system for trouble information
JPH0264822A (en) Error detecting method for file processing
JPS6225340A (en) Inspection device
JPH05324731A (en) Retrieval processing system for data
JPH0468446A (en) Debugging supporting device
JPH08314755A (en) Trace information recording method
JPS61156339A (en) Trace processing system
JPH0683670A (en) Program test device
JPH0520089A (en) Assembly system
JPS61103256A (en) Memory system for state history
JPH02163842A (en) Program evaluating device for microcomputer