JP2001236243A - Debug method and recording medium with program for debug recorded - Google Patents

Debug method and recording medium with program for debug recorded

Info

Publication number
JP2001236243A
JP2001236243A JP2000044037A JP2000044037A JP2001236243A JP 2001236243 A JP2001236243 A JP 2001236243A JP 2000044037 A JP2000044037 A JP 2000044037A JP 2000044037 A JP2000044037 A JP 2000044037A JP 2001236243 A JP2001236243 A JP 2001236243A
Authority
JP
Japan
Prior art keywords
function
information
designated
debugging
debug
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
JP2000044037A
Other languages
Japanese (ja)
Inventor
Mitsuru Iwasaki
満 岩崎
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2000044037A priority Critical patent/JP2001236243A/en
Publication of JP2001236243A publication Critical patent/JP2001236243A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize the efficiency of a debug work. SOLUTION: In a step 201, an object code and symbol information is read from a load module file to a memory area, and a symbol table in which the function name and function information of each function is arrayed and reading flags are additionally arrayed is prepared based on the symbol information. In a step 202, functions to be debugged are selected and designated from among the functions, and held as the designated functions. In a step 203, the debug information of the designated functions and a calling destination function to be directly called within the designated functions whose reading flags is in a reset stats is read from the load module file by referring to the symbol table, and the reading flags are set. In a step 204, debug processing is operated corresponding to the designated functions.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はデバッグ方法に関
し、特に、ソースプログラムを構成する関数単位で上位
階層よりステップ実行しデバッグするデバッグ方法に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging method, and more particularly, to a debugging method for performing step-by-step debugging of a function constituting a source program from an upper hierarchy.

【0002】[0002]

【従来の技術】従来、この種のデバッグ方法は、記憶媒
体に記録されたデバッグ用プログラムまたはデバッガを
読み取り実行するコンピュータ構成のデバッグ装置によ
り実施され、アプリケーション開発時に作成されたアプ
リケーションプログラムをデバッグするために用いられ
ている。
2. Description of the Related Art Conventionally, this kind of debugging method is performed by a debugging device having a computer configuration that reads and executes a debugging program or a debugger recorded on a storage medium, and is used to debug an application program created during application development. It is used for

【0003】近年、開発されるアプリケーションプログ
ラムは、一般的に、複雑・長大なプログラムとなってい
る。その対策として、アプリケーションプログラム開発
者は、設計時に階層化などの設計手法を取り込み、ま
た、記憶媒体に記録されたデバッグ用プログラムまたは
デバッガを読み取り実行するコンピュータ構成の装置を
用いて、アプリケーションプログラムをデバッグしてい
る。
[0003] In recent years, application programs to be developed are generally complex and long programs. As a countermeasure, the application program developer incorporates a design method such as layering at the time of design, and debugs the application program using a computer program that reads and executes a debugging program or a debugger recorded on a storage medium. are doing.

【0004】このアプリケーションプログラムのデバッ
グでは、ソースプログラムのコンパイルまたはアセンブ
ル処理およびリンク処理により生成されたオブジェクト
コード、デバッグ情報およびシンボル情報を含むロード
モジュールファイルを読み込み、デバッグ情報およびシ
ンボル情報を参照して、ソースプログラムを構成する関
数またはセグメントなどの単位で上位階層よりステップ
実行しデバッグするソース・デバッグが一般的に行わ
れ、デバッグ作業の効率化が図られる。
In debugging the application program, a load module file including object code, debug information and symbol information generated by compiling or assembling and linking a source program is read, and the debug information and the symbol information are referred to. Source debugging is generally performed, in which steps are executed and debugged from a higher layer in units of functions or segments constituting a source program, and the efficiency of debugging work is improved.

【0005】また、このアプリケーションプログラムを
ソース・デバッグするデバッグ方法として、ソースプロ
グラムを構成する全関数のデバッグ情報がコンパイルま
たはアセンブル処理により生成されるか否かにより、2
つのデバッグ方法に大別できる。
A method of debugging the source of the application program depends on whether debug information of all functions constituting the source program is generated by compiling or assembling.
There are two major debugging methods.

【0006】1つのデバッグ方法は、全関数のデバッグ
情報,オブジェクトコードが生成およびリンクされたロ
ードモジュールファイルを一回入力し関数単位で上位階
層よりソース・デバッグする方法であり、例えば、特開
平9−6644号公報に開示されているように、関数単
位のプログラム構造情報を含んだオブジェクトプログラ
ムを一回入力し、関数の階層構造を示すリンク構造情報
を形成し、このリンク構造情報に基づき、上位階層から
順に関数単位でオブジェクトプログラムをステップ実行
しソース・デバッグする。このデバッグ方法では、関数
単位のステップ実行により、デバッグ速度が向上され、
且つ、関数単位のデバッグ結果取得により、デバッグ精
度も向上する。
One debugging method is a method of once inputting the debug information of all functions and the load module file in which the object code is generated and linked, and performing source debugging on a function basis from an upper hierarchy. As disclosed in Japanese Patent No. -6644, an object program including program structure information for each function is input once to form link structure information indicating a hierarchical structure of functions, and based on the link structure information, Step execution of the object program in function units in order from the hierarchy to debug the source. In this debugging method, the speed of debugging is improved by step-by-function execution,
In addition, by acquiring the debugging result for each function, the debugging accuracy is also improved.

