JPH06242989A - Memory allocation tracing device - Google Patents

Memory allocation tracing device

Info

Publication number
JPH06242989A
JPH06242989A JP5054972A JP5497293A JPH06242989A JP H06242989 A JPH06242989 A JP H06242989A JP 5054972 A JP5054972 A JP 5054972A JP 5497293 A JP5497293 A JP 5497293A JP H06242989 A JPH06242989 A JP H06242989A
Authority
JP
Japan
Prior art keywords
memory
function
trace
allocation
address
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.)
Granted
Application number
JP5054972A
Other languages
Japanese (ja)
Other versions
JPH0820976B2 (en
Inventor
Tsugiichi 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 JP5054972A priority Critical patent/JPH0820976B2/en
Publication of JPH06242989A publication Critical patent/JPH06242989A/en
Publication of JPH0820976B2 publication Critical patent/JPH0820976B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To enable anybody to easily investigate operation for securing a program, which advances its process while securing a memory by using a memory securing function, on a memory by inputting several commands. CONSTITUTION:When a command requesting a memory securing trace is inputted from a terminal device 13, a break point control part 6 sets a break point at the head address of the memory securing function 15 obtained by searching a symbol table 17 by a symbol table retrieval part 5 according to the memory securing function name. When the program 14 is executed and a break is made at the break point, the break point control part 6 gathers memory securing trace information on the function name with which the memory securing function is called, a line number, etc., and a memory securing trace part 7 registers the information in a memory securing state table 10. When a command requesting a display of the memory securing state is inputted from the terminal device 13, a memory securing state display part 9 outputs the memory securing trace information, stored in the memory securing state table 10, to the terminal device 13.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はプログラムのデバッグ時
に使用するメモリ割当トレース装置に関し、より具体的
には、メモリ確保関数,メモリ解放関数を呼び出して動
的にメモリを確保,解放しながら処理を進めるプログラ
ムがどのようにメモリを確保し、解放しているかを簡便
に調査することができるメモリ割当トレース装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory allocation tracing device used when debugging a program, and more specifically, it executes a process while dynamically allocating and releasing memory by calling a memory allocating function and a memory allocating function. The present invention relates to a memory allocation tracing device capable of easily investigating how a program to be advanced secures and releases memory.

【0002】[0002]

【従来の技術】メモリ確保関数およびメモリ解放関数を
呼び出して動的にメモリを確保,解放しながら処理を進
めるプログラムにメモリに関するトラブルが発生した場
合、そのデバッグにおいては、どのようなサイズのメモ
リをプログラム中のどの箇所で確保し、確保したメモリ
をプログラム中のどの箇所で解放しているかといったメ
モリの確保,解放に関する動作を調査する必要がある。
このような調査を行う方法としては、一般的に次のよう
なものが考えられる。
2. Description of the Related Art When a memory problem occurs in a program that advances processing while dynamically allocating and releasing memory by calling a memory allocation function and a memory release function, what size memory should be used for debugging It is necessary to investigate the operation related to memory allocation and memory release, such as where in the program the memory is allocated and where in the program the allocated memory is released.
The following methods are generally conceivable as methods for conducting such an investigation.

【0003】デバッグ対象とするプログラムのソースプ
ログラム自体を修正し、プログラム中のどの箇所でどの
ようなサイズのメモリを確保したか、またプログラム中
のどの箇所でどのようなサイズを解放したかを出力する
機構を組み込み、コンパイルして実行する方法。
The source program itself of the program to be debugged is modified, and the size and size of memory secured at which point in the program and the size and size released at which point in the program are output. A method to compile, execute, and execute the mechanism to perform.

【0004】既存のシンボリックデバッガの提供する各
種のデバッグコマンドを使用して、利用者自身が適切な
箇所にブレークポイントを設定し、且つブレーク時に必
要な箇所のデータを読み取って記録する方法。
A method in which the user himself sets a breakpoint at an appropriate location by using various debug commands provided by an existing symbolic debugger, and reads and records data at a location required at the break.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上述し
たソースプログラム自体を修正する方法では、不必要な
部分を誤って修正してしまう危険性がある。他方、シン
ボリックデバッガを使用する方法ではそのような問題は
生じないが、既存のシンボリックデバッガにはメモリの
確保,解放に関する動作を調査するための専用コマンド
が用意されていないため、ブレークポイントを設定する
コマンドやスタックの内容を出力させるコマンド等,既
存のコマンドを駆使して調査する必要がある。従って、
相当な知識と経験を有する者でなければメモリの確保,
解放の動作を調査することは困難であるのが現状であ
る。
However, in the above-described method of correcting the source program itself, there is a risk of erroneously correcting unnecessary parts. On the other hand, the method using the symbolic debugger does not cause such a problem, but the existing symbolic debugger does not have a dedicated command for investigating the operation related to memory allocation and deallocation, so a breakpoint is set. It is necessary to investigate using existing commands such as commands that output commands and stack contents. Therefore,
Secure memory unless you have considerable knowledge and experience,
At present, it is difficult to investigate the release operation.

【0006】本発明はこのような事情に鑑みて為された
ものであり、その目的は、ソースプログラムを修正する
ことなく、極めて簡単にプログラムのメモリ確保,解放
の動作を調査することができるメモリ割当トレース装置
を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to make it possible to investigate a memory securing / releasing operation of a program extremely easily without modifying a source program. An object is to provide an allocation tracing device.

【0007】[0007]

【課題を解決するための手段】本発明のメモリ割当トレ
ース装置は上記の目的を達成するために、メモリ確保関
数,メモリ解放関数を呼び出して動的にメモリを確保,
解放しながら処理を進めるプログラムを実行する情報処
理装置において、メモリ確保状態テーブルと、採取され
たメモリ確保トレース情報を前記メモリ確保状態テーブ
ルに格納するメモリ確保トレース手段と、採取されたメ
モリ解放トレース情報を前記メモリ確保状態テーブルに
格納するメモリ解放トレース手段と、前記プログラムの
ロードモジュールファイル中のシンボルテーブルを検索
するシンボルテーブル検索手段と、利用者入出力装置
と、該利用者入出力装置からメモリ確保トレースを要求
するコマンドが入力されることにより、前記シンボルテ
ーブル検索手段によりメモリ確保関数名で前記シンボル
テーブルを検索して得たメモリ確保関数の先頭アドレス
にブレークポイントを設定すると共に、該ブレークポイ
ントによるブレーク時にメモリ確保トレース情報を採取
して前記メモリ確保トレース手段により前記メモリ確保
状態テーブルに格納し、且つ、前記利用者入出力装置か
らメモリ解放トレースを要求するコマンドが入力される
ことにより、前記シンボルテーブル検索手段によりメモ
リ解放関数名で前記シンボルテーブルを検索して得たメ
モリ解放関数の先頭アドレスにブレークポイントを設定
すると共に、該ブレークポイントによるブレーク時にメ
モリ解放トレース情報を採取して前記メモリ解放トレー
ス手段により前記メモリ確保状態テーブルに格納するブ
レークポイント制御手段と、前記利用者入出力装置から
メモリ確保状態の表示を要求するコマンドが入力される
ことにより、前記メモリ確保状態テーブルに格納された
メモリ確保トレース情報およびメモリ解放トレース情報
を読み出して前記利用者入出力装置に出力するメモリ確
保状態表示手段とを備えている。
In order to achieve the above object, a memory allocation tracing device of the present invention calls a memory allocation function and a memory release function to dynamically allocate a memory,
In an information processing device that executes a program that advances processing while being released, a memory reservation state table, a memory reservation trace unit that stores the collected memory reservation trace information in the memory reservation state table, and collected memory release trace information Memory release trace means for storing the memory allocation state table, a symbol table search means for searching the symbol table in the load module file of the program, a user input / output device, and a memory allocation from the user input / output device When a command requesting a trace is input, a breakpoint is set at the start address of the memory allocation function obtained by searching the symbol table with the memory allocation function name by the symbol table searching means, and break The memory allocation trace information is sampled and stored in the memory allocation status table by the memory allocation tracing means, and a command for requesting a memory release trace is input from the user input / output device, whereby the symbol table A breakpoint is set at the start address of the memory release function obtained by searching the symbol table with the memory release function name by the search means, and memory release trace information is collected at the time of a break due to the breakpoint to obtain the memory release trace means. The breakpoint control means for storing in the memory allocation status table and the command for requesting display of the memory allocation status from the user input / output device are input, so that the memory allocation trace stored in the memory allocation status table Information and memory And a memory reservation state display means for outputting to the user input device reads the release trace information.

【0008】[0008]

【作用】本発明のメモリ割当トレース装置において、利
用者入出力装置からメモリ確保トレースを要求するコマ
ンドが入力されると、ブレークポイント制御手段が、シ
ンボルテーブル検索手段によりメモリ確保関数名でシン
ボルテーブルを検索して得たメモリ確保関数の先頭アド
レスにブレークポイントを設定する。また、利用者入出
力装置からメモリ解放トレースを要求するコマンドが入
力されると、ブレークポイント制御手段が、シンボルテ
ーブル検索手段によりメモリ解放関数名でシンボルテー
ブルを検索して得たメモリ解放関数の先頭アドレスにブ
レークポイントを設定する。上記のようなブレークポイ
ントが設定された状態でプログラムが実行され、メモリ
確保関数の先頭アドレスでブレークすると、ブレークポ
イント制御手段が、そのメモリ確保関数を呼び出した関
数名,行番号,メモリサイズといったメモリ確保トレー
ス情報を採取し、メモリ確保トレース手段によりメモリ
確保状態テーブルに格納する。またメモリ解放関数の先
頭アドレスでブレークすると、ブレークポイント制御手
段が、メモリ解放関数を呼び出した関数名,行番号とい
ったメモリ解放トレース情報を採取し、メモリ解放トレ
ース手段によりメモリ確保状態テーブルに格納する。そ
の後、利用者入出力装置からメモリ確保状態の表示を要
求するコマンドが入力されると、メモリ確保状態表示手
段が、メモリ確保状態テーブルに格納されたメモリ確保
トレース情報およびメモリ解放トレース情報を読み出し
て利用者入出力装置に出力する。
In the memory allocation trace device of the present invention, when a command requesting memory allocation trace is input from the user input / output device, the breakpoint control means causes the symbol table search means to create a symbol table with the memory allocation function name. Set a breakpoint at the start address of the memory allocation function obtained by searching. When a command requesting a memory release trace is input from the user input / output device, the break point control means searches the symbol table with the memory release function name by the symbol table search means and starts the memory release function. Set a breakpoint at the address. When the program is executed with the breakpoints set as above and a break occurs at the start address of the memory allocation function, the breakpoint control means stores the memory such as the function name, line number, memory size that called the memory allocation function. The secured trace information is collected and stored in the memory secured state table by the memory secured trace means. When a break occurs at the start address of the memory release function, the breakpoint control means collects memory release trace information such as the function name and line number that called the memory release function, and stores it in the memory allocation state table by the memory release trace means. After that, when a command requesting display of the memory allocation status is input from the user input / output device, the memory allocation status display means reads the memory allocation trace information and the memory allocation trace information stored in the memory allocation status table. Output to user input / output device.

【0009】[0009]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0010】図1を参照すると、本発明の一実施例のメ
モリ割当トレース装置1は、主制御部2,コマンド入力
部3,ディスプレイ出力部4,シンボルテーブル検索部
5,ブレークポイント制御部6,メモリ確保トレース部
7,メモリ解放トレース部8およびメモリ確保状態表示
部9を有し、ロードモジュールファイル12,利用者入
出力装置である端末装置13,メモリ確保状態テーブル
10およびメモリ11に接続されている。なお、このよ
うなメモリ割当トレース装置1はデバッガの一部として
情報処理装置に組み込まれる。
Referring to FIG. 1, a memory allocation tracing device 1 according to an embodiment of the present invention includes a main control unit 2, a command input unit 3, a display output unit 4, a symbol table search unit 5, a breakpoint control unit 6, and a break control unit 6. It has a memory allocation trace unit 7, a memory release trace unit 8 and a memory allocation status display unit 9, and is connected to a load module file 12, a terminal device 13 which is a user input / output device, a memory allocation status table 10 and a memory 11. There is. Such a memory allocation tracing device 1 is incorporated in the information processing device as a part of the debugger.

【0011】メモリ11は情報処理装置の主記憶であ
り、その中の14はデバッグ対象となるプログラムであ
る。このプログラム14は例えばC言語系のプログラム
で、複数の関数(モジュール)から構成されており、特
にメモリ確保関数15,メモリ解放関数16を使用して
動的にメモリ11中のメモリの確保,解放を行いながら
処理を進めるものである。このプログラム14のどの関
数のどの行番号でどのようなサイズ,メモリアドレスの
メモリを確保し、また解放しているかを調べるのがメモ
リ割当トレース装置1の目的である。
The memory 11 is a main memory of the information processing apparatus, and 14 of the memory is a program to be debugged. The program 14 is, for example, a C language program and is composed of a plurality of functions (modules). In particular, the memory reservation function 15 and the memory release function 16 are used to dynamically secure and release the memory in the memory 11. The processing proceeds while performing. The purpose of the memory allocation tracing device 1 is to check whether the memory of which size and memory address is secured and released at which line number of which function of the program 14 is used.

【0012】ロードモジュールファイル12はプログラ
ム14に対応するロードモジュールファイルであり、プ
ログラム14はその実行時にロードモジュールファイル
12からメモリ11にロードされる。このロードモジュ
ールファイル12中にはシンボルテーブル17がある。
このシンボルテーブル17は、プログラム14のソース
プログラムを構成する関数名,そのソースプログラム上
での行番号,各ソース行に対応する機械語命令等がロー
ドされるメモリ11上のアドレスを保持している。
The load module file 12 is a load module file corresponding to the program 14, and the program 14 is loaded from the load module file 12 into the memory 11 when it is executed. The load module file 12 has a symbol table 17.
The symbol table 17 holds a function name forming a source program of the program 14, a line number on the source program, an address on the memory 11 into which a machine language instruction corresponding to each source line is loaded. .

【0013】メモリ確保状態テーブル10は、メモリ割
当トレース装置1によってトレースされたメモリ確保,
解放に関するトレース情報を蓄積するテーブルであり、
例えば情報処理装置の主記憶上に構築される。このメモ
リ確保状態テーブル10は例えば図2に示すように、メ
モリ確保トレース情報を格納する確保欄101と、メモ
リ解放トレース情報を格納する解放欄102とで構成さ
れ、各欄101,102は複数のエントリE11〜E1
n,E21〜E2nを有している。
The memory allocation status table 10 includes a memory allocation traced by the memory allocation tracing device 1.
It is a table that stores trace information about release.
For example, it is constructed on the main memory of the information processing apparatus. As shown in FIG. 2, for example, the memory reservation state table 10 is composed of a reservation column 101 for storing memory reservation trace information and a release column 102 for storing memory release trace information. Entries E11 to E1
n, E21 to E2n.

【0014】確保欄101および解放欄102とも、そ
の先頭のエントリE11,E21から順に使用される。
確保欄101の一つのエントリには、メモリの確保を要
求した関数名,そのソースプログラム上での行番号,確
保するメモリサイズ,確保したメモリアドレスが記憶さ
れる。また解放欄102の一つのエントリには、メモリ
の解放を要求した関数名,そのソースプログラム上での
行番号,解放したメモリアドレスが記憶される。
Both the reservation column 101 and the release column 102 are used in order from the first entry E11, E21.
One entry of the reservation column 101 stores the name of the function requesting the memory reservation, the line number in the source program, the memory size to be reserved, and the reserved memory address. Further, in one entry of the release column 102, the function name requesting the release of the memory, the line number on the source program, and the released memory address are stored.

【0015】図3および図4はメモリ割当トレース装置
1内のブレークポイント制御部6の処理の一例を示すフ
ローチャートである。以下、各図を参照しながら、メモ
リ割当トレース装置1内の各部の詳細な機能を全体の動
作を通じて説明する。
3 and 4 are flowcharts showing an example of the processing of the breakpoint control unit 6 in the memory allocation tracing device 1. Hereinafter, detailed functions of each unit in the memory allocation tracing device 1 will be described through the entire operation with reference to the drawings.

【0016】メモリ割当トレース装置1に制御が移って
いる状態では、主制御部2はコマンド入力部3において
端末装置13からのコマンド入力待ちになっている。こ
の状態で、利用者によって端末装置13からメモリ確保
トレースを要求するコマンドが入力されると、そのコマ
ンドがコマンド入力部3で受け付けられ、主制御部2に
渡される。
In the state where the control is transferred to the memory allocation tracing device 1, the main control part 2 is waiting for a command input from the terminal device 13 in the command input part 3. In this state, when the user inputs a command requesting a memory allocation trace from the terminal device 13, the command is accepted by the command input unit 3 and passed to the main control unit 2.

【0017】主制御部2は入力されたコマンドがメモリ
確保トレースを要求するコマンドであることを認識する
と、ブレークポイント制御部6に対してメモリ確保トレ
ースを要求する。
When the main control unit 2 recognizes that the input command is a command requesting a memory reservation trace, it requests the breakpoint control unit 6 for a memory reservation trace.

【0018】ブレークポイント制御部6は、主制御部2
からメモリ確保トレースまたはメモリ解放トレースが要
求されると、図3に示す処理を行う。そして、図3の処
理S1でメモリ確保トレースが要求されたことを認識す
ると、シンボルテーブル検索部5を使用してメモリ確保
関数の関数名でシンボルテーブル17を検索し、メモリ
確保関数のメモリ11上のアドレスを得る(S2)。そ
して、メモリ確保関数15の先頭アドレスのコードを割
り込み命令コードに置き換え、メモリ確保関数15の先
頭アドレスと元のコードとを内部に記憶し(S3)、主
制御部2へ制御を渡す(S6)。
The break point control unit 6 includes a main control unit 2
When a memory reservation trace or a memory release trace is requested by the process, the process shown in FIG. 3 is performed. Then, when it is recognized that the memory allocation trace is requested in the process S1 of FIG. 3, the symbol table search unit 5 is used to search the symbol table 17 by the function name of the memory allocation function, and the memory allocation function on the memory 11 is searched. To obtain the address (S2). Then, the code at the start address of the memory allocation function 15 is replaced with an interrupt instruction code, the start address of the memory allocation function 15 and the original code are stored inside (S3), and control is passed to the main control unit 2 (S6). .

【0019】主制御部2はブレークポイント制御部6か
ら制御が戻されると、コマンド入力部3においてコマン
ドの入力待ちとなる。
When control is returned from the break point control unit 6, the main control unit 2 waits for a command to be input in the command input unit 3.

【0020】この状態で利用者が端末装置13からプロ
グラムの実行を指示するコマンドを入力すると、主制御
部2は、プログラム14の実行を開始せしめる。
When the user inputs a command instructing the execution of the program from the terminal device 13 in this state, the main control section 2 causes the execution of the program 14.

【0021】プログラム14の実行が開始され、プログ
ラム14中の或る関数によってメモリ確保関数15が呼
び出され、制御がメモリ確保関数15の先頭アドレスに
移ると、そこに存在する割り込み命令コードにより割り
込みが発生し、制御がメモリ割当トレース装置1のブレ
ークポイント制御部6に移る。
When the execution of the program 14 is started, a memory reservation function 15 is called by a certain function in the program 14, and control is transferred to the start address of the memory reservation function 15, an interrupt instruction code existing there causes an interrupt. Occurrence occurs, and control is transferred to the breakpoint control unit 6 of the memory allocation tracing device 1.

【0022】ブレークポイント制御部6は、割り込みが
かかったとき図4の処理を行う。先ず、割り込みのかか
ったメモリアドレスを内部に記憶しているアドレスと比
較することにより、メモリ確保関数の先頭アドレスで割
り込みがかかったのか、後述するようにメモリ確保関数
からの戻りアドレスで割り込みがかかったのか、メモリ
解放関数の先頭アドレスで割り込みがかかったのかを判
定する(S11)。
The breakpoint control unit 6 performs the processing shown in FIG. 4 when an interrupt occurs. First, by comparing the interrupted memory address with the address stored internally, whether the interrupt occurred at the start address of the memory allocation function or whether the interrupt occurred at the return address from the memory allocation function as described later. It is then determined whether or not an interrupt has occurred at the start address of the memory release function (S11).

【0023】今の場合、メモリ確保関数の先頭アドレス
で割り込みがかかったことが認識されるので、ブレーク
ポイント制御部6は、図示しないスタックに積まれたメ
モリ確保関数からの戻りアドレスによりメモリ確保関数
を呼び出したメモリアドレスを認識し、このメモリアド
レスでシンボルテーブル検索部5を使用してシンボルテ
ーブル17を検索することにより、メモリ確保関数を呼
び出した関数名,行番号を得る(S12)。更に、今回
のメモリ確保関数の呼び出しで使用されたパラメータか
ら、要求されたメモリサイズを取得する(S13)。そ
して、これら取得した内容をメモリ確保トレース情報と
してメモリ確保トレース部7に渡して格納を要求する
(S14)。
In this case, since it is recognized that an interrupt has occurred at the start address of the memory allocation function, the breakpoint control unit 6 uses the return address from the memory allocation function stacked in the stack (not shown) to determine the memory allocation function. By recognizing the memory address that called, and using the symbol table search unit 5 to search the symbol table 17 with this memory address, the function name and line number that called the memory securing function are obtained (S12). Further, the requested memory size is acquired from the parameter used in the call of the memory securing function this time (S13). Then, the obtained contents are passed to the memory reservation trace unit 7 as memory reservation trace information to request storage (S14).

【0024】メモリ確保トレース部7は、ブレークポイ
ント制御部6から渡されたメモリ確保トレース情報中の
関数名,行番号,メモリサイズを、図2に示したメモリ
確保状態テーブル10の確保欄101にその先頭のエン
トリE11から順に記憶する。今、確保欄101の全エ
ントリE11〜E1nが空とすると、先ずエントリE1
1が使用され、図2に示すようにそのエントリE11に
例えば関数名func1,行番号100,メモリサイズ
20が記憶される。その後、メモリ確保トレース部7は
制御をブレークポイント制御部6に戻す。
The memory allocation trace unit 7 stores the function name, line number, and memory size in the memory allocation trace information passed from the breakpoint control unit 6 in the allocation column 101 of the memory allocation state table 10 shown in FIG. The entry E11 at the head is stored in order. Now, assuming that all the entries E11 to E1n in the reservation column 101 are empty, first the entry E1
1, the function name func1, the line number 100, and the memory size 20 are stored in the entry E11 as shown in FIG. After that, the memory allocation tracing unit 7 returns the control to the breakpoint control unit 6.

【0025】ブレークポイント制御部6は制御が戻され
ると、スタック上の戻り番地からメモリ確保関数を呼び
出したメモリアドレスを再度得て、そのメモリアドレス
のコードを割り込み命令のコードに置き換え、その戻り
アドレスと元のコードを内部に保存する(S15)。そ
して、今回の割り込み命令のコード(メモリ確保関数の
先頭アドレスに設定されたコード)を元のコードに置き
換え(S16)、制御を主制御部2に渡す(S17)。
When the control returns, the breakpoint control unit 6 obtains again the memory address that called the memory allocation function from the return address on the stack, replaces the code of the memory address with the code of the interrupt instruction, and returns the return address. And the original code is stored internally (S15). Then, the code of the interrupt instruction this time (the code set in the head address of the memory securing function) is replaced with the original code (S16), and the control is passed to the main control unit 2 (S17).

【0026】主制御部2はブレークポイント制御部6か
ら制御が戻されると、コマンド入力部3においてコマン
ドの入力待ちとなる。
When control is returned from the break point control unit 6, the main control unit 2 waits for a command to be input in the command input unit 3.

【0027】この状態で利用者が端末装置13からプロ
グラムの実行の再開を指示するコマンドを入力すると、
主制御部2は、前記割り込みのかかったアドレスからプ
ログラム14の実行を再開させる。これにより、メモリ
確保関数15が実行され、メモリの確保が行われる。
In this state, when the user inputs a command from the terminal device 13 to restart the execution of the program,
The main control unit 2 restarts the execution of the program 14 from the interrupted address. As a result, the memory reservation function 15 is executed and the memory is reserved.

【0028】そして、メモリ確保関数15の実行が終了
し、呼び出し元に制御が戻ると、そこに存在する割り込
み命令コードにより再び割り込みが発生し、制御がブレ
ークポイント制御部6に移行する。
When the execution of the memory allocation function 15 is completed and control is returned to the calling source, an interrupt is generated again by the interrupt instruction code existing there, and control is transferred to the breakpoint control section 6.

【0029】ブレークポイント制御部6は、図4の処理
S11において、割り込みのかかったメモリアドレスを
内部に記憶したアドレスと比較することにより、メモリ
確保関数からの戻りアドレスで割り込みがかかったこと
を認識すると、メモリ確保関数のリターン値から今回確
保されたメモリアドレスを取得し(S18)、この取得
したメモリアドレスを追加のメモリ確保トレース情報と
してメモリ確保トレース部7に渡し、格納を要求する
(S19)。
In step S11 of FIG. 4, the breakpoint control unit 6 recognizes that an interrupt has occurred at the return address from the memory securing function by comparing the interrupted memory address with the internally stored address. Then, the memory address secured this time is obtained from the return value of the memory securing function (S18), the obtained memory address is passed to the memory securing trace unit 7 as additional memory securing trace information, and storage is requested (S19). .

【0030】メモリ確保トレース部7は、ブレークポイ
ント制御部6から渡された追加のメモリ確保トレース情
報中のメモリアドレスを、メモリ確保状態テーブル10
の確保欄101の直前に使用したエントリに記憶する。
これにより、図2に示すように、先に使用されたエント
リE11に関数名,行番号,メモリサイズに加え、メモ
リアドレス(例えば1234)が記憶される。
The memory allocation trace unit 7 stores the memory address in the additional memory allocation trace information passed from the breakpoint control unit 6 into the memory allocation state table 10.
It is stored in the entry used immediately before in the reservation field 101 of.
As a result, as shown in FIG. 2, in addition to the function name, line number, and memory size, the memory address (for example, 1234) is stored in the previously used entry E11.

【0031】ブレークポイント制御部6はメモリ確保ト
レース部7から制御が戻されると、今回の割り込み命令
のコード(メモリ確保関数の戻りアドレスに設定された
コード)を元のコードに置き換え(S16)、制御を主
制御部2に渡す(S17)。
When control is returned from the memory allocation tracing section 7 to the breakpoint control section 6, the code of the interrupt instruction at this time (the code set in the return address of the memory allocation function) is replaced with the original code (S16), Control is passed to the main control unit 2 (S17).

【0032】主制御部2はブレークポイント制御部6か
ら制御が戻されると、再びコマンドの入力待ちとなる。
When the control is returned from the break point control unit 6, the main control unit 2 waits again for command input.

【0033】この状態で利用者が端末装置13からプロ
グラムの実行の再開を指示するコマンドを入力すると、
主制御部2は、前記割り込みのかかったアドレスからプ
ログラム14の実行を再開させる。これにより、プログ
ラム14の実行が再開される。
In this state, when the user inputs a command from the terminal device 13 to restart the execution of the program,
The main control unit 2 restarts the execution of the program 14 from the interrupted address. As a result, the execution of the program 14 is restarted.

【0034】また、メモリ割当トレース装置1がコマン
ド入力待ちの状態になっているときに、利用者が端末装
置13からメモリ解放トレースを要求するコマンドを入
力すると、そのコマンドがコマンド入力部3で受け付け
られ、主制御部2に渡される。
When the user inputs a command requesting a memory release trace from the terminal device 13 while the memory allocation tracing device 1 is in a command input waiting state, the command is accepted by the command input unit 3. And passed to the main controller 2.

【0035】主制御部2は入力されたコマンドがメモリ
解放トレースを要求するコマンドであることを認識する
と、ブレークポイント制御部6に対してメモリ解放トレ
ースを要求する。
When the main control unit 2 recognizes that the input command is a command requesting a memory release trace, it requests the breakpoint control unit 6 for a memory release trace.

【0036】ブレークポイント制御部6は、図3の処理
S1でメモリ解放トレースの要求を認識すると、シンボ
ルテーブル検索部5を使用してメモリ解放関数の関数名
でシンボルテーブル17を検索し、メモリ解放関数のメ
モリ11上のアドレスを得る(S4)。そして、メモリ
解放関数16の先頭アドレスのコードを割り込み命令コ
ードに置き換え、メモリ解放関数16の先頭アドレスと
その元のコードを内部に保存し(S5)、制御を主制御
部2に渡す(S6)。
When the breakpoint control unit 6 recognizes the memory release trace request in the process S1 of FIG. 3, it searches the symbol table 17 with the function name of the memory release function using the symbol table search unit 5, and releases the memory. The address of the function on the memory 11 is obtained (S4). Then, the code at the start address of the memory release function 16 is replaced with the interrupt instruction code, the start address of the memory release function 16 and its original code are stored inside (S5), and control is passed to the main control unit 2 (S6). .

【0037】主制御部2はブレークポイント制御部6か
ら制御が戻されると、再びコマンド入力待ちとなり、端
末装置13からプログラムの実行を再開するコマンドが
入力されると、プログラム14の実行を再開せしめる。
When the control is returned from the breakpoint control unit 6, the main control unit 2 waits again for command input, and when a command for restarting program execution is input from the terminal device 13, execution of the program 14 is restarted. .

【0038】プログラム14の実行が進み、プログラム
14中の或る関数によってメモリ解放関数16が呼び出
され、制御がメモリ解放関数16の先頭アドレスに移る
と、そこに存在する割り込み命令コードにより割り込み
が発生し、制御がブレークポイント制御部6に移る。
When the execution of the program 14 progresses and a memory release function 16 is called by a certain function in the program 14 and control is transferred to the start address of the memory release function 16, an interrupt is generated by an interrupt instruction code existing there. Then, the control is transferred to the breakpoint control unit 6.

【0039】ブレークポイント制御部6は、図4の処理
S11において、割り込みのかかったメモリアドレスを
内部に記憶したアドレスと比較することにより、メモリ
解放関数の先頭アドレスで割り込みがかかったことを認
識すると、スタック上の戻りアドレスからメモリ解放関
数を呼び出したメモリアドレスを認識し、このメモリア
ドレスでシンボルテーブル検索部5を使用してシンボル
テーブル17を検索することにより、メモリ解放関数を
呼び出した関数名,行番号を得る(S20)。更に、今
回のメモリ解放関数の呼び出しで使用されたパラメータ
から、解放を要求したメモリアドレスを取得する(S2
1)。そして、この取得した関数名,行番号,メモリア
ドレスをメモリ解放トレース情報としてメモリ解放トレ
ース部8に渡して格納を要求する(S22)。
In step S11 of FIG. 4, the breakpoint control unit 6 recognizes that an interrupt has occurred at the start address of the memory release function by comparing the interrupted memory address with the internally stored address. , The name of the function that called the memory release function by recognizing the memory address that called the memory release function from the return address on the stack and searching the symbol table 17 using the symbol table search unit 5 with this memory address, The line number is obtained (S20). Further, the memory address requested to be released is acquired from the parameter used in the call of the memory release function this time (S2
1). Then, the acquired function name, line number, and memory address are passed to the memory release trace unit 8 as memory release trace information to request storage (S22).

【0040】メモリ解放トレース部8は、ブレークポイ
ント制御部6から渡されたメモリ解放トレース情報中の
関数名,行番号,メモリアドレスを、図2に示したメモ
リ確保状態テーブル10の解放欄102にその先頭のエ
ントリE21から順に記憶する。今、解放欄102の全
エントリE21〜E2nが空とすると、先ずエントリE
21が使用され、図2に示すようにそのエントリE21
に例えば関数名func1,行番号200,メモリアド
レス1234が記憶される。その後、メモリ解放トレー
ス部8は制御をブレークポイント制御部6に戻す。
The memory release trace unit 8 stores the function name, line number, and memory address in the memory release trace information passed from the breakpoint control unit 6 in the release column 102 of the memory allocation state table 10 shown in FIG. The entry E21 at the beginning is stored in order. Now, assuming that all the entries E21 to E2n in the release column 102 are empty, the entry E
21 is used and its entry E21 as shown in FIG.
For example, the function name func1, the line number 200, and the memory address 1234 are stored. After that, the memory release tracing unit 8 returns the control to the breakpoint control unit 6.

【0041】なお、本実施例においては、メモリ割当ト
レース装置1の起動時にメモリ解放トレース部8に対し
て解放アドレスをチェックするよう指示しておくことが
可能になっている。このような指示が予め行われていた
場合、メモリ解放トレース部8は、今回解放したメモリ
アドレスと一致するメモリアドレスが確保欄101に存
在するか否かを調べ、一致するメモリアドレスが存在し
ない場合、ディスプレイ出力部4を利用して不正なメモ
リアドレスの解放が要求された旨のメッセージおよび今
回のメモリ解放トレース情報の内容を端末装置13に出
力するようにしている。
In this embodiment, it is possible to instruct the memory release trace unit 8 to check the release address when the memory allocation trace device 1 is activated. When such an instruction has been given in advance, the memory release tracing unit 8 checks whether or not there is a memory address matching the memory address released this time in the reservation column 101, and if there is no matching memory address. The display output unit 4 is used to output a message to the effect that an unauthorized memory address release is requested and the content of the memory release trace information of this time to the terminal device 13.

【0042】さて、ブレークポイント制御部6はメモリ
解放トレース部8から制御が戻されると、今回の割り込
み命令のコード(メモリ解放関数の先頭アドレスに設定
されたコード)を元のコードに置き換え(S16)、制
御を主制御部2に渡す(S17)。
When control is returned from the memory release trace unit 8 to the breakpoint control unit 6, the code of the current interrupt instruction (the code set at the start address of the memory release function) is replaced with the original code (S16). ), And passes control to the main control unit 2 (S17).

