JP2002312192A - Loading address recognizing method for dynamic link library, computer device, recording medium and program - Google Patents

Loading address recognizing method for dynamic link library, computer device, recording medium and program

Info

Publication number
JP2002312192A
JP2002312192A JP2001112784A JP2001112784A JP2002312192A JP 2002312192 A JP2002312192 A JP 2002312192A JP 2001112784 A JP2001112784 A JP 2001112784A JP 2001112784 A JP2001112784 A JP 2001112784A JP 2002312192 A JP2002312192 A JP 2002312192A
Authority
JP
Japan
Prior art keywords
dynamic link
link library
loaded
main memory
program
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
JP2001112784A
Other languages
Japanese (ja)
Inventor
Masahiko Kojima
政彦 小島
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2001112784A priority Critical patent/JP2002312192A/en
Publication of JP2002312192A publication Critical patent/JP2002312192A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily recognize a loaded address in a main memory without using special software for analysis, when a nonconformity occurs in a dynamic link library. SOLUTION: When a DLL 70 is loaded on a main memory (MEM) 20 and then the DLL 70 is started by the application 40, a value (the load address value of DLL 70) of hModule by the execution of DLLMain is recorded in a registry 50, in advance of the primary execution of DLL.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、アプリケーション
プログラムの実行時に必要に応じて呼び出されるダイナ
ミックリンクライブラリィのデバッグ、不具合解析等に
適用して好適なダイナミックリンクライブラリィのロー
ド先アドレス認識方法、ダイナミックリンクライブラリ
ィを利用するアプリケーションプログラムを扱う、コン
ピュータ装置、記録媒体、及びプログラムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of recognizing a load destination address of a dynamic link library suitable for application to debugging, failure analysis, and the like of a dynamic link library called as needed when executing an application program. The present invention relates to a computer device, a recording medium, and a program that handle an application program using a link library.

【0002】[0002]

【従来の技術】コンピュータシステムに於いて、所定の
アプリケーション機能を実現する際、ダイナミックリン
クライブラリィ(dynamic link library;以下DLLと
称す)が利用される。
2. Description of the Related Art In a computer system, when a predetermined application function is realized, a dynamic link library (hereinafter referred to as DLL) is used.

【0003】このDLLはアプリケーションにより必要
に応じて呼び出され、動的に主記憶(メインメモリ)上
のメモリアドレスにロードされて、利用される。
The DLL is called by an application as needed, and is dynamically loaded to a memory address on a main memory (main memory) and used.

【0004】この際、DLLは、特殊な場合を除き、一
般に不特定のメモリアドレスにロード可能なように作ら
れている。従って、従来では、DLLで不具合が発生し
た場合に、DLLのロードされたメモリアドレスを調べ
るために、解析用のソフトウェアを予め用意しインスト
ールしておく必要があった。
At this time, the DLL is generally designed so that it can be loaded into an unspecified memory address except in special cases. Therefore, conventionally, when a problem occurs in the DLL, it is necessary to prepare and install analysis software in advance in order to check the memory address where the DLL is loaded.

【0005】このように、DLLは動的に不特定のメモ
リアドレスにロードされることから、DLLの不具合が
発生した場合に、DLLが主記憶上の何処のアドレスに
ロードされたかを調べる際、従来では、専用の解析用ソ
フトウェアを予め用意しインストールしておく必要があ
った。従って不具合解析用の高価な特殊ツールを予め用
意し、インストールしておかなければならないことか
ら、作業性が悪く、また経済的な負担も大きい等、種々
の問題があった。
As described above, since the DLL is dynamically loaded to an unspecified memory address, when a DLL failure occurs, when examining where the DLL is loaded in the main memory, Conventionally, it has been necessary to prepare and install dedicated analysis software in advance. Therefore, expensive special tools for failure analysis must be prepared and installed in advance, and thus there are various problems such as poor workability and a large economic burden.

【0006】[0006]

【発明が解決しようとする課題】上記したように、DL
Lは動的に不特定のメモリアドレスにロードされること
から、DLLの不具合が発生した場合、従来では、DL
Lがどのアドレスにロードされたかを調べるに、解析用
の特殊なソフトウェアを予め用意し、インストールして
おかなければならないことから、作業性が悪く、また経
済的な負担も大きい等、種々の問題があった。
As described above, the DL
Since L is dynamically loaded to an unspecified memory address, if a DLL failure occurs, the conventional
In order to find out to which address L is loaded, special software for analysis must be prepared and installed in advance, which causes various problems such as poor workability and a large economic burden. was there.

【0007】本発明は上記実情に鑑みなされたもので、
DLLに不具合が発生した場合に、主記憶上の何処のア
ドレスにロードされたかを解析用の特殊なソフトウェア
を必要とせずに容易に認識することのできる、ダイナミ
ックリンクライブラリィのロード先アドレス認識方法、
コンピュータ装置、記録媒体、及びプログラムを提供す
ることを目的とする。
[0007] The present invention has been made in view of the above circumstances,
A method for recognizing a load destination address of a dynamic link library, which can easily recognize where an address on the main memory has been loaded when a malfunction occurs in the DLL without requiring special software for analysis. ,
It is an object to provide a computer device, a recording medium, and a program.

【0008】[0008]