【0007】他のデバッグ方法は、予め選択されたデバ
ッグ対象関数のみのデバッグ情報と全関数のオブジェク
トコードとが生成およびリンクされたロードモジュール
ファイルを入力しデバッグ対象関数に対応してオブジェ
クトプログラムをステップ実行し、これら入力およびス
テップ実行を複数回繰り返すことにより、上位階層から
デバッグ対象関数単位で逐次にソース・デバッグする方
法である。
Another debug method is to input a load module file in which debug information of only a pre-selected debug target function and object codes of all functions are generated and linked, and step an object program corresponding to the debug target function. This is a method of performing source debugging in units of debug target functions from the upper hierarchy by repeating the input and step execution a plurality of times.

【0008】図4は、この逐次にソース・デバッグする
方法のコンパイルまたはアセンブル処理,リンク処理お
よびデバッグ処理の手順を示す流れ図である。また、図
5は、図4におけるコンパイルまたはアセンブル処理お
よびリンク処理の入出力ファイル構成を示す説明図であ
る。図4,図5を参照して説明する。
FIG. 4 is a flowchart showing the procedure of the compiling or assembling process, linking process, and debugging process of the method for sequentially debugging the source. FIG. 5 is an explanatory diagram showing an input / output file configuration of the compile or assemble process and the link process in FIG. This will be described with reference to FIGS.

【0009】まず、ステップ901で、複数のソースプ
ログラムS1〜Snをそれぞれ格納するソースプログラ
ムファイル501〜50nにおいて、どのファイルをデ
バッグするか選択し、ステップ902で、コンパイル/
アセンブル処理が行われ、選択されたデバッグ対象関数
を含むオブジェクトコードC1を格納するオブジェクト
モジュールファイル601のみにデバッグ情報D1を付
加し、他のオブジェクトコードC2〜Cnを格納するオ
ブジェクトモジュールファイル602〜60nにはデバ
ッグ情報を付加せず、オブジェクトモジュールファイル
601〜60nを作成し、ステップ903で、リンク処
理が行われ、アドレス解決を行ったロードモジュールフ
ァイル701を作成し、ステップ904で、デバッグ処
理が行われ、ステップ実行され、ロードモジュールファ
イル701内のデバッグ情報D1に基づきデバッグさ
れ、ステップ905により、これらステップ901〜9
04がデバッグ終了まで繰り返えされ、上位階層からデ
バッグ対象関数単位で逐次にソース・デバッグが行われ
る。
First, in step 901, which of the source program files 501 to 50 n for storing a plurality of source programs S 1 to Sn is selected is to be debugged.
The assembling process is performed, debug information D1 is added only to the object module file 601 storing the object code C1 including the selected debug target function, and the object module files 602 to 60n storing the other object codes C2 to Cn are added. Creates object module files 601 to 60n without adding debug information, creates a link module in step 903, creates a load module file 701 whose address has been resolved, and performs a debugging process in step 904. Are executed based on the debug information D1 in the load module file 701.
Step 04 is repeated till the end of debugging, and source debugging is sequentially performed from the upper hierarchy in units of debug target functions.

【0010】このデバッグ方法では、先に述べたデバッ
グ方法より小さいサイズのロードモジュールファイル7
01を作成することができ、より限られたメモリ領域で
デバッグを行える。
In this debugging method, the load module file 7 having a smaller size than the above-described debugging method is used.
01 can be created, and debugging can be performed in a more limited memory area.

【0011】[0011]

【発明が解決しようとする課題】従来のデバッグ方法に
おいて、ロードモジュールファイルを一回入力し上位階
層から順に関数単位でオブジェクトプログラムをステッ
プ実行しソースデバッグを行う場合、全関数のデバッグ
情報がロードモジュールファイルに付加されているた
め、ロードモジュールファイルサイズが大きく、ロード
する時間も長くなり、また、アプリケーションプログラ
ムのデバッグ処理に使用できるフリーなメモリ領域が少
なくなり、デバッグ処理の効率が低下するという問題が
ある。
In the conventional debugging method, when a load module file is input once and an object program is step-executed in units of functions in order from the upper layer to perform source debugging, debug information of all functions is stored in the load module. Since the file is added to the file, the load module file size is large, the load time is long, and the free memory area that can be used for the debug processing of the application program is reduced, and the efficiency of the debug processing is reduced. is there.

【0012】また、従来のデバッグ方法において、ロー
ドモジュールファイルの入力およびステップ実行を複数
回繰り返すことにより、上位階層からデバッグ対象関数
単位で逐次にソース・デバッグする場合も、コンパイル
またはアセンブル処理およびリンク処理をデバッグ対象
関数単位で複数回繰り返す必要があり、デバッグ作業全
体の効率が低くなる問題がある。 例えば、10種類の
機能を10ファイルにまたがって開発された場合、機能
をデバッグするために、 コンパイルまたはアセンブル
処理を最大100回行いリンク処理を10回行う必要が
ある。
Also, in the conventional debugging method, by repeatedly inputting and step-executing a load module file a plurality of times, the source or source debugger can be sequentially debugged in units of a debug target function from an upper hierarchy, so that compiling or assembling processing and link processing are performed. Needs to be repeated a plurality of times for each function to be debugged, which lowers the efficiency of the entire debugging work. For example, if ten types of functions are developed over ten files, it is necessary to perform compile or assemble processing at most 100 times and link processing ten times to debug the functions.