【0043】主制御部2はブレークポイント制御部6か
ら制御が戻されると、コマンド入力部3においてコマン
ドの入力待ちとなる。
When the control is returned from the break point control unit 6 to the main control unit 2, the command input unit 3 waits for a command input.

【0044】この状態で利用者が端末装置13からプロ
グラムの実行の再開を指示するコマンドを入力すると、
主制御部2は、前記割り込みのかかったアドレスからプ
ログラム14の実行を再開させる。これにより、メモリ
解放関数16が実行され、メモリの解放が行われる。
In this state, when the user inputs a command from the terminal device 13 to restart the execution of the program,
The main control unit 2 restarts the execution of the program 14 from the interrupted address. As a result, the memory release function 16 is executed, and the memory is released.

【0045】次に、コマンドの入力待ちの状態におい
て、利用者が端末装置13からメモリ確保状態の表示を
要求するコマンドを入力すると、これを認識した主制御
部2はメモリ確保状態表示部9を起動する。
Next, when the user inputs a command requesting the display of the memory reserved state from the terminal device 13 in the state of waiting for the input of the command, the main control section 2 which recognizes this command causes the memory reserved state display section 9 to display. to start.

【0046】メモリ確保状態表示部9は、メモリ確保状
態テーブル10の確保欄101および解放欄102のエ
ントリの内容を読み出し、確保欄101の各エントリに
記憶された関数名,行番号,メモリサイズ,メモリアド
レス並びに解放欄102の各エントリに記憶された関数
名,行番号,メモリアドレスを、それぞれ1行に納まる
ように編集し、ディスプレイ出力部4を利用して端末装
置13の表示面に、各欄101,102のエントリ順に
表示する。これにより、利用者は、プログラム14のど
の関数のどの行番号でどのようなサイズ,メモリアドレ
スのメモリを確保し、また解放しているかが認識でき、
且つ、表示順が確保,解放毎に確保,解放順になってい
るので、メモリ確保,解放の順序も知ることができる。
The memory reservation state display unit 9 reads the contents of the entries in the reservation column 101 and the release column 102 of the memory reservation state table 10 and stores the function name, line number, memory size, and memory number stored in each entry of the reservation column 101. The memory address and the function name, line number, and memory address stored in each entry of the release column 102 are edited so that each line fits in one line, and the display output unit 4 is used to display each on the display surface of the terminal device 13. The entries are displayed in the order of the columns 101 and 102. As a result, the user can recognize which function of the program 14, which line number, what size and memory address the memory has been secured and released.
In addition, since the display order is secured and secured for each release and released, the order of memory securement and release can be known.

