JPH07152578A - Detection of maximum stack usage quantity - Google Patents

Detection of maximum stack usage quantity

Info

Publication number
JPH07152578A
JPH07152578A JP5298342A JP29834293A JPH07152578A JP H07152578 A JPH07152578 A JP H07152578A JP 5298342 A JP5298342 A JP 5298342A JP 29834293 A JP29834293 A JP 29834293A JP H07152578 A JPH07152578 A JP H07152578A
Authority
JP
Japan
Prior art keywords
function
stack
program
usage
maximum
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
JP5298342A
Other languages
Japanese (ja)
Inventor
Fumihiko Fujita
史彦 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP5298342A priority Critical patent/JPH07152578A/en
Publication of JPH07152578A publication Critical patent/JPH07152578A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To detect a maximum quantity of usage of a stack without actually executing a program by obtaining correlations between the quantity of usage of the stack for each function in the program and this function and successively integrating quantities of usage of the stack for respective functions based on obtained correlations by a maximum usage quantity detecting means. CONSTITUTION:An operator inputs a source program from a keyboard 2 by keys and compiles it, and the object program of the source program is stored in a memory 3. Next, a maximum stack usage quantity detection processing is started, and the object program stored in the memory 3 is referred to retrieve the quantity of acquisition of the stack used for the function designated by a specific instruction at the beginning of each function processing, thereby obtaining correlations between each function and the quantity of usage of the stack tar this function. Quantities of usage of the stack for respective functions are successively integrated based on obtained correlations to obtain a maximum value at the quantity of usage of the stack, and it is displayed on a display device 4. Thus, the maximum quantity of usage of the stack is surely and easily detected.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プログラム実行時に必
要とするスタック使用量の最大値を求める最大スタック
使用量検出方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a maximum stack usage amount detecting method for obtaining the maximum value of the stack usage amount required when executing a program.

【0002】[0002]

【従来の技術】従来、プログラム実行時に、予め設定し
た使用可能なスタックサイズ以上のスタックを使用した
場合には、予めその実行環境に設けられた、ハード的、
又はソフト的なスタックオーバーフロー検出機能によっ
て、スタックオーバーフローを検出するようになされて
いる。
2. Description of the Related Art Conventionally, when a stack having a preset usable stack size or more is used at the time of executing a program, it is necessary to use a hardware provided in the execution environment in advance.
Alternatively, a soft stack overflow detection function is used to detect a stack overflow.

【0003】そして、例えば、サブルーチンからなる関
数を複数呼び出しているプログラムに対し、スタックオ
ーバーフローを生じるか否かを判定する場合には、実際
に対象プログラムを起動させ、予め設定されている使用
可能スタックサイズ以上のスタックを使用した時点で、
予め実行環境に設けられたオーバーフロー検出機能によ
って、オーバーフローを検出するようになされている。
Then, for example, in the case of determining whether or not stack overflow occurs in a program that calls a plurality of functions consisting of subroutines, the target program is actually activated and a preset usable stack is set. When you use a stack of size or more,
Overflow is detected by an overflow detection function provided in the execution environment in advance.