【0013】したがって、本発明の目的は、デバッグ作
業を効率化することにある。
Accordingly, it is an object of the present invention to make debugging work more efficient.

【0014】[0014]

【課題を解決するための手段】そのため、本発明は、ソ
ースプログラムのコンパイルまたはアセンブル処理およ
びリンク処理により生成されたオブジェクトコード、デ
バッグ情報およびシンボル情報を含むロードモジュール
ファイルを入力し、前記シンボル情報を参照して、前記
ソースプログラムを構成する関数の単位で上位階層より
前記オブジェクトコードをステップ実行しデバッグする
デバッグ方法において、デバッグ対象とする関数を前記
関数の中から選択指定して指定関数として保持し、前記
指定関数およびこの指定関数内で直接呼び出される呼出
先関数のデバッグ情報を前記ロードモジュールファイル
からメモリ領域へ読み込み、前記指定関数に対応して前
記オブジェクトコードをステップ実行している。
Therefore, the present invention provides a load module file including object code, debug information, and symbol information generated by compiling or assembling and linking a source program, and converting the symbol information. Referring to a debugging method for executing and debugging the object code step by step from a higher hierarchy in units of functions constituting the source program, a function to be debugged is selected and designated from the functions and held as a designated function. The debug information of the specified function and a callee function directly called in the specified function is read from the load module file into the memory area, and the object code is step-executed corresponding to the specified function.

【0015】また、前記ロードモジュールファイルから
前記オブジェクトコードおよび前記シンボル情報を前記
メモリ領域へ読み込み、前記シンボル情報に基づいて前
記各関数の関数名,関数情報をそれぞれ配列し且つ前記
ロードモジュールファイルからメモリ領域への前記デバ
ッグ情報の読込/未読込を示す読込フラグを付加配列し
たシンボルテーブルを作成するシンボルテーブル作成ス
テップと、デバッグ対象とする関数を前記関数の中から
選択指定して指定関数として保持する関数選択指定ステ
ップと、前記シンボルテーブルを参照し前記指定関数お
よびこの指定関数内で直接呼び出される呼出先関数であ
り且つ前記読込フラグがリセット状態である関数のデバ
ッグ情報を前記ロードモジュールファイルからそれぞれ
読み込み前記読込フラグをそれぞれセットするデバッグ
情報読込ステップと、前記指定関数に対応して前記オブ
ジェクトコードをステップ実行しデバッグするデバッグ
処理ステップとを含んでいる。
The object code and the symbol information are read from the load module file into the memory area, and function names and function information of the respective functions are arranged based on the symbol information. A symbol table creating step of creating a symbol table in which read flags indicating whether the debug information is read / unread into an area are added, and a function to be debugged is selected and designated from the functions and held as a designated function A function selection designating step, and reading, from the load module file, debug information of the designated function with reference to the symbol table and a function to be called directly in the designated function and having the read flag reset. The reading And debugging information reading step of setting the lug respectively, the object code corresponding to the designated function and a debugging process steps for debugging running step.

【0016】また、前記デバッグ情報読込ステップが、
前記シンボルテーブルを参照し前記指定関数のデバッグ
情報を前記ロードモジュールファイルから前記メモリ領
域に読み込み、前記読込フラグをセットするステップ
と、前記シンボルテーブルを参照し前記メモリ内の前記
指定関数のオブジェクトコードを検索し前記指定関数内
で直接呼び出される呼出先関数であり且つ前記読込フラ
グがリセット状態である関数のデバッグ情報を前記ロー
ドモジュールファイルから前記メモリ領域に読み込み、
前記読込フラグをセットするステップとを含んでいる。
[0016] The step of reading debug information may include:
Reading the debug information of the specified function from the load module file into the memory area by referring to the symbol table, and setting the read flag; and referring to the symbol table to read the object code of the specified function in the memory. Reading the debug information of the function which is a called function called directly in the designated function and whose read flag is in a reset state from the load module file into the memory area,
Setting the read flag.

【0017】また、本発明は、ソースプログラムのコン
パイルまたはアセンブル処理およびリンク処理により生
成されたオブジェクトコード、デバッグ情報およびシン
ボル情報を含むロードモジュールファイルを入力し、前
記シンボル情報を参照して、前記ソースプログラムを構
成する関数の単位で上位階層より前記オブジェクトコー
ドをステップ実行しデバッグする処理をコンピュータに
実行させるデバッグ用プログラムを記録した記録媒体に
おいて、デバッグ対象とする関数を前記関数の中から選
択指定して指定関数として保持し、前記指定関数および
この指定関数内で直接呼び出される呼出先関数のデバッ
グ情報を前記ロードモジュールファイルからメモリ領域
へ読み込み、前記指定関数に対応して前記オブジェクト
コードをステップ実行している。
The present invention also relates to a load module file including object code, debug information and symbol information generated by compiling or assembling and linking a source program, and referring to the symbol information to execute the source program. On a recording medium recording a debugging program for causing a computer to execute the step of executing and debugging the object code from the upper layer in units of functions constituting the program, a function to be debugged is selected and designated from the functions. And reads the debug information of the specified function and a called function directly called in the specified function from the load module file into a memory area, and executes the object code corresponding to the specified function. It is on the line.

