JPS59221753A - Subroutine tracer - Google Patents

Subroutine tracer

Info

Publication number
JPS59221753A
JPS59221753A JP58095645A JP9564583A JPS59221753A JP S59221753 A JPS59221753 A JP S59221753A JP 58095645 A JP58095645 A JP 58095645A JP 9564583 A JP9564583 A JP 9564583A JP S59221753 A JPS59221753 A JP S59221753A
Authority
JP
Japan
Prior art keywords
subroutine
block
name
trace
collected
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
JP58095645A
Other languages
Japanese (ja)
Inventor
Yukio Katane
片根 幸男
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.)
Hitachi Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Engineering Co Ltd
Hitachi 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 Hitachi Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Engineering Co Ltd
Priority to JP58095645A priority Critical patent/JPS59221753A/en
Publication of JPS59221753A publication Critical patent/JPS59221753A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To shorten the time needed for debugging by collecting the parameters which are delivered when the control is shifted to a slave subroutine from a master subroutine. CONSTITUTION:A subroutine name (block A1) which called out a trace routine and its master subroutine name (block A2) are collected together with the contents (block A3) of the parameter which is shifted to the slave subroutine from the master subroutine. Then the subroutine name collected by the block A1 is collated with the trace subroutine name in trace management table TMT to decide a trace designated subroutine. If the coincidence is obtained from said collation, the subroutine name collected by the block A1 is collated with the break subroutine name in the table TMT. If a break subroutine name is decided, it is decided whether the contents of the parameters collected by the block A3 are coincident with the break conditions set at the TMT. Then the processing is forcibly discontinued when the coincidence is obtained.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はデータ処理システムのプログラム動作シーケン
スを容易に把握できる情報を収集するトレー丈に係ム特
に、動作シーケンスが複雑となる大規模なデータ処理シ
ステムに好適なサブルーチントレーサに関する。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a tray length for collecting information that allows easy understanding of the program operation sequence of a data processing system. This invention relates to a subroutine tracer suitable for the system.

〔発明の背景〕[Background of the invention]

プログラムの論理的ミスは、サブルーチン間で引渡され
るデータ(パラメータ)やサブルーチン間の共通エリア
(コモン)を介して伝搬されることが知られている。従
って、プログラムの動作不良時にその不具合箇所を児つ
け出すためには、あらかじめ、プログラム作成時に、各
サブルーチン単位に、これらのデータを印字するロジッ
ク(例えば、WRITE文)を挿入しておくことが一番
の早道である。しかし、この方法では、プログラム規模
が大きくなると、多大な労力が必要なこと、また、印字
量がぼり大になるなどの問題がある。
It is known that logical errors in programs are propagated through data (parameters) passed between subroutines and common areas (commons) between subroutines. Therefore, in order to identify the problem when a program malfunctions, it is a good idea to insert logic (for example, a WRITE statement) to print this data in each subroutine when creating the program. This is the quickest route. However, this method has problems such as requiring a great deal of labor and increasing the amount of printing when the scale of the program increases.

そこで、従来は、プログラムの動作不良が発生してから
、その原因究明のために、一時的なロジックを挿入する
方法を用いることが多く、デバッグ効率や保守効率を低
下させる一因となっていた。
Therefore, in the past, a method was often used to insert temporary logic in order to investigate the cause of a malfunction in a program after it occurred, which was one of the causes of reduced debugging and maintenance efficiency. .

〔発明の目的〕[Purpose of the invention]

本発明の目的は、データ処理システムにおけるプログラ
ムの動作シーケンスを把握できるtff報を収集し、プ
ログラムの動作不良時に、その原因追求を容易にするサ
ブルーチントレーサを提供するにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a subroutine tracer that collects TFF information that can grasp the operating sequence of a program in a data processing system, and facilitates finding the cause of a program malfunction.

〔発明の概要〕[Summary of the invention]