【0004】そして、このオーバーフロー検出機能で
は、実際に実行した複数の関数の実行経路についてのオ
ーバーフローの検出のみを行っているため、対象プログ
ラムの全ての実行経路についてスタックの使用量が許容
範囲内にあるかを検査する場合には、全ての実行経路に
ついて実際に処理を実行させ、スタックオーバーフロー
の検出を行うようになされている。
Since the overflow detection function only detects the overflow of the execution paths of a plurality of actually executed functions, the stack usage amount is within the allowable range for all execution paths of the target program. In the case of checking whether there is any, the process is actually executed for all the execution paths, and the stack overflow is detected.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記従
来のオーバーフロー検出方式においては、対象プログラ
ムを実行させるための実行環境に、予め、スタックオー
バーフローを検出する機能を設けておく必要があるとい
う問題がある。また、スタックオーバーフローの検出を
行うためには、対象プログラムを実際に動作させること
が必要なため、その実行環境を整える必要がある。さら
にその動作中に実行した関数の実行経路についてのみの
スタック使用量の検出が行われるため、対象プログラム
について、スタックオーバーフローが生じるか否かを判
定するためには、全ての実行経路について実際に動作を
実行させ、そのスタック使用量の検出を行う必要があ
る。そのため、プログラム動作パラメータを適宜変更さ
せる等の操作を行う必要があるが、一般的に、外部から
の変更可能なパラメータの操作だけでは実行不可能な経
路が存在するため、対象プログラムの全実行経路を実行
することは時間的にも、技術的にも非常に困難であると
いう未解決の課題がある。
However, the above-mentioned conventional overflow detection method has a problem that the execution environment for executing the target program must be provided with a function for detecting stack overflow in advance. . Further, in order to detect the stack overflow, it is necessary to actually operate the target program, so it is necessary to prepare the execution environment thereof. Furthermore, since the stack usage amount is detected only for the execution paths of the functions executed during the operation, in order to judge whether the stack overflow occurs for the target program, the actual operation for all execution paths is performed. Must be executed and the stack usage must be detected. Therefore, it is necessary to perform operations such as changing the program operation parameters as appropriate, but in general, there is a path that cannot be executed only by operating the parameters that can be changed from the outside. There is an unsolved problem that it is very difficult in terms of time and technology to execute.

【0006】そこで、この発明は、上記従来の未解決の
課題に着目してなされたものであり、プログラムを実際
に実行させることなく、スタックの最大使用量を検出す
ることの可能な最大スタック使用量検出方式を提供する
ことを目的としている。
Therefore, the present invention has been made by paying attention to the above-mentioned unsolved problems of the prior art, and it is possible to detect the maximum stack usage without actually executing a program. The purpose is to provide a quantity detection method.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明に関わる最大スタック使用量検出方式におい
ては、検出対象プログラムのオブジェクトプログラムに
対し相関関係解析手段によって特定のアセンブラ言語コ
ードを検索し、検索した特定のアセンブラ言語コードを
解析してプログラム中の各関数のスタック使用量と各関
数の相関関係とを求め、最大使用量検出手段によって前
記相関関係解析手段で求めた相関関係をもとにスタック
使用量を積算してスタック使用量の最大値を求めること
を特徴としている。
In order to achieve the above object, in the maximum stack usage amount detection method according to the present invention, a specific assembler language code is searched for by the correlation analysis means for the object program of the detection target program. Then, the searched specific assembler language code is analyzed to obtain the stack usage amount of each function in the program and the correlation of each function, and the correlation determined by the correlation analysis unit by the maximum usage amount detection unit is also calculated. It is characterized in that the stack usage amount is added to and to obtain the maximum stack usage value.

【0008】[0008]

【作用】本発明においては、相関関係解析手段によって
スタック使用量の検出を行うプログラムのオブジェクト
プログラムに対し、各関数のスタック使用量を指定する
特定のアセンブラ言語コードを検索し、検索したアセン
ブラ言語コードを解析してプログラム中の各関数と、各
関数のスタック使用量と、各関数の相関関係とを求め、
求めた相関関係に基づいて最大使用量検出手段により、
各関数のスタック使用量を順次積算してスタック使用量
の最大値を求める。
In the present invention, the object program of the program for detecting the stack usage amount by the correlation analysis means is searched for a specific assembler language code designating the stack usage amount of each function, and the searched assembler language code is searched. To obtain each function in the program, stack usage of each function, and correlation of each function,
By the maximum usage detection means based on the obtained correlation,
The stack usage of each function is sequentially added up to obtain the maximum stack usage.

【0009】[0009]

【実施例】以下に、本発明の実施例を説明する。図1
は、本発明による最大スタック使用量検出方式を適用し
た計算機システムの概略構成図である。図中、1は、演
算処理装置であって、演算処理装置1は、インタフェー
ス部5を介してキーボード2から入力される指令に基づ
いてメモリ3に格納された処理プログラムを実行し、処
理結果をCRTディスプレイ等の表示装置4に表示す
る。
EXAMPLES Examples of the present invention will be described below. Figure 1
FIG. 3 is a schematic configuration diagram of a computer system to which the maximum stack usage amount detection method according to the present invention is applied. In the figure, reference numeral 1 is an arithmetic processing unit, and the arithmetic processing unit 1 executes a processing program stored in a memory 3 based on a command input from a keyboard 2 via an interface unit 5, and displays a processing result. It is displayed on the display device 4 such as a CRT display.