【課題を解決するための手段】DLLは動的に主記憶上
のメモリアドレスにロードされ、アプリケーションによ
り利用することができる。この際、DLLは、一般に、
不特定のメモリアドレスにロード可能なように作られて
いる。このようにロードされることにメモリアドレスが
不特定であるため、DLLで不具合が発生した場合、従
来では、DLLがどのアドレスにロードされたかを調べ
るために、解析用のソフトウェアを予めインストールし
ておく必要があったが、本発明に於いては、DLL自体
が、DLL本来の実行に先立ちDLLの起動時にロード
されたメモリ上のアドレスをOSの通知より取得し、当
該アドレス情報を所定の保存領域に記録するプログラム
ステップをもつことで、特殊な解析用のソフトウェアが
なくても、DLLのロードアドレスを後から知ることが
でき、トラブル等の解析に利用できるようにしたことを
特徴とする。
A DLL is dynamically loaded to a memory address in a main memory and can be used by an application. At this time, the DLL is generally
It is designed so that it can be loaded to an unspecified memory address. Since a memory address is unspecified to be loaded in this manner, if a malfunction occurs in the DLL, conventionally, analysis software is installed in advance to check at which address the DLL is loaded. However, in the present invention, the DLL itself acquires the address on the memory loaded at the time of starting the DLL from the OS notification prior to the original execution of the DLL, and stores the address information in a predetermined storage. By having a program step for recording in the area, the load address of the DLL can be known later without using special analysis software, and can be used for analysis of troubles and the like.

【0009】また、本発明に於いては、DLLを利用す
る(呼び出す)プログラムが、DLLのロードされたメ
モリ上のアドレスをOSの通知より取得し、当該アドレ
ス情報を所定の保存領域に記録するプログラムステップ
をもつことで、DLLのロードアドレスを後から知るこ
とができ、これにより、利用するすべてのDLLについ
て、そのロードアドレスを記録することができ、解析の
幅を広げたトラブル等の解析に利用できるようにしたこ
とを特徴とする。
In the present invention, a program that uses (calls) a DLL acquires an address in a memory where the DLL is loaded from an OS notification, and records the address information in a predetermined storage area. By having a program step, it is possible to know the load address of the DLL later, and thereby, it is possible to record the load address of all the DLLs to be used, and to analyze a trouble or the like that has expanded the analysis range. The feature is that it can be used.

【0010】即ち、本発明に係るダイナミックリンクラ
イブラリィ(DLL)のロード先アドレス認識方法は、
DLLがメインメモリ上にロードされたとき、当該ロー
ド先のアドレス情報を所定の保存領域に記録して、上記
DLLのデバッグ若しくは不具合解析時に、上記保存領
域上で上記DLLのロードアドレスを認識できるように
したことを特徴とする。
That is, a method of recognizing a load destination address of a dynamic link library (DLL) according to the present invention is as follows.
When the DLL is loaded on the main memory, the address information of the loading destination is recorded in a predetermined storage area so that the load address of the DLL can be recognized on the storage area at the time of debugging or malfunction analysis of the DLL. It is characterized by the following.

【0011】また、本発明に係るダイナミックリンクラ
イブラリィ(DLL)のロード先アドレス認識方法は、
DLLがメインメモリ上にロードされたとき、当該ロー
ド先のアドレス情報を取得し所定の保存領域に記録する
プログラムを当該DLL自体に備えて、DLLがメイン
メモリ上にロードされたとき当該DLLがもつプログラ
ムに従い上記ロード先のアドレス情報を上記保存領域に
記録し、上記保存領域上で上記DLLのロードアドレス
を認識できるようにしたことを特徴とする。
Further, a method of recognizing a load destination address of a dynamic link library (DLL) according to the present invention is provided.
When the DLL is loaded on the main memory, a program for acquiring the address information of the load destination and recording it in a predetermined storage area is provided in the DLL itself, and the DLL has the program when the DLL is loaded on the main memory. According to a program, the load destination address information is recorded in the storage area, and the load address of the DLL can be recognized on the storage area.

【0012】また、本発明に係るダイナミックリンクラ
イブラリィ(DLL)のロード先アドレス認識方法は、
DLLがメインメモリ上にロードされたとき、当該ロー
ド先のアドレス情報を取得し所定の保存領域に記録する
プログラムを上記DLLを使用するアプリケーションプ
ログラムに備えて、上記アプリケーションプログラムが
上記DLLを呼び出した際に、当該アプリケーションプ
ログラムがもつプログラムに従い上記ロード先のアドレ
ス情報を上記保存領域に記録し、上記保存領域上で上記
DLLのロードアドレスを認識できるようにしたことを
特徴とする。
Further, a method of recognizing a load destination address of a dynamic link library (DLL) according to the present invention is provided.
When the DLL is loaded on the main memory, a program for acquiring the address information of the loading destination and recording the information in a predetermined storage area is provided in the application program using the DLL, and the application program calls the DLL. The address information of the load destination is recorded in the storage area in accordance with a program of the application program, and the load address of the DLL can be recognized on the storage area.

【0013】また、本発明に係るコンピュータ装置は、
アプリケーションプログラムの実行時に於いてダイナミ
ックリンクライブラリィ(DLL)がメインメモリ上に
ロードされた際に、当該DLLがロードされたアドレス
情報を所定の保存領域に記録する手段を具備してなるこ
とを特徴とする。
[0013] The computer device according to the present invention includes:
When a dynamic link library (DLL) is loaded on the main memory at the time of execution of the application program, a means for recording the address information of the loaded DLL in a predetermined storage area is provided. And