本発明の要点は、簡単な手続きで、トレース機能をサブ
ルーチン単位にもたせ、情報収集するすブルーチンの指
定、収集情報出力機器の指定、ブレイクサブルーチン及
びブレイク条件の設定など全可能とした柔軟性のあるサ
ブルーチントレーサにある。
The main point of the present invention is to provide a trace function for each subroutine using a simple procedure, and to provide flexibility that allows all functions such as specifying a subroutine to collect information, specifying a collected information output device, and setting break subroutines and break conditions. It's in the subroutine tracer.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を図を用いて説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図に本発明の実施例におけるフローアヤート自動作
図システムの構成図を示す。本システム2は、入力解析
装置2人、論理解析装置2B、及び配置作図装置2Cで
構成され、ソースプログラム1を入力データとして、フ
ローナヤート3に自動変換するものである。
FIG. 1 shows a configuration diagram of a flow chart automatic drawing system according to an embodiment of the present invention. This system 2 is composed of two input analyzers, a logic analyzer 2B, and a layout drawing device 2C, and automatically converts a source program 1 into a flownayat 3 as input data.

第2図は各装置2A、2B、2Cに内蔵されているプロ
グラムの態様を示す。この図では、メインプログラムM
の中でサブルーチンS1がコールされ、更に、Slの中
からサブルーチンS2゜S3がコールされていることを
表わしている。今、仮に、サブルーチンSl内のP点に
プログラムの論理ミスが潜在していると、形をかえなが
らサブルーチン82.83に伝搬され、例えば、メイン
プログラムのM内のQ点などで不具合が露出したシする
。一般に、不具合の潜在箇所と露出箇所が離れれば離れ
る程、原因追求が困難となる。そこで本発明tよ、親ナ
ブルーチンから子サブルーチンに制御が移る時に引渡さ
れるデータ(パラメータ)内容全収集しておくことによ
り、プログラムの不具合箇所を切り分けようとするもの
である。
FIG. 2 shows an aspect of the program built into each device 2A, 2B, and 2C. In this figure, the main program M
This shows that the subroutine S1 is called within the subroutine S1, and the subroutines S2 and S3 are called from within the subroutine S1. Now, if there is a logic error in the program latent at point P in subroutine SL, it will be propagated to subroutine 82.83 in a different form, and the defect will be exposed at point Q in M of the main program, for example. I will do it. In general, the further apart the potential location of the defect is from the exposed location, the more difficult it becomes to trace the cause. Therefore, the present invention attempts to isolate the problem in the program by collecting all data (parameters) that are passed when control is transferred from a parent subroutine to a child subroutine.

第3図はサブルーチントレーザの1吏用法及びトレース
ルーチンの処理概要を示す。これは、各リーブルーチン
の入口でトレースルーチンを単に呼出すだけ(パラメー
タ不要)で、プログラムの動作シーケンス及び走行環境
を把握するのに有効な情報を収集できること?示し−〔
いる。
FIG. 3 shows how to use the subroutine tracer and outlines the processing of the trace routine. Does this mean that by simply calling the trace routine at the entrance of each leave routine (no parameters required), it is possible to collect information useful for understanding the program's operating sequence and running environment? Show - [
There is.

トレースルーチン内でハ、マス、トレースルーチンを呼
出したサブルーチン名(ブロックAI)とその親サブル
ーチン名(ブロックA2)=、(収集し、更に、親から
子のサブルーチンへ渡されたパラメータ内容(ブロック
A3)を収集する。
In the trace routine, the name of the subroutine that called the trace routine (block AI) and the name of its parent subroutine (block A2) =, (collected, and the contents of parameters passed from the parent to the child subroutine (block A3) ) to collect.

すなわち、どのサブルーチン(親)からどのサブルーチ
ン(子)に制御が移ったか、また、その時のパラメータ
内容はどのような値であったかを収集する。なお、これ
らのデータは、大型計算機のトレースバック・ユーティ
リティが用いている手法と同様に、プログラムの実行時
にモニタが使用するレジスタ退避領域内のアドレスを利
用することにより収集可能であり、既知の技術である。
That is, it collects which subroutine (parent) to which subroutine (child) control was transferred, and what values the parameters were at that time. Note that this data can be collected by using addresses in the register save area used by the monitor during program execution, similar to the method used by traceback utilities for large computers, and using known techniques. It is.

サブルーチントレーサは、この後に特徴をもっており、
第4図に示すT M T (TraCe Manage
 −ment Ta1)Ie )に従って、第3図の次
の処理を行なう。
The subroutine tracer has the following characteristics,
TMT (TraCe Management) shown in FIG.
-ment Ta1)Ie), perform the following processing in FIG.

(1)  ブロックA1で収集したサブルーチン名を、
TMTテーブル中のトレースサブルーチン名とつき会せ
、トレース指定サブルーチンか否かを判定する。(ブロ
ックBl) (2)上記(1)の結果、トレース指定サブルーチンで
あれば、ブロックA1〜A3で収集した悄−J&を視覚
的に見易い形に編集し、TMTテーブルにセットされて
いる出力機器へ出力する。(ブロックB2) (3)  次に、ブロックA1で収集したサブルーチン
名e、TMTテーブル中のブレイクサブルーチン名とつ
き合せ、ブレイク指定サブルーチンか否かを列置する。
(1) Subroutine name collected in block A1,
Check the trace subroutine name in the TMT table and determine whether it is a trace specified subroutine. (Block Bl) (2) As a result of (1) above, if it is a trace specification subroutine, edit the E-J& collected in blocks A1 to A3 into a visually easy-to-read format, and use the output device set in the TMT table. Output to. (Block B2) (3) Next, the subroutine name e collected in block A1 is matched with the break subroutine name in the TMT table to determine whether it is a break specified subroutine or not.

(ブロックCI) (4)上記(3)の結果、ブレイク指定サブルーチンで
あれば、更に、ブロックA3で収集したパラメータ内容
とTMTテーブルにセットされているブレイク条件が合
致するか否かを判定する。
(Block CI) (4) As a result of (3) above, if it is a break specification subroutine, it is further determined whether or not the parameter contents collected in block A3 match the break conditions set in the TMT table.

(ブロックC2) (5)上記(3)、 (4)の結果、ブレイク条件にす
べて合致する時は処理を強制停止する。(ブロックC3
) ここで、TMTテーブルへの情報設足はプログラム実行
前に任意にできるので、デバッグの進渉状況に応じて、
出力機器をラインプリンタやディスクに切シかえたシ、
トレースするサブルーチン全増減させたシ、また、ブレ
イク条件を設定して推定不具合が発生したら即処理を停
止きせるなど、柔軟性のあるデバッグを行なうことがで
きる。
(Block C2) (5) As a result of (3) and (4) above, if all break conditions are met, the process is forcibly stopped. (Block C3
) Here, information can be added to the TMT table arbitrarily before program execution, so depending on the progress of debugging,
If you change the output device to a line printer or disk,
You can perform flexible debugging by increasing or decreasing the number of traced subroutines, or by setting break conditions to immediately stop processing when a presumed problem occurs.

また、プログラム完成後は、トレースルーチンをダミー
化することにより、実行時間への影#をほとんど皆無に
することができる。
Further, after the program is completed, by making the trace routine a dummy, it is possible to almost completely eliminate any impact on the execution time.

実際のサブルーチントレース出力例及びタイムチャート
を第5図に示す。
An example of an actual subroutine trace output and a time chart are shown in FIG.

本発明の一実施例によれば、従来、不具合が発生してか
らその原因究明用のデータを収集するためのWRITE
文を挿入するなどの後手のデバッグから、簡単な手続き
で、常時、プログラムの走行軌跡や走行環境をディスク
に蓄積しておき、不具合があればそのデータを取出して
解析するなどの先手のデバッグに転換できるので、プロ
グラムの開発効率やメンテナンス効率向上に大きく貢献
する。
According to an embodiment of the present invention, conventionally, WRITE is used to collect data for investigating the cause of a problem after it occurs.
From reactive debugging such as inserting statements, to proactive debugging such as constantly storing the program's running trajectory and running environment on disk using simple procedures, and extracting and analyzing the data if a problem occurs. Since it can be converted, it greatly contributes to improving the efficiency of program development and maintenance.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、データ処理システムにおけるプログラ
ムの複雑な動作シーケンス及びその走行環境を容易に把
握できる情報を収集できるので、プログラムの不具合発
生時の原因追求に効果がある。
According to the present invention, it is possible to collect information that allows easy understanding of the complex operation sequence of a program in a data processing system and its running environment, which is effective in finding the cause when a program malfunction occurs.

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