【0018】また、前記ロードモジュールファイルから
前記オブジェクトコードおよび前記シンボル情報を前記
メモリ領域へ読み込み、前記シンボル情報に基づいて前
記各関数の関数名,関数情報をそれぞれ配列し且つ前記
ロードモジュールファイルからメモリ領域への前記デバ
ッグ情報の読込/未読込を示す読込フラグを付加配列し
たシンボルテーブルを作成するシンボルテーブル作成ス
テップと、デバッグ対象とする関数を前記関数の中から
選択指定して指定関数として保持する関数選択指定ステ
ップと、前記シンボルテーブルを参照し前記指定関数お
よびこの指定関数内で直接呼び出される呼出先関数であ
り且つ前記読込フラグがリセット状態である関数のデバ
ッグ情報を前記ロードモジュールファイルからそれぞれ
読み込み前記読込フラグをそれぞれセットするデバッグ
情報読込ステップと、前記指定関数に対応して前記オブ
ジェクトコードをステップ実行しデバッグするデバッグ
処理ステップとを含んでいる。
The object code and the symbol information are read from the load module file into the memory area, and the function names and function information of the respective functions are arranged based on the symbol information. A symbol table creating step of creating a symbol table in which read flags indicating whether the debug information is read / unread into an area are added, and a function to be debugged is selected and designated from the functions and held as a designated function A function selection designating step, and reading, from the load module file, debug information of the designated function with reference to the symbol table and a function to be called directly in the designated function and having the read flag reset. The reading And debugging information reading step of setting the lug respectively, the object code corresponding to the designated function and a debugging process steps for debugging running step.

【0019】また、前記デバッグ情報読込ステップが、
前記シンボルテーブルを参照し前記指定関数のデバッグ
情報を前記ロードモジュールファイルから前記メモリ領
域に読み込み、前記読込フラグをセットするステップ
と、前記シンボルテーブルを参照し前記メモリ内の前記
指定関数のオブジェクトコードを検索し前記指定関数内
で直接呼び出される呼出先関数であり且つ前記読込フラ
グがリセット状態である関数のデバッグ情報を前記ロー
ドモジュールファイルから前記メモリ領域に読み込み、
前記読込フラグをセットするステップとを含んでいる。
Further, the step of reading the debug information comprises:
Reading the debug information of the specified function from the load module file into the memory area by referring to the symbol table, and setting the read flag; and referring to the symbol table to read the object code of the specified function in the memory. Reading the debug information of the function which is a called function called directly in the designated function and whose read flag is in a reset state from the load module file into the memory area,
Setting the read flag.

【0020】[0020]

【発明の実施の形態】本発明によるデバッグ方法は、従
来のデバッグ方法と同じく、記憶媒体に記録されたデバ
ッグ用プログラムまたはデバッガを読み取り実行するコ
ンピュータ構成のデバッグ装置により実施され、アプリ
ケーション開発時に作成されたアプリケーションプログ
ラムをデバッグするために用いられる。次に、本発明に
よるデバッグ方法について、図面を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A debugging method according to the present invention is implemented by a debugging device having a computer configuration that reads and executes a debugging program or a debugger recorded on a storage medium, similarly to a conventional debugging method, and is created at the time of application development. Used to debug application programs Next, a debugging method according to the present invention will be described with reference to the drawings.

【0021】図1は、本発明のデバッグ方法の実施形態
を示す流れ図である。図1を参照して、本実施形態のデ
バッグ方法について説明する。ここで、本実施形態のデ
バッグ方法では、予め、ソースプログラムのコンパイル
またはアセンブル処理およびリンク処理により、ソース
プログラムを構成する全関数に対して、オブジェクトコ
ード、デバッグ情報およびシンボル情報が生成され、ロ
ードモジュールファイルが作成されている。
FIG. 1 is a flowchart showing an embodiment of the debugging method of the present invention. A debugging method according to the present embodiment will be described with reference to FIG. Here, in the debugging method of the present embodiment, object code, debug information, and symbol information are generated in advance for all functions constituting the source program by compiling or assembling and linking the source program. The file has been created.

【0022】まず、シンボルテーブル作成ステップ20
1で、ロードモジュールファイルからオブジェクトコー
ドおよびシンボル情報をメモリ領域へ読み込み、シンボ
ル情報に基づいて各関数の関数名,関数情報をそれぞれ
配列し且つロードモジュールファイルからメモリ領域へ
のデバッグ情報の読込/未読込を示す読込フラグを付加
配列したシンボルテーブルを作成する。
First, a symbol table creation step 20
In step 1, the object code and the symbol information are read from the load module file into the memory area, the function names and function information of the respective functions are arranged based on the symbol information, and the debug information is read from the load module file into the memory area. A symbol table in which read flags indicating reading are additionally arranged is created.

【0023】関数選択指定ステップ202で、デバッグ
対象とする関数を関数の中から選択指定して指定関数と
して保持する。
In a function selection designation step 202, a function to be debugged is selected and designated from the functions and held as a designated function.

【0024】デバッグ情報読込ステップ203で、シン
ボルテーブルを参照し、指定関数およびこの指定関数内
で直接呼び出される呼出先関数であり且つ読込フラグが
リセット状態である関数のデバッグ情報をロードモジュ
ールファイルからそれぞれ読み込み、読込フラグをそれ
ぞれセットする。
In the debug information reading step 203, the symbol table is referred to, and the debug information of the specified function and the call destination function directly called in the specified function and the read flag of which is in the reset state are respectively read from the load module file. Set the read and read flags respectively.

【0025】デバッグ処理ステップ204で、指定関数
に対応してオブジェクトコードをステップ実行しデバッ
グする。
In a debugging step 204, the object code is step-executed and debugged corresponding to the designated function.

【0026】ステップ205で、これらステップ20
2,203,204をデバッグ処理の終了まで繰り返
す。
In step 205, these steps 20
Steps 2, 203 and 204 are repeated until the end of the debugging process.

【0027】図2は、図1の処理で作成または参照され
るシンボルテーブル例を示す説明図である。このシンボ
ルテーブル例には、各関数の関数名301,関数情報3
02が表形式でそれぞれ配列され、且つ、読込フラグ3
03が付加配列されている。ここで、関数情報302
は、従来と同じく、関数,デバッグ情報の配置アドレ
ス,ロードモジュール内オフセット値、デバッグ情報の
数とを含み、読込フラグ303は、初期状態ではリセッ
トされ、デバッグ情報の読込みに対応してセットされ
る。
FIG. 2 is an explanatory diagram showing an example of a symbol table created or referred to in the processing of FIG. In this symbol table example, a function name 301 of each function, function information 3
02 are arranged in a table format, and the read flag 3
03 is added. Here, function information 302
Contains the function, the location address of the debug information, the offset value in the load module, and the number of the debug information, as in the prior art. The read flag 303 is reset in the initial state and is set in response to the read of the debug information. .

【0028】図3は、図1におけるデバッグ情報読込ス
テップ203の詳細処理例を示す流れ図である。図2を
参照して説明する。
FIG. 3 is a flowchart showing an example of the detailed processing of the debug information reading step 203 in FIG. This will be described with reference to FIG.

【0029】まず、ステップ401で、シンボルテーブ
ルを参照し、指定関数のデバッグ情報のロードモジュー
ルファイル内オフセット値を指定関数の関数情報から入
手して、指定関数のデバッグ情報をロードモジュールフ
ァイルからメモリ領域に読み込み、読込フラグをセット
する。
First, in step 401, referring to the symbol table, the offset value in the load module file of the debug information of the designated function is obtained from the function information of the designated function, and the debug information of the designated function is read from the load module file into the memory area. And set the read flag.

【0030】次に、ステップ402,403,404
で、シンボルテーブルを参照し、指定関数のオブジェク
トコードの配置アドレスを指定関数の関数情報から入手
し、指定関数のオブジェクトコードを順に検索し、オブ
ジェクトコードが分岐命令である場合、ステップ405
に進み、全オブジェクトコードを検索した場合、終了す
る。
Next, steps 402, 403, and 404
Then, referring to the symbol table, the allocation address of the object code of the designated function is obtained from the function information of the designated function, and the object code of the designated function is searched in order. If the object code is a branch instruction, step 405
When all object codes have been searched, the process ends.

【0031】ステップ405,406で、分岐命令コー
ドに基づきアドレス演算により分岐先アドレスを算出
し、この分岐先アドレスをキーワードとしてシンボルテ
ーブルの関数情報内の配置アドレスを検索し、指定関数
内で直接呼び出される呼出先関数であり且つ読込フラグ
がリセット状態である関数である条件との一致/不一致
を判断し、一致の場合ステップ407に進み、不一致の
場合ステップ403に戻る。
In steps 405 and 406, a branch destination address is calculated by an address operation on the basis of the branch instruction code, an arrangement address in the function information of the symbol table is searched using the branch destination address as a keyword, and directly called in the designated function. It is determined whether the read function is a function to be called and the read flag is in a reset state. If the match is found, the process proceeds to step 407. If not, the process returns to step 403.

【0032】ステップ407で、メモリ領域内に読み込
める容量の空きがあるかを判断し、空きの有無に対応し
て、ステップ408またはステップ409に進む。
At step 407, it is determined whether or not there is a free space in the memory area where data can be read, and the process proceeds to step 408 or 409 according to whether or not there is a free space.

【0033】ステップ408で、ステップ406で一致
した呼出先関数のデバッグ情報のロードモジュールファ
イル内オフセット値を関数情報から入手してデバッグ情
報をロードモジュールファイルからメモリ領域に読み込
み、読込フラグをセットし、ステップ404に戻る。ス
テップ409で、指定関数の再選択指定を促す旨のエラ
ーメッセージを出力して、終了する。
In step 408, the offset value in the load module file of the debug information of the callee function matched in step 406 is obtained from the function information, the debug information is read from the load module file into the memory area, and the read flag is set. Return to step 404. In step 409, an error message is displayed to prompt the user to reselect the designated function, and the process ends.

【0034】上述した本実施形態のデバッグ方法を実施
した場合、デバッグ対象とする関数を指定関数として選
択指定しながら、指定関数およびこの指定関数内で直接
呼び出される呼出先関数のデバッグ情報をロードモジュ
ールファイルからメモリ領域へ重複なしに読み込み、指
定関数に対応したデバッグ処理でフリーに使用できるメ
モリ領域を常に最大にして、デバッグ処理を効率的に行
える。また、この指定関数に対応したデバッグ処理が、
ソースプログラムを構成する関数の単位で上位階層より
行われ、ソース・デバッグが行われる。
When the above-described debugging method of the present embodiment is performed, the debug information of the specified function and the callee function directly called within the specified function is loaded into the load module while the function to be debugged is selected and specified as the specified function. The file can be read from the file into the memory area without duplication, and the memory area that can be used freely in the debugging processing corresponding to the specified function is always maximized, so that the debugging processing can be performed efficiently. Also, the debugging process corresponding to this specified function
Source debugging is performed from the upper hierarchy in units of functions constituting the source program.

【0035】[0035]

【発明の効果】以上説明したように、本発明によるデバ
ッグ方法は、デバッグ対象とする関数を指定関数として
選択指定しながらソースプログラムのソース・デバッグ
を行うときに、指定関数に対応したデバッグ処理でフリ
ーに使用できるメモリ領域が常に最大になり、デバッグ
処理を効率的に行える。また、デバッグ対象関数ごとの
ロードモジュールファイル作成が不要になり、さらに、
ロードモジュールファイルのロード時間が短縮され、デ
バッグ作業全体の効率が向上するなどの効果がある。
As described above, according to the debugging method of the present invention, when performing source debugging of a source program while selecting and specifying a function to be debugged as a specified function, the debugging process corresponding to the specified function is performed. The memory area that can be used freely is always maximized, and debugging can be performed efficiently. Also, it is not necessary to create a load module file for each function to be debugged.
This has the effect of reducing the load time of the load module file and improving the efficiency of the entire debugging work.

【0036】その理由は、デバッグ対象とする関数をソ
ースプログラムのコンパイル処理時またはリンク処理時
でなくデバッグ処理時に選択指定し、選択指定した指定
関数に対応したデバッグ処理に最小限必要な関数のデバ
ッグ情報として、指定関数およびこの指定関数内で直接
呼出されている関数のデバッグ情報をロードモジュール
ファイルからメモリ領域へ重複なしに読み込むためであ
る。
The reason is that the function to be debugged is selected and designated at the time of debugging, not at the time of compiling or linking the source program, and the debugging of the function required at least for the debugging corresponding to the selected function is designated. This is because the debug information of the designated function and the function directly called in the designated function is read from the load module file into the memory area without duplication.

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

【図1】本発明のデバッグ方法の実施形態を示す流れ図
である。
FIG. 1 is a flowchart showing an embodiment of a debugging method of the present invention.

【図2】図1の処理で作成または参照されるシンボルテ
ーブル例を示す説明図である。
FIG. 2 is an explanatory diagram showing an example of a symbol table created or referred to in the processing of FIG. 1;

【図3】図1におけるデバッグ情報読込ステップ203
の詳細処理例を示す流れ図である。
FIG. 3 is a step 203 for reading debug information in FIG. 1;
9 is a flowchart showing an example of the detailed processing of.

【図4】従来のコンパイルまたはアセンブル処理,リン
ク処理およびデバッグ処理の手順を示す流れ図である。
FIG. 4 is a flowchart showing the procedure of a conventional compile or assemble process, link process, and debug process.

【図5】図4におけるコンパイルまたはアセンブル処理
およびリンク処理の入出力ファイル構成を示す説明図で
ある。
FIG. 5 is an explanatory diagram showing an input / output file configuration of a compile or assemble process and a link process in FIG. 4;

【符号の説明】 201〜205,401〜409,901〜905
ステップ 301 関数名 302 関数情報 303 読込フラグ 501〜50n ソースプログラムファイル 601〜60n オブジェクトモジュールファイル 701 ロードモジュールファイル C1〜Cn オブジェクトコード D1 デバッグ情報 S1〜Sn ソースプログラム
[Description of Signs] 201 to 205, 401 to 409, 901 to 905
Step 301 Function name 302 Function information 303 Read flag 501 to 50n Source program file 601 to 60n Object module file 701 Load module file C1 to Cn Object code D1 Debug information S1 to Sn Source program

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 ソースプログラムのコンパイルまたはア
センブル処理およびリンク処理により生成されたオブジ
ェクトコード、デバッグ情報およびシンボル情報を含む
ロードモジュールファイルを入力し、前記シンボル情報
を参照して、前記ソースプログラムを構成する関数の単
位で上位階層より前記オブジェクトコードをステップ実
行しデバッグするデバッグ方法において、デバッグ対象
とする関数を前記関数の中から選択指定して指定関数と
して保持し、前記指定関数およびこの指定関数内で直接
呼び出される呼出先関数のデバッグ情報を前記ロードモ
ジュールファイルからメモリ領域へ読み込み、前記指定
関数に対応して前記オブジェクトコードをステップ実行
することを特徴とするデバッグ方法。
1. A load module file including object code, debug information, and symbol information generated by compiling or assembling and linking a source program is input, and the source program is configured by referring to the symbol information. In a debugging method of executing and debugging the object code step by step from a higher hierarchy in units of functions, a function to be debugged is selected and designated from among the functions and held as a designated function. A debugging method comprising: reading debug information of a directly called function from a load module file into a memory area; and step-executing the object code corresponding to the designated function.
【請求項2】 前記ロードモジュールファイルから前記
オブジェクトコードおよび前記シンボル情報を前記メモ
リ領域へ読み込み、前記シンボル情報に基づいて前記各
関数の関数名,関数情報をそれぞれ配列し且つ前記ロー
ドモジュールファイルからメモリ領域への前記デバッグ
情報の読込/未読込を示す読込フラグを付加配列したシ
ンボルテーブルを作成するシンボルテーブル作成ステッ
プと、デバッグ対象とする関数を前記関数の中から選択
指定して指定関数として保持する関数選択指定ステップ
と、前記シンボルテーブルを参照し前記指定関数および
この指定関数内で直接呼び出される呼出先関数であり且
つ前記読込フラグがリセット状態である関数のデバッグ
情報を前記ロードモジュールファイルからそれぞれ読み
込み前記読込フラグをそれぞれセットするデバッグ情報
読込ステップと、前記指定関数に対応して前記オブジェ
クトコードをステップ実行しデバッグするデバッグ処理
ステップとを含む、請求項1記載のデバッグ方法。
Reading the object code and the symbol information from the load module file into the memory area, arranging function names and function information of the respective functions based on the symbol information, and reading the memory information from the load module file; A symbol table creating step of creating a symbol table in which read flags indicating whether the debug information is read / unread into an area are added, and a function to be debugged is selected and designated from the functions and held as a designated function A function selection designating step, and reading, from the load module file, debug information of the designated function with reference to the symbol table and a function to be called directly in the designated function and having the read flag reset. The read flag 2. The debugging method according to claim 1, further comprising: a debugging information reading step of setting the following, and a debugging processing step of step-executing and debugging the object code corresponding to the designated function.
【請求項3】 前記デバッグ情報読込ステップが、前記
シンボルテーブルを参照し前記指定関数のデバッグ情報
を前記ロードモジュールファイルから前記メモリ領域に
読み込み、前記読込フラグをセットするステップと、前
記シンボルテーブルを参照し前記メモリ内の前記指定関
数のオブジェクトコードを検索し前記指定関数内で直接
呼び出される呼出先関数であり且つ前記読込フラグがリ
セット状態である関数のデバッグ情報を前記ロードモジ
ュールファイルから前記メモリ領域に読み込み、前記読
込フラグをセットするステップとを含む、請求項2記載
のデバッグ方法。
Reading the debug information of the specified function from the load module file into the memory area by referring to the symbol table, and setting the read flag; and referring to the symbol table. The object code of the specified function is searched in the memory, and the debug information of the function which is a called function directly called in the specified function and whose read flag is in a reset state is read from the load module file to the memory area. Reading, and setting the read flag.
【請求項4】 ソースプログラムのコンパイルまたはア
センブル処理およびリンク処理により生成されたオブジ
ェクトコード、デバッグ情報およびシンボル情報を含む
ロードモジュールファイルを入力し、前記シンボル情報
を参照して、前記ソースプログラムを構成する関数の単
位で上位階層より前記オブジェクトコードをステップ実
行しデバッグする処理をコンピュータに実行させるデバ
ッグ用プログラムを記録した記録媒体において、デバッ
グ対象とする関数を前記関数の中から選択指定して指定
関数として保持し、前記指定関数およびこの指定関数内
で直接呼び出される呼出先関数のデバッグ情報を前記ロ
ードモジュールファイルからメモリ領域へ読み込み、前
記指定関数に対応して前記オブジェクトコードをステッ
プ実行することを特徴とする、デバッグ用プログラムを
記録した記録媒体。
4. Inputting a load module file including object code, debug information and symbol information generated by compiling or assembling and linking a source program, and constructing the source program by referring to the symbol information A function to be debugged is selected and specified from the above functions in a recording medium in which a debugging program for causing a computer to execute a process of step-executing and debugging the object code from a higher hierarchy in units of functions is designated as a designated function. Holding, reading the debug information of the specified function and a call destination function directly called in the specified function from the load module file into a memory area, and step-executing the object code corresponding to the specified function. A recording medium on which a debugging program is recorded.
【請求項5】 前記ロードモジュールファイルから前記
オブジェクトコードおよび前記シンボル情報を前記メモ
リ領域へ読み込み、前記シンボル情報に基づいて前記各
関数の関数名,関数情報をそれぞれ配列し且つ前記ロー
ドモジュールファイルからメモリ領域への前記デバッグ
情報の読込/未読込を示す読込フラグを付加配列したシ
ンボルテーブルを作成するシンボルテーブル作成ステッ
プと、デバッグ対象とする関数を前記関数の中から選択
指定して指定関数として保持する関数選択指定ステップ
と、前記シンボルテーブルを参照し前記指定関数および
この指定関数内で直接呼び出される呼出先関数であり且
つ前記読込フラグがリセット状態である関数のデバッグ
情報を前記ロードモジュールファイルからそれぞれ読み
込み前記読込フラグをそれぞれセットするデバッグ情報
読込ステップと、前記指定関数に対応して前記オブジェ
クトコードをステップ実行しデバッグするデバッグ処理
ステップとを含む、請求項4記載の、デバッグ用プログ
ラムを記録した記録媒体。
5. The method according to claim 5, wherein the object code and the symbol information are read from the load module file into the memory area, and a function name and function information of each of the functions are arranged based on the symbol information. A symbol table creation step for creating a symbol table in which read flags indicating whether the debug information is read / unread into an area are added, and a function to be debugged is selected from the functions and designated and held as a designated function A function selection designating step, and reading, from the load module file, debug information of the designated function with reference to the symbol table and a function to be called directly in the designated function and having the read flag reset. The read flag 5. The recording medium according to claim 4, further comprising: a debug information reading step of setting a debug program, and a debug processing step of step-executing and debugging the object code corresponding to the designated function.
【請求項6】 前記デバッグ情報読込ステップが、前記
シンボルテーブルを参照し前記指定関数のデバッグ情報
を前記ロードモジュールファイルから前記メモリ領域に
読み込み、前記読込フラグをセットするステップと、前
記シンボルテーブルを参照し前記メモリ内の前記指定関
数のオブジェクトコードを検索し前記指定関数内で直接
呼び出される呼出先関数であり且つ前記読込フラグがリ
セット状態である関数のデバッグ情報を前記ロードモジ
ュールファイルから前記メモリ領域に読み込み、前記読
込フラグをセットするステップとを含む、請求項5記載
の、デバッグ用プログラムを記録した記録媒体。
6. The step of reading debug information reads the debug information of the designated function from the load module file into the memory area by referring to the symbol table, and sets the read flag, and refers to the symbol table. The object code of the specified function is searched in the memory, and the debug information of the function which is a called function directly called in the specified function and whose read flag is in a reset state is read from the load module file to the memory area. 6. The recording medium according to claim 5, further comprising reading and setting the read flag.
JP2000044037A 2000-02-22 2000-02-22 Debug method and recording medium with program for debug recorded Pending JP2001236243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000044037A JP2001236243A (en) 2000-02-22 2000-02-22 Debug method and recording medium with program for debug recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000044037A JP2001236243A (en) 2000-02-22 2000-02-22 Debug method and recording medium with program for debug recorded

Publications (1)

Publication Number Publication Date
JP2001236243A true JP2001236243A (en) 2001-08-31

Family

ID=18566866

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000044037A Pending JP2001236243A (en) 2000-02-22 2000-02-22 Debug method and recording medium with program for debug recorded

Country Status (1)

Country Link
JP (1) JP2001236243A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211521A (en) * 2009-03-10 2010-09-24 Nec Corp Device, method and program for automatically selecting verification target function
JP2011118901A (en) * 2009-11-30 2011-06-16 Internatl Business Mach Corp <Ibm> Method for memory optimization of virtual machine code by partitioning extraneous information, computer program, and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211521A (en) * 2009-03-10 2010-09-24 Nec Corp Device, method and program for automatically selecting verification target function
JP2011118901A (en) * 2009-11-30 2011-06-16 Internatl Business Mach Corp <Ibm> Method for memory optimization of virtual machine code by partitioning extraneous information, computer program, and system

Similar Documents

Publication Publication Date Title
US20080127113A1 (en) Method and system for implementing watchpoints
TWI243306B (en) Shared library system and method of building the system
CN104204975B (en) Sequencer debugging auxiliary device
JP4272371B2 (en) A debugging support device, a compiler device, a debugging support program, a compiler program, and a computer-readable recording medium.
JPH05505692A (en) Effective error reporting for executing conversion code
US7409677B1 (en) Method and system for creation and use of embedded trace description
JP2021184246A (en) Instruction conversion support program, instruction conversion support method and information processing device
JP5504960B2 (en) Simulation apparatus and simulation method
JP2009104252A (en) Debugging support device and debugging support method
CN117149209A (en) Code increment compiling method and device, computer equipment and storage medium
JP2009048259A (en) Program conversion method and program for conversion
JP2005338987A (en) Exception test support program and device
WO2020073200A1 (en) Program debugging method and system
JPH0766342B2 (en) Program test equipment
JP2001236243A (en) Debug method and recording medium with program for debug recorded
CN114020278B (en) Data processing method, device, equipment and storage medium
CN113961238A (en) Object conversion method and device, electronic equipment and storage medium
JP7059757B2 (en) API processing method, terminal, API processing program
JP3887550B2 (en) Cross-reference construction device, cross-reference construction method, and cross-reference construction program
JP3999949B2 (en) Alias name search apparatus, alias name search method, and alias name search program
KR100846203B1 (en) Method for generating mobile application and record media recorded program for realizing the same
CN110297768A (en) Method, apparatus, equipment and the storage medium of prototype SDK compatible analog device debug
JP4782315B2 (en) Impact analysis apparatus and method, recording medium, and program
CN117608590B (en) Data group package unpacking method and device and computer equipment
CN116775127B (en) Static symbol execution pile inserting method based on RetroWrite frames

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20030401