【0014】また、本発明に係るコンピュータ装置は、
アプリケーションプログラムの実行時にダイナミックリ
ンクライブラリィ(DLL)がメインメモリ上にロード
された際、当該DLLがもつプログラムに従い、上記メ
インメモリ上にロードされたアドレス情報を所定の保存
領域に記録する手段を具備してなることを特徴とする。
[0014] Further, a computer device according to the present invention comprises:
When a dynamic link library (DLL) is loaded on the main memory at the time of execution of the application program, a means for recording the address information loaded on the main memory in a predetermined storage area in accordance with the program of the DLL. It is characterized by becoming.

【0015】また、本発明に係るコンピュータ装置は、
アプリケーションプログラムの実行時にダイナミックリ
ンクライブラリィ(DLL)がメインメモリ上にロード
された際、当該DLLを呼び出したアプリケーションプ
ログラムに従う処理により上記メインメモリ上にロード
されたアドレス情報を所定の保存領域に記録する手段を
具備してなることを特徴とする。
[0015] The computer device according to the present invention includes:
When a dynamic link library (DLL) is loaded on a main memory at the time of execution of an application program, address information loaded on the main memory is recorded in a predetermined storage area by a process according to the application program that called the DLL. It is characterized by comprising means.

【0016】また、本発明は、コンピュータ読み取り可
能な記録媒体に於いて、コンピュータに、ダイナミック
リンクライブラリィ(DLL)がメインメモリ上にロー
ドされたとき、当該ロード先のアドレス情報を取得し所
定の保存領域に記録する機能を実現させるためのプログ
ラムを記録したことを特徴とする。
Further, according to the present invention, in a computer-readable recording medium, when a dynamic link library (DLL) is loaded on a main memory, address information of the load destination is obtained and a predetermined A program for realizing the function of recording in the storage area is recorded.

【0017】また、本発明は、アプリケーションプログ
ラムの実行時に必要に応じメインメモリ上にロードされ
て用いられる、コンピュータにより読み取り可能なダイ
ナミックリンクライブラリィ(DLL)を有する記録媒
体であって、上記DLL自体に、メインメモリ上にロー
ドされたとき、当該ロード先のアドレス情報を取得する
機能と、上記取得したアドレス情報を所定の保存領域に
記録する機能とを実現させるためのプログラムを記録し
たことを特徴とする。
The present invention also relates to a recording medium having a computer-readable dynamic link library (DLL) which is loaded on a main memory as needed when executing an application program, and wherein the DLL itself is used. A program for realizing a function of acquiring the address information of the load destination when loaded on the main memory and a function of recording the acquired address information in a predetermined storage area. And

【0018】また、本発明は、ダイナミックリンクライ
ブラリィ(DLL)を必要に応じ呼び出して利用するア
プリケーションプログラムを記録した記録媒体であっ
て、上記アプリケーションプログラムに、上記DLLが
メインメモリ上にロードされたとき、当該ロード先のア
ドレス情報を取得する機能と、上記取得したアドレス情
報を所定の保存領域に記録する機能とを実現させるため
のプログラムを記録したことを特徴とする。
Further, the present invention is a recording medium recording an application program for calling and using a dynamic link library (DLL) as needed, wherein the DLL is loaded on a main memory in the application program. At this time, a program for realizing a function of acquiring the address information of the load destination and a function of recording the acquired address information in a predetermined storage area are recorded.

【0019】また、本発明は、コンピュータに、ダイナ
ミックリンクライブラリィ(DLL)がメインメモリ上
にロードされたとき、当該ロード先のアドレス情報を取
得し所定の保存領域に記録する機能を実現させるための
プログラムを、DLL、またはDLLを利用するプログ
ラムにもたせたことを特徴とする。
Further, the present invention provides a computer for realizing a function of acquiring address information of a load destination and recording the information in a predetermined storage area when a dynamic link library (DLL) is loaded on a main memory. Is provided in a DLL or a program using the DLL.

【0020】上記した本発明を適用することで、ダイナ
ミックリンクライブラリィに不具合が発生した場合に、
主記憶上の何処のアドレスにロードされたかを解析用の
特殊なソフトウェアを必要とせずに容易に認識すること
ができ、これにより、ダイナミックリンクライブラリィ
の実行時に於いて不具合が発生した際に、その不具合解
析を容易かつ迅速に行うことができる。
By applying the present invention described above, when a problem occurs in the dynamic link library,
It is possible to easily recognize where the address is loaded in the main memory without the need for special software for analysis, so that when a problem occurs during the execution of the dynamic link library, The failure analysis can be performed easily and quickly.

【0021】[0021]

【発明の実施の形態】以下図面を参照して本発明の実施
形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0022】先ず、図1乃至図3を参照して本発明の第
1実施形態を説明する。
First, a first embodiment of the present invention will be described with reference to FIGS.

【0023】本発明の第1実施形態に於いては、Win
dows(登録商標)のOS上で、ダイナミックリンク
ライブラリィ(DLL)自体に、ロードしたアドレスを
記録するプログラムステップをもつことで、当該DLL
がメインメモリ上にロードされたとき、当該ロード先の
アドレス情報を取得し所定の保存領域に記録する機能を
実現している。
In the first embodiment of the present invention, Win
By having a program step for recording the loaded address in the dynamic link library (DLL) itself on the OS of Windows (registered trademark),
When a file is loaded on the main memory, a function of acquiring the address information of the load destination and recording it in a predetermined storage area is realized.