第1図は本発明一実施例のフローチャート自動作図シス
テムの構成図、第2図は第1図の各装置に内蔵されてい
るプログラムの態様図、第3図は本発明のサブルーチン
トレーサの使用手順図、第4図はサブルーチントレーザ
で用いるTMTテーブルの内容図、第5図はサブルーチ
ントレーサ出力例(a)及びタイムチャート(b)であ
る。 1・・・ソースプログラム、2・・・フローチャート自
動瑳1 口 久 苓2図 茅 4区 芽50 (0−) 斧I  CALLl:DBY(M)  38  CAL
LSr(E、t2o、o、 −to)斧’ 2  C/
ILLE()BY (Sl    74   CALL
  δZ(/、!;、o)*−2CALLEE)BY(
Sl)     E2    CALL  δ3 く−
4,2,3)(Jン (−4・′・5〕; 国王二廻          し−1
Fig. 1 is a configuration diagram of an automatic flowchart drawing system according to an embodiment of the present invention, Fig. 2 is a diagram of the program built in each device in Fig. 1, and Fig. 3 is a procedure for using the subroutine tracer of the present invention. 4 is a content diagram of the TMT table used in the subroutine tracer, and FIG. 5 is an example of the subroutine tracer output (a) and a time chart (b). 1... Source program, 2... Flowchart automatic glue 1 Kuchikurei 2 fig. 4 Ku Me 50 (0-) Ax I CALLl: DBY (M) 38 CAL
LSr(E, t2o, o, -to)ax' 2 C/
ILLE()BY(Sl 74 CALL
δZ(/,!;,o)*-2CALLEE)BY(
Sl) E2 CALL δ3 Ku-
4, 2, 3) (Jn (-4・'・5);King's second turn -1

Claims (1)

【特許請求の範囲】 1、単一機能をもつ多くのサブルーチンを有機的に結合
させて目的とする処理を実行させるデータ処理システム
におい−て、 前記サブルーチン単位にトレース機能を持たせることを
特徴とするサブルーチントレーサ。
[Claims] 1. A data processing system that organically combines many subroutines with a single function to execute a target process, characterized in that each of the subroutines has a tracing function. Subroutine tracer.
JP58095645A 1983-06-01 1983-06-01 Subroutine tracer Pending JPS59221753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58095645A JPS59221753A (en) 1983-06-01 1983-06-01 Subroutine tracer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58095645A JPS59221753A (en) 1983-06-01 1983-06-01 Subroutine tracer

Publications (1)

Publication Number Publication Date
JPS59221753A true JPS59221753A (en) 1984-12-13

Family

ID=14143239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58095645A Pending JPS59221753A (en) 1983-06-01 1983-06-01 Subroutine tracer

Country Status (1)

Country Link
JP (1) JPS59221753A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204749A (en) * 1985-01-31 1986-09-10 Yokogawa Hewlett Packard Ltd Software operation analyzing device
JPH01177644A (en) * 1988-01-08 1989-07-13 Nec Corp Debugging device
JPH08314765A (en) * 1995-05-15 1996-11-29 Nec Corp Debug information collecting system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204749A (en) * 1985-01-31 1986-09-10 Yokogawa Hewlett Packard Ltd Software operation analyzing device
JPH0833845B2 (en) * 1985-01-31 1996-03-29 ヒューレット・パッカード・カンパニー Software motion analyzer
JPH01177644A (en) * 1988-01-08 1989-07-13 Nec Corp Debugging device
JPH08314765A (en) * 1995-05-15 1996-11-29 Nec Corp Debug information collecting system

Similar Documents

Publication Publication Date Title
CN105808438A (en) Test case reuse method based on function call path
JPS59221753A (en) Subroutine tracer
JPS62113244A (en) Program test device
JPH03241439A (en) Test data preparation tool
JPH06236295A (en) Program transplant supporting system
CN109308183A (en) A kind of reverse tool method towards VLIW chip executable code
JPH02307129A (en) Setting/deleting system for snap id output sentence
JP3183228B2 (en) Program debugging device and debugging method
JPH02220145A (en) Program tracing system
JPH01261735A (en) Debugging device for distributed processing program
JPH05250221A (en) Simulator execution system
JPS63289654A (en) Program branching instruction monitoring system
JPH081609B2 (en) Method of determining test cases for preventing regression
JPH02219136A (en) Bug inspection method in program modification
JPH06101045B2 (en) Data flow type information processing device simulation device
Kaplan Some debugging strategies for assembler-based minicomputer operating systems
JPS59151247A (en) Testing device of information processing device
JPS6123255A (en) Collection method for fault analysis information of program
JPH07319730A (en) Test debugging method
Richards Developing design aids for an integrated software development system
JPH0322146A (en) Microprogram control device
JPS6365542A (en) Debugging system
JPH0540662A (en) Simulation method for computer program
Grems et al. Diagnostic techniques improve reliability
JPH0324638A (en) Routine tracing device