【0047】[0047]

【発明の効果】以上説明した本発明のメモリ割当トレー
ス装置によれば、以下のような効果を得ることができ
る。
According to the memory allocation trace device of the present invention described above, the following effects can be obtained.

【0048】デバッグ対象のプログラム中のどの関数の
どのソース行でどのようなサイズ,メモリアドレスのメ
モリが確保されるかを、メモリ確保トレースを要求する
コマンド,メモリ確保状態表示コマンドを入力するだけ
で、調査することができる。
By inputting a command for requesting a memory allocation trace and a memory allocation status display command, it is possible to determine what size and memory address of the memory is secured in which source line of which function in the program to be debugged. Can be investigated.

【0049】デバッグ対象のプログラム中のどの関数の
どのソース行でどのようなメモリアドレスのメモリが解
放されるかを、メモリ解放トレースを要求するコマン
ド,メモリ確保状態表示コマンドを入力するだけで、調
査することができる。
It is possible to investigate which memory address and what memory address is released in which source line of which function in the program to be debugged by simply inputting a command for requesting memory release trace and a memory allocation status display command. can do.

【0050】よって、豊富な経験や専門的な知識を有し
ない利用者でもデバッグ対象プログラムのメモリ確保,
解放に関する動作の調査が行え、プログラムのデバッグ
中のメモリに関するトラブルを調査する作業時間の短縮
に効果がある。
Therefore, even a user who does not have abundant experience or specialized knowledge can secure the memory for the program to be debugged.
It is possible to investigate the operation related to release, and it is effective in shortening the work time for investigating problems related to memory while debugging a program.