【0010】また、演算処理装置1は、キーボード2か
らの指令に基づいて、キーボード2から入力されたソー
スプログラムをコンパイルしてメモリ3に格納し、格納
したアセンブラ言語からなるオブジェクトプログラムを
もとに、オブジェクトプログラムで使用する関数と各関
数のスタック使用量と各関数の相関関係とを求め、これ
らをもとにスタック最大使用量を求める。
Further, the arithmetic processing unit 1 compiles a source program input from the keyboard 2 based on a command from the keyboard 2 and stores it in the memory 3, and based on the stored assembler language object program. Then, the function used in the object program, the stack usage of each function, and the correlation between the functions are obtained, and the maximum stack usage is obtained based on these.

【0011】図2は、最大スタック使用量検出時の演算
処理装置1の処理手順を示すフローチャートである。こ
こで、予め、メモリ3には、最大スタック使用量の検出
対象プログラムのオブジェクトプログラムが格納されて
いるものとする。まず、ステップS1において、メモリ
3に格納されたオブジェクトプログラムを参照し、全て
の関数処理の先頭で指定されているその関数で使用する
スタック使用量の獲得を指示する特定のアセンブラ言語
コードを検索することによって、オブジェクトプログラ
ム内の全関数と各関数のスタック使用量と各関数の相関
関係を求め、例えば、図3に示すような相関関係図を作
成する。
FIG. 2 is a flowchart showing the processing procedure of the arithmetic processing unit 1 when the maximum stack usage amount is detected. Here, it is assumed that the object program of the maximum stack usage amount detection target program is stored in the memory 3 in advance. First, in step S1, the object program stored in the memory 3 is referenced to search for a specific assembler language code that instructs acquisition of the stack usage amount used in the function specified at the beginning of all function processing. By doing so, the correlation between all the functions in the object program, the stack usage of each function, and each function is obtained, and, for example, a correlation diagram as shown in FIG. 3 is created.

【0012】次いで、ステップS2に移行し、求めた相
関関係図に基づいて、メインとなる関数から順に、親関
数のスタック使用量と、その親関数が呼び出す子関数の
スタック使用量とを加算し、呼び出す子関数がなくなる
まで各関数のスタック使用量を順次加算して加算値Xを
求め、ステップS3に移行する。ステップS3では、加
算値Xが、最大値XMAX より大きいか否かを判定し、加
算値Xが最大値XMAX よりも大きい場合には、ステップ
S4に移行し、加算値Xが最大値XMAX よりも大きくな
い場合には、ステップS5に移行する。
Next, in step S2, the stack usage amount of the parent function and the stack usage amount of the child function called by the parent function are added in order from the main function based on the obtained correlation diagram. , The stack usage amount of each function is sequentially added until there is no child function to call, and the added value X is obtained, and the process proceeds to step S3. In step S3, the addition value X is determined whether or not greater than the maximum value X MAX, if the addition value X is larger than the maximum value X MAX, the process proceeds to step S4, the addition value X is the maximum value X If it is not larger than MAX , the process proceeds to step S5.

【0013】そして、ステップS4では、最大値XMAX
を加算値Xの値に更新した後、ステップS5に移行す
る。ステップS5では、最終関数に親関数があるか否か
を判定し、親関数がある場合にはステップS6に移行
し、ステップS6では、加算値Xから最終関数のスタッ
ク使用量を減算してステップS7に移行する。
Then, in step S4, the maximum value X MAX
Is updated to the value of addition value X, and then the process proceeds to step S5. In step S5, it is determined whether or not the final function has a parent function, and if there is a parent function, the process proceeds to step S6. In step S6, the stack usage amount of the final function is subtracted from the addition value X The process proceeds to S7.