【0024】DLLの作成時に於いて、予め、MAPフ
ァイルが生成される。このMAPファイルは、DLL内
の各関数の相対アドレス情報が記録される既存のファイ
ルである。
When a DLL is created, a MAP file is generated in advance. This MAP file is an existing file in which relative address information of each function in the DLL is recorded.

【0025】DLLがロードしたときのアドレスは、D
LLMain( )の第1パラメータの hModul
e で知ることができる。DLLMainの( )内の
関数は、DLLがロードされたときに必ず実行されるプ
ログラム関数である。
The address when the DLL loads is D
HModul of the first parameter of LLMain ()
e. The functions in parentheses in DLLMain are program functions that are executed whenever the DLL is loaded.

【0026】 BOOL APIENTRY DLLMain( HANDLE hModule, DWORD ul reason for call, LPVOID IpReserved ) 上記DLLMain( )の第1パラメータ hMod
ule の値(OSがセットしたDLLのロードアドレ
ス)を、例えばレジストリまたはファイルなどに記録す
る。
BOOL APIENTRY DLLMain (HANDLE hModule, DWORD ul) reason for call, LPVOID IpReserved) First parameter of DLLMain () hMod
The value of ule (the load address of the DLL set by the OS) is recorded in, for example, a registry or a file.

【0027】このように、本発明に於いては、従来、利
用されていなかったOSの通知で示されるDLLMai
nの第1パラメータ hModule でセットされた
DLLのロードアドレス値を有効に活用して、当該DL
Lのロードアドレス値をDLL本来(本体)の実行に先
立ち、DLL起動時にレジストリまたは所定のファイル
に記録することで、その後にDLLのロードアドレスを
認識できる。
As described above, according to the present invention, the DLL Mai indicated by the notification of the OS that has not been used conventionally is indicated.
n using the load address value of the DLL set by the first parameter hModule of the n
By recording the load address value of L in a registry or a predetermined file at the time of starting the DLL prior to execution of the DLL (main body), the load address of the DLL can be recognized thereafter.

【0028】この際の基本構成を図1に示す。ここで
は、DLLを利用するアプリケーションにより、DLL
が動的に呼び出されると、上記 DLLMain が実
行され、その際、上記 HANDLE hModule
でOSがセットした値(メインメモリ上にロードされ
たDLLのメモリアドレス)をレジストリ(またはファ
イル)に記録する。
FIG. 1 shows the basic configuration at this time. Here, the DLL that uses the DLL
Is dynamically invoked, the DLLMain is executed, at which time the HANDLE hModule is executed.
The value set by the OS (memory address of DLL loaded on the main memory) is recorded in the registry (or file).

【0029】実際に不具合などが発生した場合は、既存
のシステムと同様に、OSから不具合のアドレスが表示
される。この際、上記DLLの呼び出し後に於いて、D
LLのロードアドレスを知りたい場合は、上記レジスト
リ(またはファイル)を参照することで、DLLのロー
ドアドレスが分る。
When a trouble or the like actually occurs, the address of the trouble is displayed from the OS similarly to the existing system. At this time, after calling the DLL, D
If the user wants to know the load address of the DLL, the load address of the DLL can be obtained by referring to the registry (or file).

【0030】また、DLL内の何処の関数で不具合が起
きたかを調べるには、上記レジストリに記録したDLL
のロードアドレスと、上記MAPファイルとを参照する
ことで不具合箇所を特定することができる。
To find out which function in the DLL caused the failure, the DLL recorded in the registry
By referring to the load address of the MAP file and the MAP file, it is possible to identify a defective portion.

【0031】この際の一連の動作を図2に示すフローチ
ャートと図3に示す動作説明図を参照して説明する。
尚、図3に於いて、10は本発明で対象とするDLLを
利用するアプリケーションのプログラム処理を実行する
CPU、20は上記CPU10が実行するプログラムの
格納領域、作業用領域等に供されるメインメモリ(ME
M)、30は上記CPU10が実行する各種のプログラ
ム、ファイル等を保存しておく外部記憶装置(EX
M)、40はメインメモリ(MEM)20上に呼び出さ
れたCPU10の実行対象にあるアプリケーション(プ
ログラム)、50は外部記憶装置(EXM)30に置か
れたレジストリ、60は外部記憶装置(EXM)30に
置かれた、メインメモリ(MEM)20上にロードされ
る以前のDLL、70は外部記憶装置(EXM)30か
らメインメモリ(MEM)20上にロードされたDLL
である。
A series of operations at this time will be described with reference to a flowchart shown in FIG. 2 and an operation explanatory diagram shown in FIG.
In FIG. 3, reference numeral 10 denotes a CPU for executing program processing of an application using the DLL which is a target of the present invention, and reference numeral 20 denotes a main area provided for a storage area for programs executed by the CPU 10 and a work area. Memory (ME
M) and 30 are external storage devices (EX) for storing various programs, files, and the like executed by the CPU 10.
M), 40 are applications (programs) that are called by the CPU 10 and are executed on the main memory (MEM) 20, 50 is a registry placed in the external storage device (EXM) 30, 60 is an external storage device (EXM) The DLL 70 placed on the main memory (MEM) 20 before being loaded on the main memory (MEM) 20 is the DLL loaded on the main memory (MEM) 20 from the external storage device (EXM) 30.
It is.

【0032】先ず、メインメモリ(MEM)20上に置
かれたアプリケーション40は、外部記憶装置(EX
M)30に置かれたDLL60を必要に応じて動的に呼
び出す(図3P1参照)。このアプリケーション40よ
り必要に応じて動的に呼び出されたDLL60は、メイ
ンメモリ(MEM)20上にDLL70としてロードさ
れる(図2ステップS1、図3P2参照)。
First, the application 40 placed on the main memory (MEM) 20 is stored in an external storage device (EX).
M) DLL 60 placed in 30 is dynamically called as required (see P1 in FIG. 3). The DLL 60 dynamically called as required by the application 40 is loaded as a DLL 70 on the main memory (MEM) 20 (see step S1 in FIG. 2 and P2 in FIG. 3).

【0033】この際、メインメモリ(MEM)20上に
ロードされるDLL70のアドレスは不定であり、ロー
ドの度に、その都度、OSが適当なアドレス値を決定す
る。
At this time, the address of the DLL 70 loaded on the main memory (MEM) 20 is undefined, and the OS determines an appropriate address value each time the DLL 70 is loaded.

【0034】メインメモリ(MEM)20上にDLL7
0がロードされた後、当該DLL70がアプリケーショ
ン40により起動されると(図3P3参照)、DLL本
来の実行に先立ち、上記した DLLMain の実行
による hModule の値がDLL70のロードア
ドレス値として、レジストリ50(またはファイル)に
記録される(図2ステップS2、図3P4参照)。
The DLL 7 is stored on the main memory (MEM) 20.
After the DLL 70 is started by the application 40 after the 0 is loaded (see P3 in FIG. 3), prior to the original execution of the DLL, the value of hModule by executing the DLLMain is set as the load address value of the DLL 70 and the registry 50 ( (See step S2 in FIG. 2, FIG. 3P4).

【0035】その後、DLL70本来の処理(DLL本
体の処理)が実行され(図2ステップS3)、その処理
中に、不具合が発生すると(図2ステップS4)、OS
が不具合の発生したアドレスを表示する(図2ステップ
S5)。
Thereafter, the original processing of the DLL 70 (processing of the DLL body) is executed (step S3 in FIG. 2). If a trouble occurs during the processing (step S4 in FIG. 2), the OS
Displays the address where the failure has occurred (step S5 in FIG. 2).

【0036】この際、上記不具合を解析する不具合解析
者は、上記レジストリ50に記録したアドレス情報と、
上記OSが表示したアドレスとをもとに不具合箇所を解
析することができる。
At this time, the defect analyzer who analyzes the above-mentioned defect stores the address information recorded in the registry 50,
The defective part can be analyzed based on the address displayed by the OS.

【0037】次に、図4を参照して本発明の第2実施形
態を説明する。
Next, a second embodiment of the present invention will be described with reference to FIG.

【0038】この本発明の第2実施形態は、上記した第
1実施形態がDLL自体に、ロード先のアドレスを記録
する機能を実現するプログラムを有しているのに対し
て、この第2実施形態では、DLLをロードするプログ
ラムに、DLLのロードされたメモリ上のアドレスをO
Sの通知より取得し、当該アドレス情報を所定の保存領
域に記録するプログラムを具備することで、DLLのロ
ードアドレスを後から知ることができるようにしたもの
で、これにより、プログラムが必要に応じて動的に呼び
出す、すべてのDLLについて、そのロードアドレスを
DLL呼び出しの都度、記録することができ、解析の幅
を広げることができる。
The second embodiment of the present invention is different from the first embodiment in that the DLL itself has a program for realizing a function of recording a load destination address in the DLL itself. In the embodiment, the address on the memory where the DLL is loaded is added to the program for loading the DLL by O.
By providing a program that obtains the address information from the notification of S and records the address information in a predetermined storage area, the load address of the DLL can be known later. The load address of all DLLs that are dynamically called can be recorded each time the DLL is called, and the range of analysis can be expanded.

【0039】この際のロードアドレスの記録動作を図4
に示す動作説明図を参照して説明する。尚、図4に於い
て、図3と同一部分には同一符号を付し、その説明を省
略する。
The recording operation of the load address at this time is shown in FIG.
The operation will be described with reference to the operation explanatory diagram shown in FIG. In FIG. 4, the same parts as those in FIG. 3 are denoted by the same reference numerals, and description thereof will be omitted.

【0040】メインメモリ(MEM)20上に置かれた
アプリケーション40は、外部記憶装置(EXM)30
に置かれたDLL60を必要に応じて動的に呼び出す
(図4P11参照)。
The application 40 placed on the main memory (MEM) 20 is connected to an external storage device (EXM) 30
Is dynamically called as needed (see P11 in FIG. 4).

【0041】外部記憶装置(EXM)30に置かれたD
LL60は、その都度、OSが決定したメインメモリ
(MEM)20上の不定のアドレスにDLL70として
ロードされる(図3P12参照)。
D placed in the external storage device (EXM) 30
The LL 60 is loaded as a DLL 70 at an undefined address on the main memory (MEM) 20 determined by the OS each time (see P12 in FIG. 3).

【0042】更に、その際、アプリケーション40は、
DLLの実行に先立ち、OSより取得したDLLのロー
ド先メモリアドレスをレジストリ(またはファイル)5
0に記録する(図3P13参照)。
Further, at this time, the application 40
Prior to execution of the DLL, the load destination memory address of the DLL obtained from the OS is stored in the registry (or file) 5.
0 is recorded (see P13 in FIG. 3).

【0043】この際は、load library と
いうファンクション(API)が必ず実行され、この
load library の戻り値(OSがセットし
たDLLのロードアドレス)をレジストリ(またはファ
イル)50に記録する。
At this time, a function (API) called load library is always executed.
The return value of the load library (the load address of the DLL set by the OS) is recorded in the registry (or file) 50.

【0044】これにより、レジストリ(またはファイ
ル)50を参照することで、DLLのロードアドレスを
後から知ることができ、上記第1実施形態と同様に、不
具合が発生した際、上記レジストリ(またはファイル)
50に記録したアドレス情報と、上記OSが表示したア
ドレスをもとに不具合箇所を解析することができる。特
にDLLを含むアプリケーションをダウンロードして動
作させた際に、そのアプリケーションが必要に応じ動的
に呼び出す、新規なDLLを含めたすべてのDLLに対
して、そのロードアドレスを認識できることから、新規
なDLLを含めた各DLLのデバッグ、トラブル解析等
が容易かつ円滑に行える。
Thus, by referring to the registry (or file) 50, the load address of the DLL can be known at a later time. )
The defective part can be analyzed based on the address information recorded in the address 50 and the address displayed by the OS. In particular, when an application including a DLL is downloaded and operated, the load address can be recognized for all DLLs including the new DLL that are dynamically called by the application as needed. Debugging, trouble analysis, etc. of each DLL including the above can be performed easily and smoothly.

【0045】尚、上記した各実施形態に於いて、DLL
の実行に先立ち、当該DLLのロードアドレスをレジス
トリ(またはファイル)に記録するプログラムをもつD
LL又はアプリケーションは、コンピュータ装置内に常
駐される構成、単体若しくは他のプログラムとともに、
例えばハードディスク、CD−ROM、フロッピィディ
スク、メモリカード等の記録媒体に格納して、任意の装
置が適宜使用する構成等のいずれであっても適用でき
る。
In each of the above embodiments, the DLL
Prior to execution of D, a program having a program for recording the load address of the DLL in a registry (or file)
The LL or the application, together with the configuration resident in the computer device, alone or with other programs,
For example, the present invention can be applied to any configuration that is stored in a recording medium such as a hard disk, a CD-ROM, a floppy disk, and a memory card and is appropriately used by an arbitrary device.

【0046】[0046]

【発明の効果】以上詳記したように本発明によれば、ダ
イナミックリンクライブラリィに不具合が発生した場合
に、主記憶上の何処のアドレスにロードされたかを解析
用の特殊なソフトウェアを必要とせずに容易に認識する
ことができる。これにより、ダイナミックリンクライブ
ラリィの実行時に於いて不具合が発生した際に、その不
具合解析を容易かつ迅速に行うことができる。
As described above in detail, according to the present invention, when a problem occurs in the dynamic link library, special software for analyzing which address in the main memory has been loaded is required. Can be easily recognized without the need. Thus, when a failure occurs during the execution of the dynamic link library, the failure analysis can be performed easily and quickly.

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

【図1】本発明の第1実施形態に於ける基本構成を示す
ブロック図。
FIG. 1 is a block diagram showing a basic configuration according to a first embodiment of the present invention.

【図2】上記第1実施形態の処理手順を示すフローチャ
ート。
FIG. 2 is a flowchart showing a processing procedure of the first embodiment.

【図3】上記第1実施形態に於ける動作説明図。FIG. 3 is an explanatory diagram of an operation in the first embodiment.

【図4】本発明の第2実施形態に於ける動作説明図。FIG. 4 is an operation explanatory diagram according to a second embodiment of the present invention.

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