【0051】解放するメモリアドレスが既に確保された
メモリアドレスと一致しないような不正なメモリアドレ
スを解放した場合には、その旨のメッセージが出力され
るので、問題箇所の摘出作業も容易になる。
When an illegal memory address in which the memory address to be released does not match the already secured memory address is released, a message to that effect is output, and the work of extracting the problematic part is facilitated.

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

【図1】本発明のメモリ割当トレース装置の一実施例の
構成図である。
FIG. 1 is a configuration diagram of an embodiment of a memory allocation tracing device of the present invention.

【図2】メモリ確保状態テーブルの内容例を示す図であ
る。
FIG. 2 is a diagram showing an example of contents of a memory reservation state table.

【図3】メモリ確保トレース要求コマンド,メモリ解放
トレース要求コマンド入力時にブレークポイント制御部
で行われる処理の一例を示すフローチャートである。
FIG. 3 is a flowchart showing an example of processing performed by a breakpoint control unit when a memory allocation trace request command and a memory release trace request command are input.

【図4】ブレークポイントによるブレーク時にブレーク
ポイント制御部で行われる処理の一例を示すフローチャ
ートである。
FIG. 4 is a flowchart showing an example of processing performed by a breakpoint control unit at the time of a break due to a breakpoint.

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

1…メモリ割当トレース装置 2…主制御部 3…コマンド入力部 4…ディスプレイ出力部 5…シンボルテーブル検索部 6…ブレークポイント制御部 7…メモリ確保トレース部 8…メモリ解放トレース部 9…メモリ確保状態表示部 10…メモリ確保状態テーブル 11…メモリ 12…ロードモジュールファイル 13…端末装置 14…デバッグ対象のプログラム 15…メモリ確保関数 16…メモリ解放関数 17…シンボルテーブル 1 ... Memory allocation tracing device 2 ... Main control unit 3 ... Command input unit 4 ... Display output unit 5 ... Symbol table search unit 6 ... Breakpoint control unit 7 ... Memory reservation trace unit 8 ... Memory release trace unit 9 ... Memory reservation state Display unit 10 ... Memory reservation state table 11 ... Memory 12 ... Load module file 13 ... Terminal device 14 ... Debug target program 15 ... Memory reservation function 16 ... Memory release function 17 ... Symbol table

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 メモリ確保関数を呼び出して動的にメモ
リを確保しながら処理を進めるプログラムを実行する情
報処理装置において、 メモリ確保状態テーブルと、 採取されたメモリ確保トレース情報を前記メモリ確保状
態テーブルに格納するメモリ確保トレース手段と、 前記プログラムのロードモジュールファイル中のシンボ
ルテーブルを検索するシンボルテーブル検索手段と、 利用者入出力装置と、 該利用者入出力装置からメモリ確保トレースを要求する
コマンドが入力されることにより、前記シンボルテーブ
ル検索手段によりメモリ確保関数名で前記シンボルテー
ブルを検索して得たメモリ確保関数の先頭アドレスにブ
レークポイントを設定すると共に、該ブレークポイント
によるブレーク時にメモリ確保トレース情報を採取して
前記メモリ確保トレース手段により前記メモリ確保状態
テーブルに格納するブレークポイント制御手段と、 前記利用者入出力装置からメモリ確保状態の表示を要求
するコマンドが入力されることにより、前記メモリ確保
状態テーブルに格納されたメモリ確保トレース情報を読
み出して前記利用者入出力装置に出力するメモリ確保状
態表示手段とを具備したことを特徴とするメモリ割当ト
レース装置。
1. In an information processing device for executing a program for executing a process while dynamically allocating a memory by calling a memory allocating function, a memory allocating state table and collected memory allocating trace information are stored in the memory allocating state table. And a symbol table search unit for searching a symbol table in the load module file of the program, a user I / O device, and a command requesting a memory reservation trace from the user I / O device. By inputting, a breakpoint is set at the start address of the memory securing function obtained by searching the symbol table with the memory securing function name by the symbol table searching means, and memory securing trace information at the time of a break by the breakpoint. Collect the above The memory reservation trace means stores the memory reservation state table in the memory reservation state table, and the user input / output device inputs a command requesting the display of the memory reservation state to store the memory reservation state table in the memory reservation state table. And a memory allocation status display means for reading the memory allocation trace information and outputting it to the user input / output device.
【請求項2】 前記ブレークポイント制御手段は、前記
シンボルテーブル検索手段を通じ前記ブレークポイント
のメモリアドレスで前記シンボルテーブルを検索して前
記メモリ確保関数を呼び出した関数名,行番号を取得す
ると共に、前記メモリ確保関数の呼び出しパラメータか
らメモリサイズを取得し、これらを前記メモリ確保トレ
ース情報として前記メモリ確保トレース手段によって前
記メモリ確保状態テーブルに格納することを特徴とする
請求項1記載のメモリ割当トレース装置。
2. The breakpoint control means searches the symbol table with the memory address of the breakpoint through the symbol table search means to obtain the function name and line number that called the memory allocation function, and 2. The memory allocation trace device according to claim 1, wherein a memory size is acquired from a call parameter of the memory allocation function, and these are stored in the memory allocation state table as the memory allocation trace information by the memory allocation trace means.
【請求項3】 前記ブレークポイント制御手段は、前記
ブレーク時に前記メモリ確保関数からの戻りアドレスに
ブレークポイントを設定し、該設定したブレークポイン
トによるブレーク時に前記メモリ確保関数のリターン値
から確保されたメモリアドレスを取得し、該取得したメ
モリアドレスを追加のメモリ確保トレース情報として前
記メモリ確保トレース手段によって前記メモリ確保状態
テーブルに登録することを特徴とする請求項2記載のメ
モリ割当トレース装置。
3. The breakpoint control means sets a breakpoint at a return address from the memory securing function at the time of the break, and a memory secured from the return value of the memory securing function at the time of the break by the set breakpoint. 3. The memory allocation tracing device according to claim 2, wherein an address is acquired and the acquired memory address is registered in the memory allocation state table by the memory allocation tracing means as additional memory allocation trace information.
【請求項4】 メモリ確保関数,メモリ解放関数を呼び
出して動的にメモリを確保,解放しながら処理を進める
プログラムを実行する情報処理装置において、 メモリ確保状態テーブルと、 採取されたメモリ確保トレース情報を前記メモリ確保状
態テーブルに格納するメモリ確保トレース手段と、 採取されたメモリ解放トレース情報を前記メモリ確保状
態テーブルに格納するメモリ解放トレース手段と、 前記プログラムのロードモジュールファイル中のシンボ
ルテーブルを検索するシンボルテーブル検索手段と、 利用者入出力装置と、 該利用者入出力装置からメモリ確保トレースを要求する
コマンドが入力されることにより、前記シンボルテーブ
ル検索手段によりメモリ確保関数名で前記シンボルテー
ブルを検索して得たメモリ確保関数の先頭アドレスにブ
レークポイントを設定すると共に、該ブレークポイント
によるブレーク時にメモリ確保トレース情報を採取して
前記メモリ確保トレース手段により前記メモリ確保状態
テーブルに格納し、且つ、前記利用者入出力装置からメ
モリ解放トレースを要求するコマンドが入力されること
により、前記シンボルテーブル検索手段によりメモリ解
放関数名で前記シンボルテーブルを検索して得たメモリ
解放関数の先頭アドレスにブレークポイントを設定する
と共に、該ブレークポイントによるブレーク時にメモリ
解放トレース情報を採取して前記メモリ解放トレース手
段により前記メモリ確保状態テーブルに格納するブレー
クポイント制御手段と、 前記利用者入出力装置からメモリ確保状態の表示を要求
するコマンドが入力されることにより、前記メモリ確保
状態テーブルに格納されたメモリ確保トレース情報およ
びメモリ解放トレース情報を読み出して前記利用者入出
力装置に出力するメモリ確保状態表示手段とを具備した
ことを特徴とするメモリ割当トレース装置。
4. An information processing apparatus that executes a program that advances a process while dynamically allocating and releasing memory by calling a memory allocating function and a memory allocating function, and a memory allocating state table and collected memory allocating trace information. Memory allocation trace means for storing the memory allocation status table in the memory allocation status table, memory allocation tracing means for storing the collected memory allocation trace information in the memory allocation status table, and searching the symbol table in the load module file of the program. A symbol table search means, a user input / output device, and a command requesting a memory reservation trace are input from the user input / output device, whereby the symbol table search means searches the symbol table with a memory reservation function name. Of the memory allocation function obtained by A breakpoint is set at the head address, memory reservation trace information is collected at the time of a break due to the breakpoint, stored in the memory reservation state table by the memory reservation trace means, and the memory is released from the user input / output device. When a command requesting a trace is input, a breakpoint is set at the start address of the memory release function obtained by searching the symbol table with the memory release function name by the symbol table search means, and Break point control means for collecting memory release trace information at the time of break and storing it in the memory secured state table by the memory released trace means, and a command for requesting display of the memory secured state from the user input / output device are input. Especially And a memory allocation status display means for reading the memory allocation trace information and the memory allocation trace information stored in the memory allocation status table and outputting them to the user input / output device. .
【請求項5】 前記ブレークポイント制御手段は、前記
メモリ確保関数の先頭アドレスのブレークポイントによ
るブレーク時に、該ブレークポイントのメモリアドレス
で前記シンボルテーブルを検索して前記メモリ確保関数
を呼び出した関数名,行番号を取得すると共に、前記メ
モリ確保関数の呼び出しパラメータからメモリサイズを
取得し、これらを前記メモリ確保トレース情報として前
記メモリ確保トレース手段によって前記メモリ確保状態
テーブルに格納し、且つ、前記メモリ解放関数の先頭ア
ドレスのブレークポイントによるブレーク時に、該ブレ
ークポイントのメモリアドレスで前記シンボルテーブル
を検索して前記メモリ解放関数を呼び出した関数名,行
番号を取得すると共に、前記メモリ解放関数の呼び出し
パラメータからメモリアドレスを取得し、これらを前記
メモリ解放トレース情報として前記メモリ解放トレース
手段によって前記メモリ確保状態テーブルに格納するこ
とを特徴とする請求項4記載のメモリ割当トレース装
置。
5. The break point control means searches the symbol table with the memory address of the breakpoint at the time of the break due to the break point at the start address of the memory securing function, and calls the memory securing function, The memory size is acquired from the call parameter of the memory allocation function, the line size is acquired, the memory size is stored in the memory allocation state table as the memory allocation trace information by the memory allocation trace means, and the memory release function is also acquired. At the time of a break due to a breakpoint at the start address of the memory release function, the symbol table is searched with the memory address of the breakpoint to obtain the function name and line number that called the memory release function, and a memo from the call parameter of the memory release function. 5. The memory allocation trace device according to claim 4, wherein re-addresses are acquired and stored as the memory release trace information in the memory allocation state table by the memory release trace means.
【請求項6】 前記メモリ解放トレース手段は、前記ブ
レークポイント制御手段から渡されたメモリ解放トレー
ス情報中のメモリアドレスと一致するメモリアドレスが
メモリ確保トレース情報として前記メモリ確保状態テー
ブルに記憶されていないことにより、その旨のメッセー
ジを前記利用者入出力装置に出力することを特徴とする
請求項5記載のメモリ割当トレース装置。
6. The memory release trace means does not store a memory address matching the memory address in the memory release trace information passed from the breakpoint control means as memory reserve trace information in the memory reserve state table. The memory allocation trace device according to claim 5, wherein a message to that effect is output to the user input / output device.
【請求項7】 前記ブレークポイント制御手段は、前記
メモリ確保関数の先頭アドレスのブレークポイントによ
るブレーク時に、前記メモリ確保関数からの戻りアドレ
スにブレークポイントを設定し、該設定したブレークポ
イントによるブレーク時に前記メモリ確保関数のリター
ン値から確保されたメモリアドレスを取得し、該取得し
たメモリアドレスを前記メモリ確保トレース手段によっ
て前記メモリ確保状態テーブルに登録することを特徴と
する請求項6記載のメモリ割当トレース装置。
7. The break point control means sets a break point at a return address from the memory reservation function at the time of a break at the start address of the memory reservation function, and sets the break point at the set break point. 7. The memory allocation trace device according to claim 6, wherein a reserved memory address is acquired from a return value of the memory reservation function, and the acquired memory address is registered in the memory reservation state table by the memory reservation trace means. .
JP5054972A 1993-02-19 1993-02-19 Memory allocation tracing device Expired - Fee Related JPH0820976B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5054972A JPH0820976B2 (en) 1993-02-19 1993-02-19 Memory allocation tracing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5054972A JPH0820976B2 (en) 1993-02-19 1993-02-19 Memory allocation tracing device