【0014】そして、ステップS7において、最終関数
の親関数には最終関数以外に子関数があるか否かを判定
し、他に子関数がない場合にはステップS8に移行し、
最終関数の親関数を新たに最終関数とした後ステップS
5に戻る。一方、ステップS7で、最終関数の親関数に
最終関数の他に子関数がある場合にはステップS9に移
行し、ステップS9では、最終関数の他の子関数に対し
てスタック使用量の解析処理を行ったか否かを判定し、
スタック使用量の解析処理を行った場合にはステップS
8に移行し、行っていない場合にはステップS10に移
行する。
Then, in step S7, it is determined whether or not the parent function of the final function has a child function other than the final function. If there is no other child function, the process proceeds to step S8.
After making the parent function of the final function a new final function, step S
Return to 5. On the other hand, in step S7, if the parent function of the final function has a child function in addition to the final function, the process proceeds to step S9, and in step S9, the stack usage analysis process is performed for the other child functions of the final function. Determine whether or not
When the stack usage analysis processing is performed, step S
8, and if not, the process proceeds to step S10.

【0015】ステップS10では、相関関係に基づいて
最終関数の他の子関数から順に呼び出す子関数がなくな
るまで、そのスタック使用量を加算値Xに加算し、そし
て、ステップS3に戻る。一方、ステップS5で、最終
関数に親関数がない場合には、ステップS11に移行
し、最大値XMAX を最大スタック使用量として、表示装
置4に表示する。
In step S10, the stack usage amount is added to the addition value X until there are no child functions to be called in sequence from the other child functions of the final function based on the correlation, and the process returns to step S3. On the other hand, if there is no parent function in the final function in step S5, the process proceeds to step S11, and the maximum value X MAX is displayed on the display device 4 as the maximum stack usage amount.

【0016】ここで、ステップS1が相関関係解析手段
に対応し、ステップS2〜S11が最大使用量検出手段
に対応している。したがって、例えば、今、Pというプ
ログラムを作成し、このプログラムPの最大スタック使
用量を検出するものとする。オペレータはキーボード2
からソースプログラムSPをキー入力し、これをコンパ
イルする。これによって、ソースプログラムSPのオブ
ジェクトプログラムOPがメモリ3に格納され、続い
て、オペレータが最大スタック使用量の検出処理を起動
させると、メモリ3に格納したオブジェクトプログラム
OPを参照し、各関数処理の先頭に特定命令で指定され
た該関数で使用するスタック獲得量を検索することによ
って、各関数とその関数で使用するスタック使用量と各
関数の相関関係を求める。
Here, step S1 corresponds to the correlation analysis means, and steps S2 to S11 correspond to the maximum usage amount detection means. Therefore, for example, it is assumed that a program P is created now and the maximum stack usage of this program P is detected. Operator is keyboard 2
The source program SP is keyed in from and the program is compiled. As a result, the object program OP of the source program SP is stored in the memory 3, and when the operator subsequently activates the detection processing of the maximum stack usage amount, the object program OP stored in the memory 3 is referred to and By searching the stack acquisition amount used in the function specified by the specific instruction at the head, the correlation between each function and the stack usage amount used in the function and each function is obtained.

【0017】そして、例えば、プログラムP内の関数
が、図4に示すように、関数MAIN、関数A、関数
B、関数C、関数Dであり、そのスタック使用量が、そ
れぞれ、Sm、Sa、Sb、Sc、Sdであるものと
し、各関数の相関関係が、図3に示すように、関数MA
INが、子関数として、関数A及び関数Bを有し、さら
に、関数Aが子関数として、関数C及び関数Dを有する
ものとする。
Then, for example, as shown in FIG. 4, the functions in the program P are a function MAIN, a function A, a function B, a function C and a function D, and their stack usage amounts are Sm, Sa and Sa, respectively. Sb, Sc, Sd, and the correlation of each function is as shown in FIG.
It is assumed that IN has the functions A and B as child functions, and the function A has the functions C and D as child functions.

【0018】そして、図3の相関関係図に基づいて、関
数MAINから、順に、関数MAIN、関数A、関数C
の順に各スタック使用量を加算し、加算値X=Sm+S
a+Scとなる。ここで、最大値XMAX は、初期状態X
MAX =0であり、加算値X>最大値XMAX であるので、
最大値XMAX =Sm+Sa+Scとなる。そして、最後
に加算したスタック使用量Scを有する関数Cが最終関
数となり、最終関数のスタック使用量Scを加算値Xか
ら減算し、加算値XはX=Sm+Saとなる。続いて、
最終関数である関数Cの親関数である関数Aは、子関数
として関数Cと関数Dとを有しているので、加算値Xに
関数Dのスタック使用量Sdを加算し、関数Dには子関
数がないので、加算値Xは、X=Sm+Sa+Sdとな
る。
Then, based on the correlation diagram of FIG. 3, from the function MAIN, the function MAIN, the function A, and the function C in this order.
The stack usage is added in the order of, and the added value X = Sm + S
It becomes a + Sc. Here, the maximum value X MAX is the initial state X
Since MAX = 0 and the added value X> the maximum value X MAX ,
The maximum value X MAX = Sm + Sa + Sc. Then, the function C having the stack usage amount Sc added last becomes the final function, and the stack usage amount Sc of the final function is subtracted from the addition value X, and the addition value X becomes X = Sm + Sa. continue,
Since the function A, which is the parent function of the function C that is the final function, has the functions C and D as child functions, the stack usage Sd of the function D is added to the addition value X, and the function D has Since there is no child function, the added value X is X = Sm + Sa + Sd.

【0019】そして、この加算値X(=Sm+Sa+S
d)>最大値XMAX (=Sm+Sa+Sc)であるもの
とすると、最大値XMAX を加算値Xの値に更新してX
MAX =Sm+Sa+Sdとし、続いて、加算値Xから最
終関数である関数Dのスタック使用量Sdを減算し、加
算値Xは、X=Sm+Saとなり、最終関数の親関数で
ある関数Aの子関数、関数C及びDに対して処理を行っ
たので、関数Aを新たに最終関数とする。
The added value X (= Sm + Sa + S
d)> maximum value X MAX (= Sm + Sa + Sc), the maximum value X MAX is updated to the value of addition value X and X
MAX = Sm + Sa + Sd, then the stack usage amount Sd of the final function D is subtracted from the additional value X, the additional value X becomes X = Sm + Sa, and the child function of the parent function of the final function A, Since the functions C and D have been processed, the function A is newly set as the final function.

【0020】そして、関数Aには、親関数として関数M
AINがあるので、加算値X(=Sm+Sa)から関数
Aのスタック使用量Saを減算し、これにより、加算値
Xは、X=Smとなる。ここで、関数Aの親関数である
関数MAINは、関数Aの他に子関数として関数Bを有
しているので、加算値Xに関数Bのスタック使用量Sb
を加算し、これにより、加算値Xは、X=Sm+Sbと
なる。
The function A has a function M as a parent function.
Since there is AIN, the stack usage amount Sa of the function A is subtracted from the added value X (= Sm + Sa), whereby the added value X becomes X = Sm. Here, since the function MAIN, which is the parent function of the function A, has the function B as a child function in addition to the function A, the stack usage Sb of the function B is added to the addition value X.
Are added, whereby the added value X becomes X = Sm + Sb.

【0021】そして、関数Bには子関数がないので、加
算値X(=Sm+Sb)と最大値X MAX (=Sm+Sa
+Sd)とを比較し、例えば、加算値X<最大値XMAX
である場合には、最大値XMAX の更新を行わない。そし
て、最終関数である関数Bには、親関数として関数MA
INがあるので、加算値Xから関数Bのスタック使用量
Sbを減算し、加算値XはX=Smとなり、関数MAI
Nの子関数である関数A及びBに対して処理を行ったの
で、関数MAINを新たに最終関数とし、最終関数であ
る関数MAINには親関数はないので、現在保持してい
る最大値XMAX が最大スタック使用量となり、プログラ
ムPの最大スタック使用量は、最大値XMAX =Sm+S
a+Sdとして、表示装置4に表示し処理を終了する。
Since the function B has no child function,
Calculated value X (= Sm + Sb) and maximum value X MAX(= Sm + Sa
+ Sd) and, for example, addition value X <maximum value XMAX
, The maximum value XMAXIs not updated. That
Then, the function B, which is the final function, has the function MA as a parent function.
Since there is IN, the stack usage of function B from the added value X
Subtracting Sb, the added value X becomes X = Sm, and the function MAI
Performed processing on functions A and B that are child functions of N
Then, the function MAIN is newly set as the final function.
Function MAIN does not have a parent function, so
Maximum value XMAXIs the maximum stack usage
The maximum stack usage of Mu P is the maximum value XMAX= Sm + S
It is displayed on the display device 4 as a + Sd, and the process is terminated.

【0022】これによって、プログラムPを実際に実行
させることなく、プログラムPのオブジェクトプログラ
ムOPを生成した段階で、プログラムPの最大スタック
使用量を検出することができ、また、プログラムPでの
全ての経路で必要とするスタック使用量を容易確実に検
出することができる。また、プログラムの動作環境にス
タックオーバーフロー検出機能がない場合でもプログラ
ム作成段階で必要充分なスタック量を算出することがで
き、充分なスタック使用量の割当が可能となる。
As a result, the maximum stack usage of the program P can be detected at the stage when the object program OP of the program P is generated without actually executing the program P, and all of the programs P can be used. It is possible to easily and surely detect the stack usage amount required for the route. Further, even if the operating environment of the program does not have the stack overflow detection function, the necessary and sufficient stack amount can be calculated at the program creation stage, and the sufficient stack usage amount can be allocated.

【0023】なお、上記実施例においては、関数MAI
N、関数A、関数B、関数C及び関数Dを有するプログ
ラムに適用した場合について説明したが、1関数或いは
複数の関数からなるプログラムに適用することも可能で
あり、また、どのような相関関係のプログラムにでも適
用することができる。また、上記実施例においては、生
成したソースプログラムをコンパイルして生成したオブ
ジェクトプログラムについて適用した場合について説明
したが、すでに生成されているオブジェクトプログラム
に適用することも可能である。
In the above embodiment, the function MAI
Although the case where it is applied to a program having N, function A, function B, function C, and function D has been described, it is also possible to apply it to a program having one function or a plurality of functions, and any correlation. It can also be applied to other programs. Further, in the above embodiment, the case where the generated source program is compiled and applied to the generated object program has been described, but it is also possible to apply to an already generated object program.

【0024】[0024]

【発明の効果】以上説明したように、本発明に係わる最
大スタック使用量検出方式によれば、相関関係解析手段
によって、検出対象プログラムのオブジェクトプログラ
ムに対し特定のアセンブラ言語コードを検索してこれを
解析し、プログラム中の各関数のスタック使用量と各関
数の相関関係とを求め、求めた相関関係に基づいて最大
使用量検出手段により、各関数のスタック使用量を順次
積算してスタック使用量の最大値を求めることによっ
て、実際にプログラムを実行させなくても、確実容易に
最大スタック使用量を検出することができる。
As described above, according to the maximum stack usage amount detection method according to the present invention, the correlation analysis means searches the object program of the detection target program for a specific assembler language code and searches it. The stack usage of each function in the program is calculated and the correlation between each function is calculated. Based on the calculated correlation, the maximum usage detection means sequentially accumulates the stack usage of each function and stack usage By obtaining the maximum value of, the maximum stack usage amount can be reliably and easily detected without actually executing the program.

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

【図1】本発明による最大スタック使用量検出方式を適
用した計算機システムの概略構成図である。
FIG. 1 is a schematic configuration diagram of a computer system to which a maximum stack usage amount detection method according to the present invention is applied.

【図2】スタック使用量検出時の演算処理装置1の処理
手順を示すフローチャートである。
FIG. 2 is a flowchart showing a processing procedure of the arithmetic processing unit 1 at the time of detecting a stack usage amount.

【図3】相関関係図の一例である。FIG. 3 is an example of a correlation diagram.