10…CPU 20…メインメモリ(MEM) 30…外部記憶装置(EXM) 40…アプリケーション(プログラム) 50…レジストリ 60…DLL(メインメモリ上にロードされる以前のD
LL) 70…DLL(メインメモリ上にロードされたDLL)
DESCRIPTION OF SYMBOLS 10 ... CPU 20 ... Main memory (MEM) 30 ... External storage device (EXM) 40 ... Application (program) 50 ... Registry 60 ... DLL (D before loading on main memory)
LL) 70... DLL (DLL loaded on main memory)

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 ダイナミックリンクライブラリィがメイ
ンメモリ上にロードされたとき、当該ロード先のアドレ
ス情報を所定の保存領域に記録して、上記ダイナミック
リンクライブラリィのデバッグ若しくは不具合解析時
に、上記保存領域上で上記ダイナミックリンクライブラ
リィのロードアドレスを認識できるようにしたことを特
徴とするダイナミックリンクライブラリィのロード先ア
ドレス認識方法。
When a dynamic link library is loaded on a main memory, address information of the load destination is recorded in a predetermined storage area, and when the dynamic link library is debugged or a failure is analyzed, the storage area is stored. A method for recognizing a load destination address of a dynamic link library, wherein the load address of the dynamic link library is recognized.
【請求項2】 ダイナミックリンクライブラリィがメイ
ンメモリ上にロードされたとき、当該ロード先のアドレ
ス情報を取得し所定の保存領域に記録するプログラムを
当該ダイナミックリンクライブラリィ自体に備えて、ダ
イナミックリンクライブラリィがメインメモリ上にロー
ドされたとき当該ダイナミックリンクライブラリィがも
つプログラムに従い上記ロード先のアドレス情報を上記
保存領域に記録し、上記保存領域上で上記ダイナミック
リンクライブラリィのロードアドレスを認識できるよう
にしたことを特徴とするダイナミックリンクライブラリ
ィのロード先アドレス認識方法。
2. The dynamic link library according to claim 1, wherein when the dynamic link library is loaded on the main memory, a program for acquiring the address information of the load destination and recording the information in a predetermined storage area is provided in the dynamic link library itself. When the data is loaded on the main memory, the address information of the load destination is recorded in the storage area according to the program of the dynamic link library, and the load address of the dynamic link library can be recognized on the storage area. A method for recognizing a load destination address of a dynamic link library, characterized in that:
【請求項3】 ダイナミックリンクライブラリィがメイ
ンメモリ上にロードされたとき、当該ロード先のアドレ
ス情報を取得し所定の保存領域に記録するプログラムを
上記ダイナミックリンクライブラリィを使用するアプリ
ケーションプログラムに備えて、上記アプリケーション
プログラムが上記ダイナミックリンクライブラリィを呼
び出した際に、当該アプリケーションプログラムがもつ
プログラムに従い上記ロード先のアドレス情報を上記保
存領域に記録し、上記保存領域上で上記ダイナミックリ
ンクライブラリィのロードアドレスを認識できるように
したことを特徴とするダイナミックリンクライブラリィ
のロード先アドレス認識方法。
3. A program for obtaining address information of a load destination when a dynamic link library is loaded on a main memory and recording the information in a predetermined storage area is provided in an application program using the dynamic link library. When the application program calls the dynamic link library, the address information of the load destination is recorded in the storage area according to the program of the application program, and the load address of the dynamic link library is stored in the storage area. A method for recognizing a load destination address of a dynamic link library, characterized in that the method is capable of recognizing a dynamic link library.
【請求項4】 アプリケーションプログラムの実行時に
於いてダイナミックリンクライブラリィがメインメモリ
上にロードされた際に、当該ダイナミックリンクライブ
ラリィがロードされたアドレス情報を所定の保存領域に
記録する手段を具備してなることを特徴とするコンピュ
ータ装置。
4. When the dynamic link library is loaded on the main memory at the time of execution of the application program, there is provided means for recording address information of the loaded dynamic link library in a predetermined storage area. A computer device, comprising:
【請求項5】 アプリケーションプログラムの実行時に
ダイナミックリンクライブラリィがメインメモリ上にロ
ードされた際、当該ダイナミックリンクライブラリィが
もつプログラムに従い、上記メインメモリ上にロードさ
れたアドレス情報を所定の保存領域に記録する手段を具
備してなることを特徴とするコンピュータ装置。
5. When the dynamic link library is loaded on the main memory at the time of execution of the application program, the address information loaded on the main memory is stored in a predetermined storage area in accordance with the program of the dynamic link library. A computer device comprising means for recording.
【請求項6】 アプリケーションプログラムの実行時に
ダイナミックリンクライブラリィがメインメモリ上にロ
ードされた際、当該ダイナミックリンクライブラリィを
呼び出したアプリケーションプログラムに従う処理によ
り上記メインメモリ上にロードされたアドレス情報を所
定の保存領域に記録する手段を具備してなることを特徴
とするコンピュータ装置。
6. When the dynamic link library is loaded on the main memory at the time of execution of the application program, the address information loaded on the main memory by a process according to the application program that called the dynamic link library is stored in a predetermined location. A computer device comprising means for recording in a storage area.
【請求項7】 コンピュータに、ダイナミックリンクラ
イブラリィがメインメモリ上にロードされたとき、当該
ロード先のアドレス情報を取得し所定の保存領域に記録
する機能を実現させるためのプログラムを記録したコン
ピュータ読み取り可能な記録媒体。
7. When a dynamic link library is loaded on a main memory, the computer reads a computer program for realizing a function of acquiring address information of the load destination and recording the information in a predetermined storage area. Possible recording medium.
【請求項8】 アプリケーションプログラムの実行時に
必要に応じメインメモリ上にロードされて用いられる、
コンピュータにより読み取り可能なダイナミックリンク
ライブラリィを有する記録媒体であって、 上記ダイナミックリンクライブラリィ自体に、 メインメモリ上にロードされたとき、当該ロード先のア
ドレス情報を取得する機能と、 上記取得したアドレス情報を所定の保存領域に記録する
機能とを実現させるためのプログラムを記録した機械読
み取り可能な記録媒体。
8. An application program is used by being loaded onto a main memory as needed at the time of execution of the application program.
A recording medium having a dynamic link library readable by a computer, wherein the dynamic link library itself has a function of acquiring address information of a load destination when the dynamic link library is loaded on a main memory; A machine-readable recording medium storing a program for realizing a function of recording information in a predetermined storage area.
【請求項9】 ダイナミックリンクライブラリィを必要
に応じ呼び出して利用するアプリケーションプログラム
を記録した記録媒体であって、 上記アプリケーションプログラムに、 上記ダイナミックリンクライブラリィがメインメモリ上
にロードされたとき、当該ロード先のアドレス情報を取
得する機能と、 上記取得したアドレス情報を所定の保存領域に記録する
機能とを実現させるためのプログラムを記録した機械読
み取り可能な記録媒体。
9. A recording medium on which an application program for calling and using a dynamic link library as needed is recorded, wherein when the dynamic link library is loaded on a main memory in the application program, the loading is performed. A machine-readable recording medium storing a program for realizing a function of acquiring the above-mentioned address information and a function of recording the acquired address information in a predetermined storage area.
【請求項10】 コンピュータに、ダイナミックリンク
ライブラリィがメインメモリ上にロードされたとき、当
該ロード先のアドレス情報を取得し所定の保存領域に記
録する機能を実現させるためのプログラム。
10. A program for realizing a function of causing a computer to acquire, when a dynamic link library is loaded on a main memory, address information of a load destination and record the acquired address information in a predetermined storage area.
【請求項11】 コンピュータがアプリケーションプロ
グラムを実行している際に必要に応じてメインメモリ上
にロードされて用いられるダイナミックリンクライブラ
リィに含まれるプログラムであって、コンピュータに、
上記ダイナミックリンクライブラリィがメインメモリ上
にロードされたとき、当該ロード先のアドレス情報を取
得する機能と、当該取得したロード先のアドレス情報を
所定の保存領域に記録する機能とを実現させるためのプ
ログラム。
11. A program included in a dynamic link library loaded and used on a main memory as needed when the computer is executing an application program, the program comprising:
When the dynamic link library is loaded on the main memory, a function of acquiring the address information of the load destination and a function of recording the acquired address information of the load destination in a predetermined storage area are realized. program.
【請求項12】 コンピュータが実行する、ダイナミッ
クリンクライブラリィを利用するアプリケーションプロ
グラムに含まれ、コンピュータに、ダイナミックリンク
ライブラリィがメインメモリ上にロードされたとき当該
ロード先のアドレス情報を取得する機能と、当該取得し
たロード先のアドレス情報を所定の保存領域に記録する
機能とを実現させるためのプログラム。
12. A function included in an application program executed by a computer and using a dynamic link library, wherein the computer obtains, when the dynamic link library is loaded on a main memory, address information of the load destination. A function of recording the obtained load destination address information in a predetermined storage area.
【請求項13】 アプリケーションプログラムの実行時
に必要に応じメインメモリ上にロードされて用いられる
ダイナミックリンクライブラリィに於いて、メインメモ
リ上にロードされたとき、当該ロード先のアドレス情報
を取得し所定の保存領域に記録する機能をコンピュータ
に実行させるプログラムを備えたダイナミックリンクラ
イブラリィ。
13. A dynamic link library which is loaded and used on a main memory as needed when an application program is executed. When the dynamic link library is loaded on the main memory, address information of the load destination is acquired and a predetermined address is obtained. A dynamic link library having a program for causing a computer to execute a function of recording in a storage area.
【請求項14】 ダイナミックリンクライブラリィを利
用するアプリケーションプログラムに於いて、ダイナミ
ックリンクライブラリィを呼び出した際に、当該ダイナ
ミックリンクライブラリィがロードされるメインメモリ
上のアドレス情報を取得し、所定の保存領域に記録する
機能をコンピュータに実行させるプログラムを備えたア
プリケーションプログラム。
14. An application program using a dynamic link library, when the dynamic link library is called, obtains address information on a main memory into which the dynamic link library is loaded, and saves the information. An application program including a program for causing a computer to execute a function of recording in an area.
JP2001112784A 2001-04-11 2001-04-11 Loading address recognizing method for dynamic link library, computer device, recording medium and program Pending JP2002312192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001112784A JP2002312192A (en) 2001-04-11 2001-04-11 Loading address recognizing method for dynamic link library, computer device, recording medium and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001112784A JP2002312192A (en) 2001-04-11 2001-04-11 Loading address recognizing method for dynamic link library, computer device, recording medium and program

Publications (1)

Publication Number Publication Date
JP2002312192A true JP2002312192A (en) 2002-10-25

Family

ID=18964128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001112784A Pending JP2002312192A (en) 2001-04-11 2001-04-11 Loading address recognizing method for dynamic link library, computer device, recording medium and program

Country Status (1)

Country Link
JP (1) JP2002312192A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905378A (en) * 2021-03-03 2021-06-04 广州虎牙科技有限公司 Crash information analysis method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905378A (en) * 2021-03-03 2021-06-04 广州虎牙科技有限公司 Crash information analysis method and device, electronic equipment and readable storage medium
CN112905378B (en) * 2021-03-03 2024-03-08 广州虎牙科技有限公司 Crash information analysis method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US5634002A (en) Method and system for testing graphical user interface programs
US6698016B1 (en) Method for injecting code into another process
JP2003186708A (en) Access right contradiction detecting device and analytical rule making device
US20050114847A1 (en) Method, apparatus and computer program for automatically determining compile-time module dependencies
JPH10320234A (en) Automatic test method for software
JP2002312192A (en) Loading address recognizing method for dynamic link library, computer device, recording medium and program
US7886279B2 (en) Information processing apparatus, control method therefor, computer program, and storage medium
JP2008186378A (en) Program for handling exception
JP5116606B2 (en) Software analysis system
KR101685299B1 (en) Automated testing method and apparatus for program processable non-deterministic events
US7519868B2 (en) Information processing apparatus, information processing method, computer program, and storage medium
US20060221364A1 (en) Information processor, control method therefor, computer program and storage medium
JP4055197B2 (en) Device for analyzing procedures included in the program
JP2002157144A (en) Automatic test system for software
KR100428712B1 (en) A Tracepoint Setting Method for Non-Stop Debugging of Multi-task Programs
US7395528B1 (en) Mechanism for tracing during boot
CN110941544A (en) Automatic testing method and framework
JP2001273168A (en) System for automatically testing software
JP2003263340A (en) Debug device
JP4149047B2 (en) Simulator
JP2003114834A (en) Usb device evaluation system
JP2001331344A (en) Fault information tracing device for integrated system
JPH07191876A (en) Program testing device and using method for the same
JP2022136477A (en) Test control program, information processing device and test control method
JPH0573365A (en) Bug analysis support system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080807

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080819

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090106