Publications (2)

Publication Number Publication Date
JPH06242989A true JPH06242989A (en) 1994-09-02
JPH0820976B2 JPH0820976B2 (en) 1996-03-04

Family

ID=12985577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5054972A Expired - Fee Related JPH0820976B2 (en) 1993-02-19 1993-02-19 Memory allocation tracing device

Country Status (1)

Country Link
JP (1) JPH0820976B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102180892A (en) * 2011-03-24 2011-09-14 海南灵康制药有限公司 Novel method for purifying cefmetazole sodium
JP2016514322A (en) * 2013-03-15 2016-05-19 アビニシオ テクノロジー エルエルシー Record program execution

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102180892A (en) * 2011-03-24 2011-09-14 海南灵康制药有限公司 Novel method for purifying cefmetazole sodium
JP2016514322A (en) * 2013-03-15 2016-05-19 アビニシオ テクノロジー エルエルシー Record program execution

Also Published As

Publication number Publication date
JPH0820976B2 (en) 1996-03-04

Similar Documents

Publication Publication Date Title
US8028278B2 (en) Method of generating and utilizing debug history
US20070074168A1 (en) Automated step type determination
US6658649B1 (en) Method, apparatus and article of manufacture for debugging a user defined region of code
US6981248B2 (en) Conditional breakpoint encountered indication
CN110955598B (en) Breakpoint processing method and device for kernel mode program
US7865883B1 (en) Parallel and asynchronous debugger and debugging method for multi-threaded programs
JPH06242989A (en) Memory allocation tracing device
US6983454B2 (en) Extended “run to” function
CN111736935B (en) Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging
CN113867834A (en) Debugging plug-in calling method and device and computer readable storage medium
JP2642788B2 (en) Execution monitoring point reduction method
JP2001184235A (en) Device for obtaining and analyzing log information
JPH07191876A (en) Program testing device and using method for the same
JPH0468446A (en) Debugging supporting device
JP2001067245A (en) Simulation method and simulation device
JPH0816431A (en) Debugging process system for user program
JP2001265619A (en) Data tracing system
JP3006499B2 (en) Function trace method of symbolic debugger
JPH02300943A (en) Debug support system
JPH07319730A (en) Test debugging method
JPH0431933A (en) Source program analyzing device
JPH05181702A (en) Soft debugger
JPH05342052A (en) Debugging system
JPS63173139A (en) Auxiliary system for debug of program
JP2001202272A (en) Debugging method, debugging device using this method and recording medium with debugging method recorded thereon

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees