JPH03273346A - Dynamic call relation analyzing system by symbolic debugger - Google Patents

Dynamic call relation analyzing system by symbolic debugger

Info

Publication number
JPH03273346A
JPH03273346A JP2073068A JP7306890A JPH03273346A JP H03273346 A JPH03273346 A JP H03273346A JP 2073068 A JP2073068 A JP 2073068A JP 7306890 A JP7306890 A JP 7306890A JP H03273346 A JPH03273346 A JP H03273346A
Authority
JP
Japan
Prior art keywords
subroutines
unit
call
call relationship
calling
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
JP2073068A
Other languages
Japanese (ja)
Inventor
Tsugukazu Shibata
柴田 次一
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 JP2073068A priority Critical patent/JPH03273346A/en
Publication of JPH03273346A publication Critical patent/JPH03273346A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To take out call relation at an arbitrary time point with the small amount of information by integrating a stack analysis part, call relation analysis part, table processing part, table output part and table into a symbolic debugger. CONSTITUTION:The call relation analysis part 9 takes out the call relation between sub routines, which is observed from the sub routine generating interruption, from the stack analysis part 8. Next, the call relation is simplified by adding any special mark to the sub routine under retroactive calling. Afterwards, when the call relation is already registered to the call relation table 12, control is returned to a command execution part 4. According to an instruction from the execution part 4, the call relation table output part 11 outputs the call relation between the sub routines from an executed result output part 5 while referring to the table 12. Thus, the call relation between the sub routines is dynamically analyzed and taken out at the arbitrary time point with the small amount of information.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理システムにおいてプログラムのソース
レベルでのデバッグ作業に使用するシンポリックデバッ
ガに関し、特に入力データによってプログラムのサブル
ーチン(メインルーチンを含む、以下同様)間の呼出し
関係が変化するような状況でサブルーチン間の呼出し関
係を動的に解析するシンポリンクデバフガによる動的呼
出し関係解析方式に間する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a symbolic debugger used for debugging a program at the source level in an information processing system, and in particular to a symbolic debugger used for debugging a program at the source level in an information processing system. We will use a dynamic call relationship analysis method using a sympolink debuffer that dynamically analyzes the call relationship between subroutines in situations where the call relationship between subroutines changes.

〔従来の技術〕[Conventional technology]

従来、利用者プログラムでのサブルーチン間の呼出し関
係は、利用者プログラムを作成した利用者が把握してい
る場合が多かったので、デバッグの分野では扱われるこ
とが少なかった。しかし、利用者プログラムが大規模に
なるにつれてサブルーチンの数が増え、サブルーチン間
の呼出し関係を利用者が把握することは困難になってき
ている。
Conventionally, the calling relationships between subroutines in a user program were often known to the user who created the user program, and therefore were rarely handled in the field of debugging. However, as user programs become larger in size, the number of subroutines increases, making it difficult for users to understand the calling relationships between subroutines.

従来、このような問題の解決方法として、プログラムの
静的解析による方法があった。1つの方法は、プログラ
ムを構成するすべてのソースプログラムを入力してサブ
ルーチンの呼出し命令(CALL命令)を解析すること
によりサブルーチン間の呼出し関係を表示するものであ
る。
Conventionally, a method for solving such problems has been based on static analysis of programs. One method is to display the calling relationships between subroutines by inputting all source programs constituting the program and analyzing subroutine calling instructions (CALL instructions).

また、もう1つの方法は、プログラムを構成するすべて
のオブジェクトプログラムを入力してリンクすることに
よりサブルーチン間の呼出し関係を表示する方法である
Another method is to display the calling relationships between subroutines by inputting and linking all object programs that make up the program.

一方、デバッガにより動的にプログラム中の各サブルー
チンの先頭にブレークポイントを設定して制御がブレー
クポイントに到達するごとにサブルーチン名を表示する
という動的なトレースの方法もある。
On the other hand, there is also a dynamic tracing method in which a debugger dynamically sets a breakpoint at the beginning of each subroutine in the program and displays the subroutine name each time control reaches the breakpoint.

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

上述した従来の呼出し関係解析方法は、ソースプログラ
ムを入力してサブルーチンの呼出し命令を解析すること
によりサブルーチン間の呼出し関係を表示する方法では
、プログラムの静的な呼出し関係が解析できるだけなの
で、プログラムの入力データによって呼び出されるサブ
ルーチンが変更されるようなサブルーチン間の動的な呼
出し関係の解析を行うことができないという欠点がある
The conventional call relationship analysis method described above displays the call relationships between subroutines by inputting the source program and analyzing the subroutine call instructions, but it is only possible to analyze the static call relationships of the program. This method has the disadvantage that it is not possible to analyze dynamic calling relationships between subroutines in which the called subroutines are changed depending on input data.

また、オブジェクトプログラムを入力してリンクするこ
とによりサブルーチン間の呼出し関係を表示する方法で
も、ソースプログラムのサブルーチンの呼出し命令を解
析する場合と同様に、プログラムの静的な呼出し関係が
解析できるだけなので、プログラムの入力データによっ
て呼び出されるサブルーチンが変更されるようなサブル
ーチン間の動的な呼出し間係の解析を行うことができな
いという欠点がある。
In addition, the method of displaying the calling relationships between subroutines by inputting and linking an object program allows you to analyze the static calling relationships of a program in the same way as when analyzing subroutine calling instructions in a source program. This method has the disadvantage that it is not possible to dynamically analyze call relationships between subroutines in which the called subroutines are changed depending on program input data.

一方、デバフガにより動的にプログラム中の各サブルー
チンの先頭にブレークポイントを設定して制御がブレー
クポイントに到達するごとにサブルーチン名を表示する
という動的なトレースの方法では、サブルーチンが再帰
的(υカーンブ)に呼ばれていた場合には、何回も呼び
出されるサブルーチンについてもそのすべてがトレース
されてしまうので、表示されるサブルーチン名の情報量
が多くなって使いにくく、サブルーチン間の呼出し関係
を調べるという面では機能が不足しているという欠点が
ある。
On the other hand, in a dynamic tracing method in which a breakpoint is dynamically set at the beginning of each subroutine in the program using a debuffer and the subroutine name is displayed each time control reaches the breakpoint, subroutines are recursively (υ If the subroutine is called by a subroutine, all of the subroutines that are called many times will be traced, so the amount of information displayed for the subroutine name will be large, making it difficult to use, and checking the calling relationships between subroutines. The drawback is that it lacks functionality.

本発明の目的は、上述の点に鑑み、プログラムにおける
サブルーチン間の呼出し関係を動的に解析し、サブルー
チン間の呼出し関係を任意の時点でかつ少ない情報量で
利用者が知ることができるよ゛うにしたシンポリフクデ
バンガによる動的呼出し関係解析方式を提供することに
ある。
In view of the above-mentioned points, an object of the present invention is to dynamically analyze the calling relationships between subroutines in a program, and to enable a user to know the calling relationships between subroutines at any time and with a small amount of information. The purpose of this invention is to provide a dynamic call relationship analysis method using a simple Fuku debanger.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のシンポリンクデバフガによる動的呼出し関係解
析方式は、デバッグのためのコマンドを入力するコマン
ド入力部と、このコマンド入力部により入力されたコマ
ンドを処理するコマンド実行部と、このコマンド実行部
からの指示によりシンボル情報とプログラムのメモリア
ドレスとを相互に変換するシンボル情報変換部と、前記
コマンド実行部からの指示によりプログラムにブレーク
ポイントを設定する割込み処理部と、前記コマンド実行
部による実行結果を出力する実行結果出力部とを備え、
プログラムのソースレベルでのデバッグを可能とするシ
ンポリフクデバフガにおいて、プログラムで割込みが発
生したときにサブルーチン間の呼出し関係の情報を採取
する目的で設定されたブレークポイントで発生した割込
みであるがどうかを判定する前記コマンド実行部と、こ
のコマンド実行部によりサブルーチン間の呼出し関係の
情報を採取する目的で設定されたブレークポイントで発
生した割込みであると判定された場合に前記シンボル情
報変換部により割込みが発生したアドレスに基づいて処
理が停止したサブルーチンのサブルーチン名を調べ当該
サフ゛ルーチンのスタックから戻りアドレスを取り出し
て呼出し元のサブルーチン名を認識し、これを呼出し元
のサブルーチンがなくなるまで繰り返すことにより割込
みが発生したサブルーチンから見たサブルーチン間の呼
出し関係を取り出すスタック解析部と、このスタック解
析部により取り出されたサブルーチン間の呼出し関係を
再帰的に呼び出されているサブルーチンについて簡略化
する呼出し関係解析部と、この呼出し関係解析部により
簡略化されたサブルーチン間の呼出し関係を呼出し関係
テーブルに登録する呼出し関係テーブル処理部と、前記
コマンド実行部からの指示により前記呼出し関係テーブ
ルを参照してサブルーチン間の呼出し間係を前記実行結
果出力部により出力する呼出し関係テーブル出力部とを
有する。
The dynamic call relationship analysis method using the sympolink debuffer of the present invention consists of a command input section for inputting commands for debugging, a command execution section for processing commands input by this command input section, and a command execution section for processing commands input by this command input section. a symbol information conversion unit that mutually converts symbol information and a memory address of the program according to instructions from the command execution unit; an interrupt processing unit that sets breakpoints in the program according to instructions from the command execution unit; and execution results by the command execution unit. Equipped with an execution result output section that outputs
In Simpoly Fuku Debugger, which enables debugging of programs at the source level, this is an interrupt that occurs at a breakpoint that is set for the purpose of collecting information about calls between subroutines when an interrupt occurs in a program. The command execution unit determines whether the interrupt is a Based on the address where the interrupt occurred, check the subroutine name of the subroutine whose processing has stopped, extract the return address from the stack of the subroutine, recognize the calling subroutine name, and repeat this process until there are no more calling subroutines. a stack analysis unit that extracts the calling relationship between subroutines as seen from the subroutine in which the error occurred, and a call relationship analysis unit that simplifies the calling relationship between the subroutines extracted by the stack analysis unit for subroutines that are recursively called. , a call relationship table processing unit that registers the call relationship between subroutines simplified by the call relationship analysis unit in a call relationship table; and a call relationship table processing unit that refers to the call relationship table according to instructions from the command execution unit and processes calls between subroutines. and a call relationship table output section for outputting the relationship information by the execution result output section.

〔作用〕[Effect]

本発明のシンポリンクデバフガによる動的呼出し関係解
析方式では、コマンド実行部がプログラムで割込みが発
生したときにサブルーチン間の呼出し間係の情報を採取
する目的で設定されたブレークポイントで発生した割込
みであるかどうかを判定し、スタック解析部がコマンド
実行部によりサブルーチン間の呼出し関係の情報を採取
する目的で設定されたブレークポイントで発生した割込
みであると判定された場合にシンボル情報変換部により
割込みが発生したアドレスに基づいて処理が停止したサ
ブルーチンのサブルーチン名を調べ当該サフ゛ルーチン
のスタックから戻りアドレスを取り出して呼出し元のサ
ブルーチン名を認識し、これを呼出し元のサブルーチン
がなくなるまで繰り返すことにより割込みが発生したサ
ブルーチンから見たサブルーチン間の呼出し関係を取り
出し、呼出し関係解析部がスタック解析部により取り出
されたサブルーチン間の呼出し関係を再帰的に呼び出さ
れているサブルーチンについて簡略化し、呼出し関係テ
ーブル処理部が呼出し関係解析部により簡略化されたサ
ブルーチン間の呼出し関係を呼出し関係テーブルに登録
し、呼出し関係テーブル出力部がコマンド実行部からの
指示により呼出し関係テーブルを参照してサブルーチン
間の呼出し関係を実行結果出力部により出力する。
In the dynamic call relationship analysis method using the sympolink debuffer of the present invention, the command execution section uses interrupts that occur at breakpoints that are set for the purpose of collecting information about call relationships between subroutines when an interrupt occurs in a program. If the stack analysis unit determines that the interrupt occurred at a breakpoint set by the command execution unit for the purpose of collecting information about calls between subroutines, the symbol information conversion unit Based on the address where the interrupt occurred, check the subroutine name of the subroutine whose processing has stopped, extract the return address from the stack of the subroutine, recognize the calling subroutine name, and repeat this process until there are no more calling subroutines. The calling relationship between subroutines as seen from the subroutine where the error occurred is extracted, and the calling relationship analysis unit simplifies the calling relationship between the subroutines extracted by the stack analysis unit for subroutines that are recursively called, and the calling relationship table processing unit The call relationship analysis unit registers the simplified call relationships between subroutines in the call relationship table, and the call relationship table output unit refers to the call relationship table according to instructions from the command execution unit and executes the call relationships between subroutines. Output by the result output section.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1FjJは、本発明の一実施例に係る動的呼出し関係
解析方式が適用されたシンポリンクデバフガ1の構成を
示すブロック図である。このシンポリックデバソガ1は
、主制御部2と、コマンド入力部3と、コマンド実行部
4と、実行結果出力部5と、シンボル情報変換部6と、
割込み処理部7と、スタック解析部8と、呼出し関係解
析部9と、呼出し関係テーブル処理部10と、呼出し関
係テーブル出力部11と、呼出し関係テーブル12とを
含んで構成されている。なお、符号13は端末装置、1
4はシステム入力ファイル(以下、5YsINフアイル
と略記する)、15はシステム出力ファイル(以下、5
YSOUTフアイルと略記する)、16は複数のサブル
ーチンを含む利用者プログラムをそれぞれ示す。
A first FjJ is a block diagram showing the configuration of a sympolink debuffer 1 to which a dynamic call relationship analysis method according to an embodiment of the present invention is applied. This symbolic devasoga 1 includes a main control section 2, a command input section 3, a command execution section 4, an execution result output section 5, a symbol information conversion section 6,
It is configured to include an interrupt processing section 7, a stack analysis section 8, a call relation analysis section 9, a call relation table processing section 10, a call relation table output section 11, and a call relation table 12. In addition, the code 13 is a terminal device, 1
4 is a system input file (hereinafter abbreviated as 5YsIN file), 15 is a system output file (hereinafter referred to as 5YsIN file).
(abbreviated as YSOUT file) and 16 each indicate a user program including a plurality of subroutines.

次に、このように構成された本実施例のシンポリンクデ
バソガによる動的呼出し関係解析方式の動作について説
明する。
Next, the operation of the dynamic call relationship analysis method using the sympolink devasoga of this embodiment configured as described above will be explained.

利用者の指定によりシンポリフクデバンガ1が起動され
ると、主制御部2が最初に動作し、利用者プログラム1
6をメモリ (図示せず)上にロードする。利用者プロ
グラム16のロードが終了すると、主制御部2は、コマ
ンド入力部3に制御を渡す。
When the Simpoly Fuku debanger 1 is started according to the user's specifications, the main control unit 2 operates first, and the user program 1
6 into memory (not shown). When the loading of the user program 16 is completed, the main control section 2 passes control to the command input section 3.

コマンド入力部3ば、端末袋213または5YSINフ
アイル14よりデバッグのためのコマンドを入力し、主
制御部2に渡す。
The command input unit 3 inputs commands for debugging from the terminal bag 213 or the 5YSIN file 14 and passes them to the main control unit 2.

主制御部2は、コマンド入力部3から受は取ったコマン
ドをコマンド実行部4に渡す。
The main control section 2 passes the command received from the command input section 3 to the command execution section 4.

コマンド実行部4は、主制御部2から渡されたコマンド
がブレークポイントの設定を指示するものであった場合
には、シンボル情報変換部6を使用して行番号などのシ
ンボル情報を利用者プログラム16のメモリアドレスに
変換し、割込み処理部7を使用して利用者プログラム1
6にブレークポイントを設定する。
If the command passed from the main control unit 2 instructs the setting of a breakpoint, the command execution unit 4 uses the symbol information conversion unit 6 to convert symbol information such as line numbers into the user program. 16 memory address, and uses the interrupt processing unit 7 to execute the user program 1.
Set a breakpoint at 6.

また、コマンド実行部4は、主制御部2から渡されたコ
マンドが利用者プログラム16のもつ変数の内容の参照
を指示するものであった場合には、シンボル情報変換部
6を使用して変数名などのシンボル情報を利用者プログ
ラムI6のメモIJア1ルスに変換し、利用者プログラ
ム16のメモリをアクセスして変数の内容を取り出し編
集した後に、実行結果出力部5により端末装置13また
は5ySOUTフアイル15に変数の内容を出力する。
In addition, if the command passed from the main control unit 2 is an instruction to refer to the contents of a variable held by the user program 16, the command execution unit 4 uses the symbol information conversion unit 6 to convert the variable After converting the symbol information such as name into the memo IJA1 of the user program I6 and accessing the memory of the user program 16 to extract and edit the contents of the variables, the execution result output unit 5 outputs the terminal device 13 or 5ySOUT. The contents of the variables are output to the file 15.

さらに、コマンド実行部4は、主制御部2から渡された
コマンドが利用者プログラム16の実行を指示するもの
であった場合には、割込み処理部7を使用して利用者プ
ログラム16を動作させる。
Furthermore, if the command passed from the main control unit 2 is an instruction to execute the user program 16, the command execution unit 4 uses the interrupt processing unit 7 to operate the user program 16. .

利用者プログラム16が実行され、あらかじめ設定して
おいたブレークポイントに到達すると、利用者プログラ
ム16に割込みが発生して割込み処理部7に制御が移る
When the user program 16 is executed and reaches a breakpoint set in advance, an interrupt occurs in the user program 16 and control is transferred to the interrupt processing section 7.

割込み処理部7は、コマンド実行部4にブレークポイン
トに到達したことを通知する。
The interrupt processing unit 7 notifies the command execution unit 4 that the breakpoint has been reached.

コマンド実行部4は、実行結果出力部5により端末装置
13または5YSOUTフアイル15にデバッグのため
のコマンドの入力促進メツセージを出力し、コマンドの
入力を待機する。
The command execution unit 4 outputs a command input prompting message for debugging to the terminal device 13 or the 5YSOUT file 15 through the execution result output unit 5, and waits for command input.

端末装置13または5YSINフアイル14からサブル
ーチン間の呼出し関係の情報の採取を指示するコマンド
が入力されると、主制御部2は、コマンド入力部3を介
してコマンドを受は取ってコマンド実行部4に渡す。
When a command instructing the collection of information related to calls between subroutines is input from the terminal device 13 or the 5YSIN file 14, the main control unit 2 receives the command via the command input unit 3 and executes the command execution unit 4. give it to

コマンド実行部4は、主制御部2からサブルーチン間の
呼出し関係の情報の採取を指示するコマンド′を受は取
ると、シンボル情報変換部6を使用して利用者プログラ
ム16中のすべてのサブルーチンのサブルーチン名をシ
ンボル情報として利用者プログラム16のメモリアドレ
スに変換し、割込み処理部7を使用して利用者プログラ
ム16中に含まれるすべてのサブルーチンの先頭にブレ
ークポイントを設定する。
When the command execution unit 4 receives a command 'instructing to collect information on call relationships between subroutines from the main control unit 2, it uses the symbol information conversion unit 6 to convert all subroutines in the user program 16. The subroutine name is converted into a memory address of the user program 16 as symbol information, and break points are set at the beginnings of all subroutines included in the user program 16 using the interrupt processing unit 7.

この後、端末装置13から利用者プログラム16の動作
を指示するコマンドが投入されると、コマンド実行部4
および割込み処理部7を介して利用者プログラム16の
動作が再開される。そして、サブルーチンの先頭で割込
みが発生すると、利用者プログラム16から割込み処理
部7に制御が移る。
Thereafter, when a command instructing the operation of the user program 16 is input from the terminal device 13, the command execution unit 4
Then, the operation of the user program 16 is restarted via the interrupt processing section 7. When an interrupt occurs at the beginning of the subroutine, control is transferred from the user program 16 to the interrupt processing section 7.

割込み処理部7は、コマンド実行部4にブレークポイン
トに到達したことを通知する。
The interrupt processing unit 7 notifies the command execution unit 4 that the breakpoint has been reached.

コマンド実行部4は、割込み処理部7がらの通知を受け
、割込みが発生したアドレスに基づいてサブルーチン間
の呼出し関係の情報を採取するためのブレークポイント
で割込みが発生したことを認識し、スタック解析部8に
制御を渡す。
The command execution unit 4 receives the notification from the interrupt processing unit 7, recognizes that an interrupt has occurred at a breakpoint for collecting information on call relationships between subroutines based on the address where the interrupt has occurred, and performs stack analysis. Control is passed to section 8.

スタック解析部8は、シンボル情報変換部6を使用して
割込みが発生したアドレスに基づいて利用者プログラム
16の処理が停止したサブルーチンのサブルーチン名を
利用者プログラム16に存在するシンボル情報から取り
出す0次に、スタック解析部8は、割込みが発生したサ
ブルーチンを呼び出したサブルーチンのアドレスとして
利用者プログラム16の割込みが発生したサブルーチン
のスタック内から戻りアドレスを取り出し、シンボル情
報変換部6を使用して呼出し元のサブルーチンのサブル
ーチン名に変換する。スタック解析部8は、上述の処理
を繰り返し、呼び出されたサブルーチンのスタック内の
戻りアドレスがら呼出し元のサブルーチン名を順次得て
、割込みが発生したサブルーチンから見たサブルーチン
間の呼出し関係を取り出す、そして、呼出し元のサブル
ーチンがなくなると、スタック解析部8は、呼出し関係
解析部9に制御を渡す。
The stack analysis unit 8 uses the symbol information conversion unit 6 to extract the subroutine name of the subroutine in which the processing of the user program 16 has stopped from the symbol information existing in the user program 16 based on the address where the interrupt occurred. Then, the stack analyzer 8 extracts the return address from the stack of the subroutine in which the interrupt occurred in the user program 16 as the address of the subroutine that called the subroutine in which the interrupt occurred, and uses the symbol information converter 6 to extract the return address from the stack of the subroutine that called the subroutine in which the interrupt occurred. Convert subroutine name to subroutine name. The stack analysis unit 8 repeats the above process, sequentially obtains the calling subroutine name from the return address in the stack of the called subroutine, and extracts the calling relationship between the subroutines from the perspective of the subroutine in which the interrupt has occurred. , when the calling subroutine disappears, the stack analysis section 8 passes control to the call relationship analysis section 9.

呼出し関係解析部9は、スタック解析部8から割込みが
発生したサブルーチンから見たサブルーチン間の呼出し
関係をパラメータとして受は取り、まず再帰的に呼び出
されているサブルーチンがあるかどうかを調べる。再帰
的に呼び出されているサブルーチンがある場合には、再
帰的に呼び出されているサブルーチンに特別な目印を付
加し、サブルーチン間の呼出し関係を簡略化する0次に
、呼出し関係解析部9は、呼出し関係テーブル12を参
照して現在処理しているサブルーチン間の呼出し関係が
呼出し関係テーブル12にすでに登録されているかどう
かを調べる。現在処理しているサブルーチン間の呼出し
関係が呼出し関係テーブル12にすでに登録されていれ
ば、呼出し関係解析部9は、コマンド実行部4に制御を
戻す、現在処理しているサブルーチン間の呼出し関係が
呼出し関係テーブル12に登録されていなければ、呼出
し関係解析部9は、呼出し関係テーブル処理部10に制
御を移す。
The call relationship analysis unit 9 receives as a parameter the call relationship between subroutines as seen from the subroutine in which the interrupt has occurred from the stack analysis unit 8, and first checks whether there is a subroutine that is called recursively. If there is a subroutine that is called recursively, the call relationship analysis unit 9 adds a special mark to the subroutine that is called recursively and simplifies the call relationship between the subroutines. The calling relationship table 12 is referred to to check whether the calling relationship between the subroutines currently being processed has already been registered in the calling relationship table 12. If the calling relationship between the subroutines currently being processed has already been registered in the calling relationship table 12, the calling relationship analysis unit 9 returns control to the command execution unit 4. If it is not registered in the call relationship table 12, the call relationship analysis unit 9 transfers control to the call relationship table processing unit 10.

呼出し関係テーブル処理部10ば、呼出し関係テーブル
12にサブルーチン間の呼出し間係を登録してコマンド
実行部4に制御を戻す。
The call relationship table processing unit 10 registers call relationships between subroutines in the call relationship table 12 and returns control to the command execution unit 4.

また、コマンド実行部4は、主制御部2から渡されたコ
マンドがサブルーチン間の呼出し関係の表示を指示する
ものであった場合には、呼出し関係テーブル出力部11
に制御を移す。
In addition, if the command passed from the main control unit 2 is an instruction to display the calling relationship between subroutines, the command execution unit 4 outputs a call relationship table output unit 11.
transfer control to

呼出し関係テーブル出力部11は、呼出し関係テーブル
12からサブルーチン間の呼出し関係を取り出し編集し
て実行結果出力部5により端末装置13または5YSU
OUTフアイル15に出力する。この際、呼出し間係テ
ーブル出力部11は、再帰的に呼び出されているサブル
ーチンについてはリスト中に特別な印を付加する。この
後、呼出し関係テーブル出力部11は、コマンド実行部
4に制御を戻す。
A call relationship table output unit 11 extracts and edits the call relationships between subroutines from a call relationship table 12, and outputs the results to the terminal device 13 or 5YSU by the execution result output unit 5.
Output to OUT file 15. At this time, the call relationship table output unit 11 adds a special mark to the list for subroutines that are recursively called. Thereafter, the call relationship table output unit 11 returns control to the command execution unit 4.

次に、第2図+al〜fd)を参照しながら、スタック
解析部8.呼出し関係解析部9および呼出し関係テーブ
ル処理部10の処理をより具体的に説明する。
Next, referring to FIG. 2+al to fd), stack analysis unit 8. The processing of the call relationship analysis section 9 and the call relationship table processing section 10 will be explained in more detail.

スタック解析部8は、割込みが発生したサブルーチンX
を呼び出したサブルーチンを呼び出した順に順次たどっ
て第2図fatに示すサブルーチン間の呼出し関係を取
り出す。
The stack analysis unit 8 analyzes the subroutine X in which the interrupt occurred.
The subroutines that called the subroutines are traced in the order in which they were called, and the calling relationship between the subroutines shown in FIG. 2 fat is extracted.

次に、呼出し関係解析部9は、スタック解析部8により
取り出された第2図(alに示すサブルーチン間の呼出
し関係を入力し、再帰的に呼び出されているサブルーチ
ン2およびYについて目印を付加し、第2図(blに示
すようなサブルーチン間の呼出し関係に簡略化する。続
いて、呼出し関係解析部9は、第2図(b)に示すよう
なサブルーチン間の呼出し関係が第2図[C)に示すよ
うな呼出し関係テーブル12にすでに登録されているサ
ブルーチン間の呼出し関係に対して登録可能であるかど
うかを調べ、第2図(′b)のうちのサブルーチンZ以
下の呼出し関係を第2図(C1のサブルーチンG以下に
登録することを決定する。
Next, the call relationship analysis unit 9 inputs the call relationship between the subroutines shown in FIG. , the calling relationship between the subroutines as shown in FIG. Check whether the calling relationships between subroutines already registered in the calling relationship table 12 as shown in C) can be registered, and check the calling relationships below subroutine Z in FIG. 2('b). FIG. 2 (It is decided to register below subroutine G of C1.

続いて、呼出し関係テーブル処理部1oは、第2図世)
のうちのサブルーチンZ以下の呼出し関係を第2図(C
1のサブルーチンG以下に登録する。この結果、呼出し
関係テーブル12の内容は、第2図fd+に示すような
サブルーチン間の呼出し関係となる。
Subsequently, the call relation table processing unit 1o (see Figure 2)
The calling relationship below subroutine Z is shown in Figure 2 (C
It is registered below subroutine G of 1. As a result, the contents of the calling relationship table 12 become the calling relationships between subroutines as shown in FIG. 2 fd+.

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

以上説明したように本発明は、シンポリンクデバフガに
スタック解析部、呼出し関係解析部、呼出し関係テーブ
ル処理部、呼出し関係テーブル出刃部および呼出し関係
テーブルを組み込むようにしたことにより、利用者がサ
ブルーチン間の呼出し関係の情報を任意の時点で動的に
取り出すことができるようになるという効果がある。
As explained above, the present invention incorporates a stack analysis section, a call relation analysis section, a call relation table processing section, a call relation table cutting section, and a call relation table into a sympolink debuffer, thereby allowing the user to perform subroutines. This has the effect of making it possible to dynamically retrieve information on the call relationships between them at any time.

また、プログラムで処理するデータの値を変えながらサ
ブルーチン間の呼出し関係を動的に調べることが可能に
なるという効果がある。
Another advantage is that it becomes possible to dynamically examine the calling relationships between subroutines while changing the values of data processed by the program.

さらに、再帰的に呼び出されるサブルーチンについては
、サブルーチン間の呼出し関係を簡略化して少ない情報
量で取り出すことができるようになるという効果がある
Furthermore, for subroutines that are called recursively, the calling relationship between subroutines can be simplified and the amount of information can be retrieved with a small amount.

以上のことにより、プログラムのデバッグ作業の効率が
格段的に向上するという効果がある。
The above has the effect of dramatically improving the efficiency of program debugging work.

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

第1図は本発明の一実施例に係る動的呼出し関係解析方
式が適用されたシンポリフクデバソガの構成を示すブロ
ック図、 第2図(al〜(司は第1図中のスタック解析部、呼出
し関係解析部および呼出し関係テーブル処理部の処理を
説明するための図である。 図において、 1・・・シンポリンクデバソガ、 2・・・主制御部、 3・・・コマンド入力部、 4・・・コマンド実行部、 5・・・実行結果出力部、 6・・・シンボル情報変換部、 7・・・割込み処理部、 8・・・スタック解析部、 9 ・ ・ 10 ・ 11 ・ l 2 ・ 13 ・ 14 ・ l 5 ・ l 6 ・ 呼出し関係解析部、 呼出し関係テーブル処理部、 呼出し関係テーブル出力部、 呼出し関係テーブル、 端末装置、 SYS INファイル、 5YSOUTフアイル、 利用者プログラムである。
FIG. 1 is a block diagram showing the configuration of Simpoly Fuku Devasoga to which the dynamic call relationship analysis method according to an embodiment of the present invention is applied; It is a diagram for explaining the processing of the call relationship analysis unit, the call relationship analysis unit, and the call relationship table processing unit. , 4... Command execution section, 5... Execution result output section, 6... Symbol information conversion section, 7... Interrupt processing section, 8... Stack analysis section, 9.. . 10. 11. l2, 13, 14, l5, l6 - Calling relationship analysis unit, calling relationship table processing unit, calling relationship table output unit, calling relationship table, terminal device, SYS IN file, 5YSOUT file, user program.

Claims (1)

【特許請求の範囲】 デバッグのためのコマンドを入力するコマンド入力部と
、このコマンド入力部により入力されたコマンドを処理
するコマンド実行部と、このコマンド実行部からの指示
によりシンボル情報とプログラムのメモリアドレスとを
相互に変換するシンボル情報変換部と、前記コマンド実
行部からの指示によりプログラムにブレークポイントを
設定する割込み処理部と、前記コマンド実行部による実
行結果を出力する実行結果出力部とを備え、プログラム
のソースレベルでのデバッグを可能とするシンボリック
デバッガにおいて、 プログラムで割込みが発生したときにサブルーチン間の
呼出し関係の情報を採取する目的で設定されたブレーク
ポイントで発生した割込みであるかどうかを判定する前
記コマンド実行部と、このコマンド実行部によりサブル
ーチン間の呼出し関係の情報を採取する目的で設定され
たブレークポイントで発生した割込みであると判定され
た場合に前記シンボル情報変換部により割込みが発生し
たアドレスに基づいて処理が停止したサブルーチンのサ
ブルーチン名を調べ当該サブルーチンのスタックから戻
りアドレスを取り出して呼出し元のサブルーチン名を認
識し、これを呼出し元のサブルーチンがなくなるまで繰
り返すことにより割込みが発生したサブルーチンから見
たサブルーチン間の呼出し関係を取り出すスタック解析
部と、 このスタック解析部により取り出されたサブルーチン間
の呼出し関係を再帰的に呼び出されているサブルーチン
について簡略化する呼出し関係解析部と、 この呼出し関係解析部により簡略化されたサブルーチン
間の呼出し関係を呼出し関係テーブルに登録する呼出し
関係テーブル処理部と、 前記コマンド実行部からの指示により前記呼出し関係テ
ーブルを参照してサブルーチン間の呼出し関係を前記実
行結果出力部により出力する呼出し関係テーブル出力部
と を有することを特徴とするシンボリックデバッガによる
動的呼出し関係解析方式。
[Scope of Claims] A command input section for inputting commands for debugging, a command execution section for processing commands input by the command input section, and a memory for storing symbol information and programs according to instructions from the command execution section. a symbol information conversion unit that converts the addresses and the like; an interrupt processing unit that sets breakpoints in the program according to instructions from the command execution unit; and an execution result output unit that outputs the results of execution by the command execution unit. , in a symbolic debugger that enables debugging of programs at the source level, when an interrupt occurs in a program, it is possible to check whether the interrupt occurred at a breakpoint set for the purpose of collecting information on call relationships between subroutines. The command execution unit makes the determination, and the symbol information conversion unit handles the interrupt when it is determined by the command execution unit that the interrupt has occurred at a breakpoint set for the purpose of collecting information on call relationships between subroutines. An interrupt is generated by checking the subroutine name of the subroutine whose processing has stopped based on the generated address, extracting the return address from the stack of the relevant subroutine, recognizing the calling subroutine name, and repeating this process until there are no more calling subroutines. a stack analysis section that extracts calling relationships between subroutines as seen from the subroutines that are called; a call relationship analysis section that simplifies the calling relationships between subroutines extracted by this stack analysis section for subroutines that are recursively called; a call relationship table processing unit that registers the call relationship between subroutines simplified by the call relationship analysis unit in a call relationship table; and a call relationship table processing unit that refers to the call relationship table according to instructions from the command execution unit to determine the call relationship between subroutines. A dynamic call relationship analysis method using a symbolic debugger, comprising: a call relationship table output unit outputted by the execution result output unit.
JP2073068A 1990-03-22 1990-03-22 Dynamic call relation analyzing system by symbolic debugger Pending JPH03273346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2073068A JPH03273346A (en) 1990-03-22 1990-03-22 Dynamic call relation analyzing system by symbolic debugger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2073068A JPH03273346A (en) 1990-03-22 1990-03-22 Dynamic call relation analyzing system by symbolic debugger

Publications (1)

Publication Number Publication Date
JPH03273346A true JPH03273346A (en) 1991-12-04

Family

ID=13507654

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2073068A Pending JPH03273346A (en) 1990-03-22 1990-03-22 Dynamic call relation analyzing system by symbolic debugger

Country Status (1)

Country Link
JP (1) JPH03273346A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263336A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Executing route output method for recurrent call
JPH09179753A (en) * 1995-12-26 1997-07-11 Nec Software Ltd Stack information collecting system using timing of return processing
WO2005029328A1 (en) * 2003-09-18 2005-03-31 Denki Hompo Ltd. Operating system and recording medium containing the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263336A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Executing route output method for recurrent call
JPH09179753A (en) * 1995-12-26 1997-07-11 Nec Software Ltd Stack information collecting system using timing of return processing
WO2005029328A1 (en) * 2003-09-18 2005-03-31 Denki Hompo Ltd. Operating system and recording medium containing the same

Similar Documents

Publication Publication Date Title
US5218605A (en) Software modules for testing computer hardware and software
CN108228173B (en) Visual data interface development system and method
JP4737624B2 (en) Specific work support system for application failure causes
JPH03273346A (en) Dynamic call relation analyzing system by symbolic debugger
JP2811804B2 (en) Variable output range specification method
JP6983976B2 (en) Code reading support device, code reading support method, and code reading support program
JP6790199B2 (en) Code reading support device, code reading support method, and code reading support program
JPH06250889A (en) Fault processing system in data processing system
CN115794595A (en) Visual programming debugging method, device, storage medium and device
JPH06242943A (en) Source code level debugging device
JP3006499B2 (en) Function trace method of symbolic debugger
JPH07319730A (en) Test debugging method
JP2001134468A (en) Device and method for testing gui program test
JPH034336A (en) Program debug processor
JPH0264747A (en) Function trace/step trace switching control system
CN115705287A (en) Shell terminal implementation method, device and medium based on no operating system
JPH02247742A (en) Test program forming processing system
JPS63640A (en) Execution control system for partial unit of data flow
JPH11272500A (en) Debug method and debug device for the same and program storage medium
JPH06250876A (en) Interactive debugging supporting system
JPS63259735A (en) Program debug system by program diagram in actual operating environment of program
KR940015798A (en) How to Configure, Send, and Extract Normalized Command Information Messages Between User Registration Software and Application Software
JPS61131124A (en) Conversation input processing system
JPH04270425A (en) Program debugging device
JPH04160651A (en) General purpose file utility