【図4】本発明の動作説明に供する説明図である。FIG. 4 is an explanatory diagram for explaining the operation of the present invention.

【符号の説明】[Explanation of symbols]

1 演算処理装置 3 メモリ X 加算値 XMAX 最大値1 arithmetic processing unit 3 memory X addition value X MAX maximum value

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 検出対象プログラムのオブジェクトプロ
グラムに対し相関関係解析手段によって特定のアセンブ
ラ言語コードを検索し、検索した特定のアセンブラ言語
コードを解析してプログラム中の各関数のスタック使用
量と各関数の相関関係とを求め、最大使用量検出手段に
よって前記相関関係解析手段で求めた相関関係をもとに
スタック使用量を積算してスタック使用量の最大値を求
めることを特徴とする最大スタック使用量検出方式。
1. A specific assembler language code is searched by a correlation analysis means for an object program of a detection target program, the searched specific assembler language code is analyzed, and a stack usage amount of each function and each function in the program are analyzed. The maximum stack usage is obtained by obtaining the maximum value of the stack usage by accumulating the stack usage based on the correlation found by the correlation analysis means by the maximum usage detection means. Quantity detection method.
JP5298342A 1993-11-29 1993-11-29 Detection of maximum stack usage quantity Pending JPH07152578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5298342A JPH07152578A (en) 1993-11-29 1993-11-29 Detection of maximum stack usage quantity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5298342A JPH07152578A (en) 1993-11-29 1993-11-29 Detection of maximum stack usage quantity

Publications (1)

Publication Number Publication Date
JPH07152578A true JPH07152578A (en) 1995-06-16

Family

ID=17858435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5298342A Pending JPH07152578A (en) 1993-11-29 1993-11-29 Detection of maximum stack usage quantity

Country Status (1)

Country Link
JP (1) JPH07152578A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073369A (en) * 2000-06-12 2002-03-12 Fujitsu Ltd Support device for improving efficiency of object- oriented program and recording medium and program
JP2003022181A (en) * 2001-07-09 2003-01-24 Fuji Electric Co Ltd Method for detecting abnormality of software execution on microcomputer
US8195885B2 (en) 2006-06-23 2012-06-05 Denso Corporation Electronic unit for saving state of task to be run in stack

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073369A (en) * 2000-06-12 2002-03-12 Fujitsu Ltd Support device for improving efficiency of object- oriented program and recording medium and program
JP2003022181A (en) * 2001-07-09 2003-01-24 Fuji Electric Co Ltd Method for detecting abnormality of software execution on microcomputer
US8195885B2 (en) 2006-06-23 2012-06-05 Denso Corporation Electronic unit for saving state of task to be run in stack

Similar Documents

Publication Publication Date Title
US20050222697A1 (en) Development aid device
CN103559123A (en) Function call stack analyzing method and device based on VxWorks operation system
US5854925A (en) Automatic bug locator for automatically locating bugs through interaction with an operator
JP2005316986A (en) Development support device and program and method for creating outline information
JPH07152578A (en) Detection of maximum stack usage quantity
KR102185294B1 (en) Apparatus and method for analyzing source code of concurrent program and computer readible storage medium therefor
US8402445B2 (en) Program translation method and notifying instruction inserting method
CN110377495A (en) The detection method of testing process
JP2000181700A (en) Program analyzing device and recording medium
JPH08179966A (en) Program test device
JP2727996B2 (en) Program execution monitoring method and program execution monitoring system
KR100329991B1 (en) Processing method for preprocessor define using a check box in project manager
JP2616613B2 (en) Programmable controller
JPH06231001A (en) Symbol name input device
JPH0922346A (en) Compiler system
JPH07114487A (en) Program test device
JPH0695780A (en) Operation automatic execution device
JPH0553865A (en) Automatic analyzer for program return information
JPH04369727A (en) Arithmetic unit
JPH086782A (en) Maintenance work automation supporting method for program
JPH02214946A (en) Debugging system
JPS6332389B2 (en)
JPH02278346A (en) Display system for exception occurred position
JPH01295336A (en) Optimization system for critical section
JPS61131124A (en) Conversation input processing system