JP2010122759A - Debugging device, method of storing and restoring dump file, and program thereof - Google Patents
Debugging device, method of storing and restoring dump file, and program thereof Download PDFInfo
- Publication number
- JP2010122759A JP2010122759A JP2008293728A JP2008293728A JP2010122759A JP 2010122759 A JP2010122759 A JP 2010122759A JP 2008293728 A JP2008293728 A JP 2008293728A JP 2008293728 A JP2008293728 A JP 2008293728A JP 2010122759 A JP2010122759 A JP 2010122759A
- Authority
- JP
- Japan
- Prior art keywords
- dump file
- file
- dump
- data
- reduced
- 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
Links
Images
Abstract
Description
本発明はダンプファイルのデバッグに関し、特に該ダンプファイルの保存および復元に関する。 The present invention relates to dump file debugging, and more particularly to saving and restoring the dump file.
多くのコンピュータにおいて、正常な計算処理を継続できない状態になってしまった場合に、動作中のコンピュータの物理メモリ内のデータを原因調査のためにディスクなどのデータ記憶装置へ保存している。これをダンプファイルという。また、ダンプファイルを解析するアプリケーションプログラムをデバッガツールという。 In many computers, when normal calculation processing cannot be continued, data in the physical memory of the computer in operation is stored in a data storage device such as a disk for investigation of the cause. This is called a dump file. An application program that analyzes a dump file is called a debugger tool.
オペレーティングシステム、アプリケーションプログラムの障害調査に当たっては、過去の事例と新規の事例の比較によって調査を行うことが多い。また、類似の障害のダンプファイルを複数比較して調査することが有効な場合が多い。従って、ダンプファイルの保存については、デバッガツールによって一度参照された部分を、その参照された該ダンプファイル内の位置をそのままにして保存することが重要である。また、そのダンプファイルは長期に渡って保存されることが望ましい。 When investigating failures in operating systems and application programs, investigations are often conducted by comparing past cases with new cases. In many cases, it is effective to compare and investigate a plurality of dump files having similar failures. Therefore, regarding the saving of the dump file, it is important to save the part once referred to by the debugger tool while keeping the position in the referenced dump file as it is. The dump file is preferably stored for a long time.
ダンプファイルのデバッグ、特にそのダンプファイルの保存について、次のような関連技術がある。特許文献1には、ダンプファイルを一定のサイズに分けて圧縮することでダンプファイルのサイズを小さくするという技術が記載されている。特許文献2には、メモリ上でダンプ対象領域として登録された領域をダンプファイルに書き込むという技術が記載されている。特許文献3には、ダンプファイルを採取した後に圧縮するという技術が記載されている。特許文献4には、主記憶イメージを圧縮してダンプファイルに書き込むという技術が記載されている。
There are the following related techniques for debugging dump files, especially for saving dump files. Patent Document 1 describes a technique for reducing the size of a dump file by dividing the dump file into a certain size and compressing the dump file. Patent Document 2 describes a technique of writing an area registered as a dump target area on a memory into a dump file.
ダンプファイルは、サイズの大きなファイルであることが多い。また、今後のコンピュータ装置の物理メモリの容量がさらに大きくなっていくにつれ、ダンプファイルもさらに大きなファイルとなっていくことが予想される。したがって、より多くのダンプファイルを長期に渡って保存することは、巨大な容量のデータ記憶装置を必要とすることとなり、より困難となる。 The dump file is often a large file. In addition, as the physical memory capacity of future computer devices further increases, the dump file is expected to become a larger file. Therefore, storing a larger number of dump files over a long period of time requires a huge capacity data storage device, which is more difficult.
このため、上記の特許文献1,3,4では、ダンプファイルを圧縮して保存している。これらの文献で、ファイルの圧縮および伸張は、たとえばZIPやLHAなどのような可逆的なデータ圧縮および伸張の手法を使うことを前提としている。
For this reason, in the
しかし、上述したように、物理メモリのサイズが大きくなっていくことに伴って大きくなるダンプファイルに対しては、上記のような可逆的なデータ圧縮および伸張の手法によって圧縮しても、十分に小さなサイズのファイルにならない。このため、圧縮とは異なる、ダンプファイルの縮小方法が必要とされる。 However, as described above, a dump file that increases as the size of the physical memory increases can be sufficiently compressed even if it is compressed by the above-described reversible data compression and decompression method. The file does not become small. For this reason, there is a need for a dump file reduction method that is different from compression.
また、可逆的な圧縮および伸張を伴う方法では、この圧縮および伸張の作業中のデータがコンピュータの物理メモリもしくは不揮発性記憶装置に書き込まれるので、それに伴う記憶容量および処理の負荷がかかるという問題もある。 Further, in the method involving reversible compression and decompression, the data during the compression and decompression work is written into the physical memory or nonvolatile storage device of the computer, so that there is a problem that the associated storage capacity and processing load are applied. is there.
本発明の目的は、ダンプファイルをより小さいファイルサイズで保存し、以前行ったコマンドを再度実行できるように復元することを可能とするデバッグ装置、ダンプファイルの保存復元方法およびそのプログラムを提供することにある。 An object of the present invention is to provide a debugging device, a dump file saving and restoring method, and a program thereof that can save a dump file with a smaller file size and restore a previously executed command so that it can be executed again. It is in.
上記目的を達成するため、本発明に係るデバッグ装置は、ダンプファイルをデバッグするデバッガツールを有するデバッグ装置であって、デバッガツールがダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録する参照箇所記録手段と、タグファイルに記録された位置におけるデータをダンプファイルから読み取り、当該位置および位置におけるデータを記録した縮小ダンプファイルを作成する縮小ダンプファイル作成手段と、縮小ダンプファイルに記録された位置および位置におけるデータを読み取り、当該位置におけるデータを配置して復元ダンプファイルを作成する縮小ダンプファイル復元手段と、を有することを特徴とする。 In order to achieve the above object, a debugging device according to the present invention is a debugging device having a debugger tool for debugging a dump file, and when the debugger tool refers to the dump file, the position where the dump file is referenced is determined. Reference location recording means for recording as a tag file, reduced dump file creating means for reading data at a position recorded in the tag file from the dump file, and creating a reduced dump file recording the data at the position and location, and a reduced dump A reduced dump file restoring unit that reads data at a position and a position recorded in the file and arranges the data at the position to create a restored dump file.
上記目的を達成するため、本発明に係るダンプファイルの保存復元方法は、デバッガツールによって参照されるダンプファイルを保存および復元する方法であって、デバッガツールがダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録し、タグファイルに記録された位置におけるデータをダンプファイルから読み取り、当該位置および位置におけるデータを記録した縮小ダンプファイルを作成し、縮小ダンプファイルに記録された位置および位置におけるデータを読み取り、位置に該当する読み取ったデータを配置して復元ダンプファイルを作成することを特徴とする。 In order to achieve the above object, a method for saving and restoring a dump file according to the present invention is a method for saving and restoring a dump file referenced by a debugger tool. When the debugger tool references a dump file, the dump file is restored. Record the location where the file was referenced as a tag file, read the data at the location recorded in the tag file from the dump file, create a reduced dump file recording the data at that location and location, and record it in the reduced dump file. In this case, the restored data is read at the specified position and the position, and the read data corresponding to the position is arranged to create a restoration dump file.
上記目的を達成するため、本発明に係るダンプファイルの保存復元プログラムは、デバッグ装置を構成するコンピュータに、デバッガツールがダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録する手順と、タグファイルに記録された位置におけるデータをダンプファイルから読み取る手順と、当該位置および位置におけるデータを記録した縮小ダンプファイルを作成する手順と、縮小ダンプファイルに記録された位置および位置におけるデータを読み取る手順と、位置に該当する読み取ったデータを配置して復元ダンプファイルを作成する手順とを実行させることを特徴とする。 In order to achieve the above object, a dump file storage / restoration program according to the present invention provides a computer that constitutes a debugging device with a tag file at a location where the dump file is referenced when a debugger tool references the dump file. The procedure for recording, the procedure for reading the data at the position recorded in the tag file from the dump file, the procedure for creating the reduced dump file recording the data at the location and position, and the position and position recorded in the reduced dump file And a procedure for arranging the read data corresponding to the position and creating a restoration dump file.
本発明は、上述したようにデバッガツールがダンプファイルを参照した位置のデータのみを残した縮小ダンプファイルを作成し、それらのデータを当該位置にデータを配置して復元ダンプファイルを作成するように構成したので、以前行ったコマンドを再度実行することが可能である。これによって、ダンプファイルをより小さいファイルサイズで保存し、以前行ったコマンドを再度実行できるように復元することを可能とするという、従来にない優れたデバッグ装置、ダンプファイルの保存復元方法およびそのプログラムを提供することができる。 As described above, the present invention creates a reduced dump file in which only data at a position where the debugger tool refers to the dump file is left as described above, and places the data at the position to create a restored dump file. Now that you have configured it, you can re-execute previously executed commands. This makes it possible to save a dump file with a smaller file size and restore it so that a previously executed command can be executed again. Can be provided.
[第1の実施形態]
以下、本発明の第1の実施形態の構成について添付図に基づいて説明する。
最初に、本実施形態の基本的な内容について説明し、その後でより具体的な内容について説明する。
本実施形態に係るデバッグ装置10は、ダンプファイル31をデバッグするデバッガツール21を有するデバッグ装置であって、デバッガツール21がダンプファイル31を参照した場合に、該ダンプファイルが参照された位置をタグファイル33として記録する参照箇所記録手段44と、タグファイル33に記録された位置におけるデータをダンプファイル31から読み取り、当該位置および位置におけるデータを記録した縮小ダンプファイル34を作成する縮小ダンプファイル作成手段45と、縮小ダンプファイル34に記録された位置および位置におけるデータを読み取り、位置に該当するデータを配置して復元ダンプファイル35を作成する縮小ダンプファイル復元手段46と、を備える。
[First Embodiment]
Hereinafter, the configuration of the first embodiment of the present invention will be described with reference to the accompanying drawings.
First, the basic content of the present embodiment will be described, and then more specific content will be described.
The
また、デバッグ装置10は、デバッガツールを起動し、デバッガツールが参照しているダンプファイルのファイル名(ダンプファイル名26b)を監視テーブル26に書き込むデバッガ管理手段41を備える。
そして参照箇所記録手段44は、監視テーブル26を参照してダンプファイルのファイル名(ダンプファイル名26b)を認識し、このファイル名で示されるダンプファイル31が参照された位置を検出する。
Further, the
Then, the reference
そして縮小ダンプファイル復元手段46が、復元ダンプファイル35の縮小ダンプファイル34に記録されていない位置に、たとえば全部「0」などのような一時的な仮のデータである一時データを書き込む。
Then, the reduced dump file restoring means 46 writes temporary data, which is temporary temporary data such as all “0”, for example, at positions not recorded in the reduced
以上のように構成することにより、デバッグ装置10は、ダンプファイル31をより小さいファイルサイズで保存し、以前行ったコマンドを再度実行できるように復元することが可能となる。
With the configuration described above, the
さらにデバッグ装置10は、デバッガツール21でダンプファイル31に対して実行されたコマンドを記録したコマンド履歴ファイル32を作成するコマンド履歴作成手段43と、コマンド履歴ファイル32に記録されたコマンドの中からユーザによる選択を受け付け、選択されたコマンドをダンプファイル31に対して再度実行するコマンド選択手段42を有する。このように構成することにより、一度実行されたコマンドの再実行がさらに容易となる。
以下、これをさらに詳述する。
Furthermore, the
This will be described in further detail below.
(基本的な原理)
前述のように、ダンプファイルの保存については、デバッガツールによって一度参照された部分を、その参照された該ダンプファイル内の位置をそのままにして保存することが重要である。デバッガツールによって参照されていない部分を保存する必要はない。本発明はそのことを利用し、デバッガツールがダンプファイルを参照した場合に、その参照した部分だけを残し、未参照の部分を削除して、縮小ダンプファイルを作成するように構成されている。この処理には、ZIPやLHAなどのような、可逆的なデータ圧縮および伸張の手法を利用する必要はない。
(Basic principle)
As described above, regarding the saving of the dump file, it is important to save the part once referenced by the debugger tool while keeping the position in the referenced dump file as it is. It is not necessary to save the parts that are not referenced by the debugger tool. The present invention utilizes this fact, and when the debugger tool refers to the dump file, the reduced dump file is created by leaving only the referenced portion and deleting the unreferenced portion. For this process, it is not necessary to use a reversible data compression and decompression method such as ZIP or LHA.
また、縮小ダンプファイルから元のサイズのダンプファイルを復元する場合、未参照の部分も含めてその全体が可逆的に復元される必要はない。デバッガツールによって参照済の部分が、元のダンプファイル上の同一の位置に再現されていればよい。このため本発明では、縮小の段階で既に削除されたデータの部分については、一時的なデータを書き加えることで、元のダンプファイルサイズと同じサイズのファイルにする。このようにすることで、デバッガツールの種類に依存せずに、以前行ったコマンドを再度実行することが可能となる。 Further, when restoring the original dump file from the reduced dump file, it is not necessary to reversibly restore the entire file including the unreferenced portion. The part already referenced by the debugger tool only needs to be reproduced at the same position on the original dump file. For this reason, in the present invention, the data portion already deleted at the reduction stage is made a file having the same size as the original dump file size by adding temporary data. In this way, it is possible to execute a previously executed command again without depending on the type of debugger tool.
(装置およびデータの構成)
図1は、本発明の第1の実施形態に係るデバッグ装置10の構成を示す説明図である。デバッグ装置10は、CPU、OS、RAMなどからなる制御部11と、ハードディスクなどの不揮発性記憶装置からなる記憶部12とを含む一般的なコンピュータ装置である。
(Device and data configuration)
FIG. 1 is an explanatory diagram showing the configuration of the
コンピュータプログラムを実施する主体である制御部11は、デバッガツール21、コマンド履歴作成部22、タグファイル作成部23、縮小ダンプファイル作成部24、縮小ダンプファイル復元部25といった各々の機能部を実行する。同時に、制御部11には一時データとして監視テーブル26も保持される。また記憶部12は、ダンプファイル31、コマンド履歴ファイル32、タグファイル33、縮小ダンプファイル34、復元ダンプファイル35といった各々のデータを記憶している。
The
デバッガツール21は、ダンプファイル31を調査するために使用されるデバッガツールである。コマンド履歴作成部22は、デバッガ管理手段41、コマンド選択手段42、コマンド履歴作成手段43から構成され、これらの手段はそれぞれ概略つぎのように動作する。
The
デバッガ管理手段41は、デバッガツール21の起動および終了を行い、タグファイル作成部23へデバッガツール21の起動を通知するために監視テーブル26へのデータの書き込みを行う。
The
図2は、図1に示した各テーブルおよびファイルのデータ構造について示す説明図である。図2(a)は監視テーブル26、図2(b)はコマンド履歴ファイル32、図2(c)はダンプファイル31、図2(d)はタグファイル33、図2(e)は縮小ダンプファイル34、図2(f)は復元ダンプファイル35のデータ構造を各々示す。各々のデータ構造については、該当するテーブルおよびファイルが登場したところで後述する。
FIG. 2 is an explanatory diagram showing the data structure of each table and file shown in FIG. 2A is a monitoring table 26, FIG. 2B is a
図2(a)に示した監視テーブル26は、デバッガ開始フラグ26aとダンプファイル名26bとを対応させて、制御部11に一時データとして記憶される。このため、監視テーブル26は記憶部12に記憶されるファイルとはならない。デバッガ開始フラグ26aは、デバッガツール21を起動した際にセットされ、デバッガツール21を終了した際にクリアされるフラグである。ダンプファイル名26bは、デバッガツール21が参照しているダンプファイル31のファイル名である。
The monitoring table 26 shown in FIG. 2A is stored as temporary data in the
コマンド履歴作成手段43は、デバッガツール21が実行するコマンドをデバッガツール21へ入力し、同時にどのコマンドを実行したかをコマンド履歴ファイル32へ書き込む。図2(b)に示したコマンド履歴ファイル32には、デバッガツール21において実行されたコマンドが順番に書き込まれる。
The command history creation means 43 inputs a command to be executed by the
コマンド選択手段42は、デバッガツール21がダンプファイル31への調査を終了させた際に、コマンド履歴ファイル32に記録されたコマンド履歴の中から、使用者が選択したコマンドが参照したダンプファイル31内のデータのみを残して縮小ダンプファイル34を作成するために、一旦タグファイル33の内容を削除し、使用者が選択したコマンドを再度実行する。これでタグファイル33を再構築する。
When the
タグファイル作成部23は参照箇所記録手段44を含む。参照箇所記録手段44は概略つぎのように動作する。図3は、図1に示したデバッガツール21および参照箇所記録手段44の動作について示す説明図である。図3(a)はデバッガツール21がダンプファイル31を参照する動作、図3(b)は参照箇所記録手段44が、デバッガツール21がダンプファイル31を参照した箇所について記録する動作を各々示す。
The tag
図3(a)に示したように、通常は、デバッガツール21がダンプファイル31を参照するときは、オペレーティングシステム101へダンプファイル31への参照要求を行い、オペレーティングシステム101がダンプファイル31の参照箇所を読み込み、デバッガツールへそのデータを渡している。
As shown in FIG. 3A, normally, when the
これに対し、参照箇所記録手段44は図3(b)に示したようにオペレーティングシステム101内に常駐し、オペレーティングシステム101の入出力をトレースする。参照箇所記録手段44は監視テーブル26を参照し、デバッガ開始フラグ26aを確認してデバッガツール21が起動中であることを確認し、続いてダンプファイル名26bを確認し、トレースした入出力がそのダンプファイル31への参照であった場合、その参照箇所をタグデータとしてタグファイル33へ書き込む。
On the other hand, the reference location recording means 44 resides in the
タグファイル33に記録されるタグデータは、概略つぎのように作成される。図2(c)に示したダンプファイル31は、一定のサイズのブロックに分割され、先頭から順番にブロック番号をつけられる。図2(d)に示したように、デバッガツール21がダンプファイル31を参照した箇所のブロック番号が、参照箇所記録手段44によってタグファイル33に書き込まれていく。
The tag data recorded in the
縮小ダンプファイル作成部24は、縮小ダンプファイル作成手段45を含む。縮小ダンプファイル作成手段45は概略つぎのように動作する。縮小ダンプファイル作成手段45はまず、元のダンプファイルサイズ34aを図2(e)に示した縮小ダンプファイル34の先頭に書き込む。続いて、タグファイル33からタグデータを読み込み、読み込んだタグデータ34bを縮小ダンプファイルに書き込む。さらに続いて、タグデータ34bを参照し、元のダンプファイル31中の該当するブロックのデータ34cを読み込み、そのデータを縮小ダンプファイル34へ書き込んでいく。これによって、図2(e)に示したデータ構成の縮小ダンプファイル34が、縮小ダンプファイル作成手段45によって書き込まれる。
The reduced dump
縮小ダンプファイル復元部25は、縮小ダンプファイル復元手段46を含む。縮小ダンプファイル復元手段46は概略つぎのように動作する。まず、縮小ダンプファイル34の先頭に記録された、元のダンプファイルサイズ34aおよびタグデータ34bを読み込む。タグデータに含まれるブロックについては、縮小ダンプファイル34から当該データ35aを読み込み、元のダンプファイルと同一のブロックの位置に書き込む。またタグデータに含まれていないブロックについては、同じブロック位置に一時データ35bを書き込む。これによって、図2(f)に示したデータ構成の復元ダンプファイル35が、縮小ダンプファイル復元手段46によって作成される。
The reduced dump
ここでいう一時データ35bは、たとえば「全部0」などのようなごく単純なものでよい。なお、このように縮小ダンプファイル復元手段46が縮小ダンプファイル34から復元ダンプファイル35を生成する動作を、縮小ダンプファイル34の復元という。
The
(コマンド履歴ファイルおよびタグファイルの作成)
図4は、図1に示したデバッガツール21がダンプファイル31を調査する際に、コマンド履歴ファイル32とタグファイル33が書き込まれる動作について示すフローチャートである。
(Create command history file and tag file)
FIG. 4 is a flowchart showing an operation in which the
デバッガ管理手段41がデバッガツール21を起動すると(ステップS201)、このデバッガ管理手段41は図2(a)に示した監視テーブル26でデバッガ開始フラグ26aをセットし(ステップS202)、ダンプファイル名26bを書き込む(ステップS203)。デバッガ管理手段41からデバッガツール21へコマンドを入力し、このコマンドを開始する(ステップS204)と、コマンド履歴作成手段43はこの入力されたコマンドをコマンド履歴ファイル32に書き込む(ステップS205)。
When the
デバッガツール21からオペレーティングシステム101に対してダンプファイルの参照が要求されると(ステップS206)、参照箇所記録手段44は監視テーブル26を確認し、デバッガ開始フラグ26aが立っている(デバッグが開始されている)ことと、その対象であるダンプファイル名26bで表されるダンプファイル31を確認する(ステップS207)。
When the
参照箇所記録手段44は、オペレーティングシステム101で検出された入出力がダンプファイル31への参照であるか否かを確認する。ダンプファイル31への参照でなかった場合は、ダンプファイルへの参照が来るまで待つ(ステップS208)。ダンプファイル31への参照が検出されたら、参照箇所記録手段44はタグファイル33へ参照箇所をタグデータとして書き込む(ステップS209)。
The reference
デバッガツール21で次に実行するコマンドがあれば、ステップS204へ戻って次のコマンドを実行する。次に実行するコマンドがなければ、ステップS211へ進む(ステップS210)。
If there is a next command to be executed by the
コマンド選択手段42により、使用者によるコマンド選択を行うか確認する(ステップS211)。行う場合は、ステップS212に進んでコマンド選択手段42を実行する。コマンド選択手段42の動作は図5で後述する。コマンド選択を行わない場合は、デバッガ管理手段41が監視テーブル26のデバッガ開始フラグ26aをクリアし、ダンプファイル名26bを削除し(ステップS213)、デバッガツール21を終了する(ステップS214)。 The command selection means 42 confirms whether the user selects a command (step S211). If so, the process proceeds to step S212 and the command selection means 42 is executed. The operation of the command selection means 42 will be described later with reference to FIG. If no command is selected, the debugger management means 41 clears the debugger start flag 26a of the monitoring table 26, deletes the dump file name 26b (step S213), and ends the debugger tool 21 (step S214).
図5は、図4のステップS212に示した、コマンド選択手段42の動作の詳細を示すフローチャートである。コマンド選択手段42はまず、コマンド履歴ファイル32を読み込み(ステップS251)、読み込まれたコマンドの中から操作者がコマンドを選択する入力を受け付ける(ステップS252)。 FIG. 5 is a flowchart showing details of the operation of the command selection means 42 shown in step S212 of FIG. The command selection means 42 first reads the command history file 32 (step S251), and accepts an input for the operator to select a command from the read commands (step S252).
すると、コマンド選択手段42はタグファイル33の内容をすべて削除し(ステップS253)、デバッガツール21へステップS252で選択されたコマンドを入力し、このコマンドを開始する(ステップS254)。これに応じてコマンド選択手段42は、デバッガツール21からオペレーティングシステム101に対してダンプファイルの参照を要求する(ステップS255)。
Then, the command selection means 42 deletes all the contents of the tag file 33 (step S253), inputs the command selected in step S252 to the
参照箇所記録手段44により、監視テーブル26を確認し、デバッガ開始フラグ26aが立っている(デバッグが開始されている)ことと、その対象であるダンプファイル名26bで表されるダンプファイル31への参照を確認する。ダンプファイル31への参照でなかった場合は、ダンプファイル31への参照が来るまで待つ(ステップS256)。ダンプファイル31への参照が検出されたら、参照箇所記録手段44はタグファイル33へその参照箇所を書き込む(ステップS257)。
The
操作者に選択されたコマンドの中で、実行するコマンドが残っていれば、ステップS254へ戻って続くコマンドを実行する。残っていなければなければ終了する(ステップS258)。 If the command to be executed remains among the commands selected by the operator, the process returns to step S254 to execute the subsequent command. If not, the process ends (step S258).
(縮小ダンプファイルの作成)
図6は、図1に示した縮小ダンプファイル作成手段45の動作について示すフローチャートである。縮小ダンプファイル作成手段45はまず、タグファイル33からタグデータを読み込み(ステップS301)、元のダンプファイルサイズ34aを縮小ダンプファイル34の先頭に書き込む(ステップS302)。続いてステップS301で読み取ったタグデータ34bを、元のダンプファイルサイズ34aに続けて書き込む(ステップS303)。
(Create a reduced dump file)
FIG. 6 is a flowchart showing the operation of the reduced dump
縮小ダンプファイル作成手段45はここで、元のダンプファイル31から、タグデータに記載されているブロック番号に該当するブロックのデータを読み込むと(ステップS304)、読み込んだ該当するブロックのデータ34cを縮小ダンプファイル34へ書き込んだ後(ステップS305)、元のダンプファイル31を削除する(ステップS306)。
Here, when the reduced dump file creation means 45 reads the data of the block corresponding to the block number described in the tag data from the original dump file 31 (step S304), the reduced data 34c of the corresponding block read is reduced. After writing to the dump file 34 (step S305), the
(復元ダンプファイルの作成)
図7は、図1に示した縮小ダンプファイル復元手段46の動作について示すフローチャートである。以下、nはブロック番号を表す自然数である。縮小ダンプファイル復元手段46はまず、縮小ダンプファイル34からタグデータ34b、および元のダンプファイルサイズ34aを読み込む(ステップS401)。ブロック番号のn=1とし(ステップS402)、このブロック番号nがタグデータ34bに存在するか否かを確認する(ステップS403)。
(Create a restoration dump file)
FIG. 7 is a flowchart showing the operation of the reduced dump file restoring means 46 shown in FIG. Hereinafter, n is a natural number representing a block number. The reduced dump file restoring means 46 first reads the
存在すれば、当該データ35aを縮小ダンプファイル34から読み込み(ステップS404)、復元ダンプファイル35のブロックnに書き込む(ステップS405)。ステップS403で、ブロック番号nがタグデータ34bに存在しなければ、一時データ35bを復元ダンプファイル35のブロックnに書き込む(ステップS406)。
If it exists, the data 35a is read from the reduced dump file 34 (step S404) and written to the block n of the restored dump file 35 (step S405). If the block number n does not exist in the
ステップS405および406の終了後、nの値が元のダンプファイルサイズ34aに相当するブロックまで進んでいるか否かを確認する(ステップS407)。進んでいなければnに1を加算し(ステップS408)、ステップS403に戻る。進んでいれば、復元ダンプファイル35のファイルサイズが元のダンプファイルサイズ34aと一致するように、復元ダンプファイル35の終端から元のダンプファイルサイズ34aよりも大きくなっている部分を削除して、サイズの端数を調整して(ステップS409)、縮小ダンプファイル34の復元の処理を終了する。
After completion of steps S405 and 406, it is confirmed whether or not the value of n has advanced to a block corresponding to the original
(全体的な動作)
次に、上記の第1の実施形態の全体的な動作について説明する。本発明の第1の実施形態に係るデバッガツール21によって参照されるダンプファイルを保存および復元する方法は、デバッガツール21がダンプファイル31を参照した場合に、該ダンプファイルが参照された位置をタグファイル33として記録し(図4:ステップS206〜209)、次にタグファイル33に記録された位置におけるデータをダンプファイル31から読み取り、当該位置(タグデータ34b)および位置におけるデータ(該当するブロックのデータ34c)を記録した縮小ダンプファイル34を作成し(図6:ステップS303〜305)、次に縮小ダンプファイル34に記録された位置および位置におけるデータを読み取り(図7:ステップS401,404)、読み取った位置に該当するデータ(当該データ35a)を配置して(図7:ステップS405)復元ダンプファイル35を作成する。
(Overall operation)
Next, the overall operation of the first embodiment will be described. A method for saving and restoring a dump file referred to by the
ここで、上記各動作ステップについては、これをコンピュータで実行可能にプログラム化し、これらを前記各ステップを直接実行するコンピュータであるデバッグ装置10に実行させるようにしてもよい。
Here, each of the above operation steps may be programmed so as to be executable by a computer, and these may be executed by the
以上説明したように、本実施形態においては、以上のような動作を行うことにより、次に記載するような効果を奏する。本実施形態に係るダンプファイルデバッグ装置10は、ダンプファイル31内で、デバッガツール21が参照した箇所のみを保存するように構成されているため、該ダンプファイル31に対して実行したコマンドを再度実行するのに必要なデータを残しつつ縮小ダンプファイル34を作成することができる。また、縮小ダンプファイル34から作成された復元ダンプファイル35は、一度実行したコマンドで参照された部分が復元されているので、そのコマンドによる調査を再現することができる。
As described above, in the present embodiment, the following effects can be obtained by performing the operations described above. Since the dump
さらに、本実施形態では、一度実行されたコマンドがコマンド履歴ファイル32に記録され、そのコマンドで参照された部分を保存して復元することも可能であるので、ダンプファイル31に対して一度実行されたコマンドを復元ダンプファイル35に対して再実行することがさらに容易となる。
Furthermore, in the present embodiment, a command that has been executed once is recorded in the
[第2の実施形態]
図8は、本発明の第2の実施形態に係るデバッグ装置510の構成を示す説明図である。デバッグ装置510は、第1の実施形態に係るデバッグ装置10と比べてコマンド選択手段42と、コマンド履歴作成手段43と、コマンド履歴ファイル32とが省略されているのみであり、その他の構成、動作および作用は同一である。第1の実施形態と同一の要素には、同一の参照番号を付しており、その各々の作用は第1の実施形態の所で説明した通りである。ただし、コマンド選択手段42およびコマンド履歴作成手段43が存在しないため、図4のステップS205、211、212、および図5に示した動作は省略される。
[Second Embodiment]
FIG. 8 is an explanatory diagram showing the configuration of the
この構成でも、デバッガ管理手段41は監視テーブル26へデバッガ開始フラグ26aとダンプファイル名26bとを書き込む。このため、タグファイル作成部23はダンプファイル31の所在について、監視テーブル26から把握することが可能である。従って、デバッガツール21がダンプファイル31に対して実行したコマンドについて、タグファイル作成部23が第1の実施形態と同一の動作によってタグファイル33を作成することが可能である。
Even in this configuration, the debugger management means 41 writes the debugger start flag 26 a and the dump file name 26 b in the monitoring table 26. Therefore, the tag
このため、縮小ダンプファイル作成部24によって、デバッガツール21が参照した箇所のみが書き込まれた縮小ダンプファイル34を作成することも可能である。さらに、この縮小ダンプファイル34によって、縮小ダンプファイル復元部25によって、復元ダンプファイル35を作成することも可能である。
For this reason, the reduced dump
これによって、本発明の第2の実施形態に係るデバッグ装置510は、第1の実施形態に係るデバッグ装置10と比べて、デバッガツール21がダンプファイル31に対して実行したコマンドをコマンド履歴ファイル32に記録して再実行しやすくする効果は省略されるが、その点以外は第1の実施形態に係るデバッグ装置10と同一の効果を得ることができる。
As a result, the
[第3の実施形態]
図9は、本発明の第3の実施形態に係るデバッグ装置610の構成を示す説明図である。デバッグ装置610は、第1の実施形態に係るデバッグ装置10の縮小ダンプファイル作成部24にダンプファイル圧縮手段647を、縮小ダンプファイル復元部25にダンプファイル伸張手段648を、それぞれ追加したものである。ダンプファイル圧縮手段647およびダンプファイル伸張手段648は、ZIPやLHAなどのような可逆的な手法によってファイルの圧縮および伸張を行う。
[Third Embodiment]
FIG. 9 is an explanatory diagram showing the configuration of the
図10は、図9に示した縮小ダンプファイル作成手段45の動作について示すフローチャートである。縮小ダンプファイル作成部24は、図6に示したステップS301〜305と同一の動作を行った後、データの書き込みを完了した縮小ダンプファイル34をダンプファイル圧縮手段647によって圧縮した後(ステップS707)、元のダンプファイル31を削除する(ステップS306)。なお、ステップS707で圧縮された後の縮小ダンプファイル34を、圧縮ダンプファイル634と呼ぶ。
FIG. 10 is a flowchart showing the operation of the reduced dump
図11は、図9に示した縮小ダンプファイル復元手段46の動作について示すフローチャートである。縮小ダンプファイル復元部25は、圧縮ダンプファイル634をダンプファイル伸張手段648によって伸張して縮小ダンプファイル34を生成した後(ステップS801)、ステップS401〜409と同一の処理を行って復元ダンプファイル35を生成する。
FIG. 11 is a flowchart showing the operation of the reduced dump file restoring means 46 shown in FIG. The reduced dump
第1および第2の実施形態では、ファイルの可逆的圧縮の動作を行っていなかったが、第3の実施形態ではこれに可逆的圧縮の動作を加えることによって、さらに少ないデータ量でダンプファイルを保存することができる。ただし、前述のように圧縮および伸張の処理には、それに伴う記憶容量および処理の負荷がかかる問題があるので、ユーザの判断により圧縮および伸張の処理を行うか否かを選択できるようにすることが望ましい。 In the first and second embodiments, the reversible compression operation of the file is not performed. In the third embodiment, the reversible compression operation is added to the file, so that the dump file can be generated with a smaller amount of data. Can be saved. However, as described above, the compression and decompression processing has a problem that the storage capacity and processing load associated therewith are increased. Therefore, it is possible to select whether or not to perform the compression and decompression processing at the user's discretion. Is desirable.
もちろん、第2の実施形態で示した構成のデバッグ装置510に、ダンプファイル圧縮手段647およびダンプファイル伸張手段648を追加しても、上記の効果を得ることができる。
Of course, the above effect can be obtained even if the dump
これまで本発明について図面に示した特定の実施形態をもって説明してきたが、本発明は図面に示した実施形態に限定されるものではなく、本発明の効果を奏する限り、これまで知られたいかなる構成であっても採用することができる。 The present invention has been described with reference to the specific embodiments shown in the drawings. However, the present invention is not limited to the embodiments shown in the drawings, and any known hitherto provided that the effects of the present invention are achieved. Even if it is a structure, it is employable.
本発明は、ダンプファイルを使ったオペレーティングシステム、アプリケーションプログラムの障害調査といった用途に適用できる。また本発明は、ダンプファイルを長期保存し、オペレーティングシステム、アプリケーションプログラムの障害傾向の分析といった用途にも適用できる。その際、デバッガツールの種類には特に依存しない。 The present invention is applicable to uses such as an operating system using a dump file and a failure investigation of an application program. The present invention can also be applied to applications such as long-term storage of dump files and analysis of failure trends of operating systems and application programs. At that time, it does not particularly depend on the type of the debugger tool.
10,510,610 デバッグ装置
11 制御部
12 記憶部
21 デバッガツール
22 コマンド履歴作成部
23 タグファイル作成部
24 縮小ダンプファイル作成部
25 縮小ダンプファイル復元部
26 監視テーブル
26a デバッガ開始フラグ
26b ダンプファイル名
31 ダンプファイル
32 コマンド履歴ファイル
33 タグファイル
34 縮小ダンプファイル
34a 元のダンプファイルサイズ
34b タグデータ
34c 該当するブロックのデータ
35 復元ダンプファイル
35a 当該データ
35b 一時データ
41 デバッガ管理手段
42 コマンド選択手段
43 コマンド履歴作成手段
44 参照箇所記録手段
45 縮小ダンプファイル作成手段
46 縮小ダンプファイル復元手段
634 圧縮ダンプファイル
647 ダンプファイル圧縮手段
648 ダンプファイル伸張手段
10, 510, 610
Claims (8)
前記デバッガツールが前記ダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録する参照箇所記録手段と、
前記タグファイルに記録された位置におけるデータを前記ダンプファイルから読み取り、当該位置および前記位置におけるデータを記録した縮小ダンプファイルを作成する縮小ダンプファイル作成手段と、
前記縮小ダンプファイルに記録された位置および前記位置におけるデータを読み取り、前記位置に該当するデータを配置して復元ダンプファイルを作成する縮小ダンプファイル復元手段と、
を有することを特徴とするデバッグ装置。 A debugging device having a debugger tool for debugging a dump file,
When the debugger tool refers to the dump file, a reference location recording means for recording a position where the dump file is referenced as a tag file;
Reading the data at the position recorded in the tag file from the dump file, a reduced dump file creating means for creating a reduced dump file recording the data at the position and the position;
A reduced dump file restoring means for reading the position recorded in the reduced dump file and data at the position, and arranging the data corresponding to the position to create a restored dump file;
A debugging device comprising:
前記コマンド履歴ファイルに記録されたコマンドの中からユーザによる選択を受け付け、前記選択されたコマンドを前記ダンプファイルに対して再度実行するコマンド選択手段を有することを特徴とする、請求項1に記載のデバッグ装置。 Command history creating means for creating a command history file in which commands executed on the dump file by the debugger tool are recorded;
2. The apparatus according to claim 1, further comprising a command selection unit that accepts a selection made by a user from commands recorded in the command history file and executes the selected command again on the dump file. Debug device.
前記圧縮された縮小ダンプファイルを伸張するダンプファイル伸張手段とを有することを特徴とする、請求項1に記載のデバッグ装置。 Dump file compression means for reversibly compressing the reduced dump file;
The debugging apparatus according to claim 1, further comprising dump file decompression means for decompressing the compressed reduced dump file.
前記デバッガツールが前記ダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録し、
前記タグファイルに記録された位置におけるデータを前記ダンプファイルから読み取り、
当該位置および前記位置におけるデータを記録した縮小ダンプファイルを作成し、
前記縮小ダンプファイルに記録された位置および前記位置におけるデータを読み取り、
前記位置に該当する前記読み取ったデータを配置して復元ダンプファイルを作成する
ことを特徴とするダンプファイルの保存復元方法。 A method for saving and restoring a dump file referenced by a debugger tool, comprising:
When the debugger tool refers to the dump file, the position where the dump file is referenced is recorded as a tag file,
Read data at the location recorded in the tag file from the dump file,
Create a reduced dump file that records the location and data at the location,
Read the position recorded in the reduced dump file and the data at the position,
A method for saving and restoring a dump file, comprising arranging the read data corresponding to the position to create a restored dump file.
前記デバッガツールが前記ダンプファイルを参照した場合に、該ダンプファイルが参照された位置をタグファイルとして記録する手順と、
前記タグファイルに記録された位置におけるデータを前記ダンプファイルから読み取る手順と、
当該位置および前記位置におけるデータを記録した縮小ダンプファイルを作成する手順と、
前記縮小ダンプファイルに記録された位置および前記位置におけるデータを読み取る手順と、
前記位置に該当する前記読み取ったデータを配置して復元ダンプファイルを作成する手順と
を実行させることを特徴とするダンプファイルの保存復元プログラム。 To the computer that configures the debugging device,
When the debugger tool refers to the dump file, a procedure for recording the referenced position of the dump file as a tag file;
A procedure for reading data from the dump file at a position recorded in the tag file;
A procedure for creating a reduced dump file in which the position and data at the position are recorded;
Reading the position recorded in the reduced dump file and the data at the position;
A dump file storage / restoration program that executes a procedure of arranging the read data corresponding to the position and creating a restoration dump file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008293728A JP2010122759A (en) | 2008-11-17 | 2008-11-17 | Debugging device, method of storing and restoring dump file, and program thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008293728A JP2010122759A (en) | 2008-11-17 | 2008-11-17 | Debugging device, method of storing and restoring dump file, and program thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010122759A true JP2010122759A (en) | 2010-06-03 |
Family
ID=42324071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008293728A Pending JP2010122759A (en) | 2008-11-17 | 2008-11-17 | Debugging device, method of storing and restoring dump file, and program thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010122759A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0916374A (en) * | 1995-06-27 | 1997-01-17 | Fujitsu Ltd | Data compression method and device therefor |
JPH09171476A (en) * | 1995-12-20 | 1997-06-30 | Nec Corp | Dump file compressing system |
JPH09325903A (en) * | 1996-04-01 | 1997-12-16 | Mitsubishi Electric Corp | Fault recording system |
JP2000207246A (en) * | 1999-01-13 | 2000-07-28 | Toshiba Corp | Debugging support device, method therefor and recording medium recorded with softwater for supporting debugging |
JP2001256082A (en) * | 2000-03-13 | 2001-09-21 | Nec Soft Ltd | System and method for acquiring memory dump |
JP2005332421A (en) * | 2005-08-03 | 2005-12-02 | Mitsubishi Electric Corp | Memory dump device |
-
2008
- 2008-11-17 JP JP2008293728A patent/JP2010122759A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0916374A (en) * | 1995-06-27 | 1997-01-17 | Fujitsu Ltd | Data compression method and device therefor |
JPH09171476A (en) * | 1995-12-20 | 1997-06-30 | Nec Corp | Dump file compressing system |
JPH09325903A (en) * | 1996-04-01 | 1997-12-16 | Mitsubishi Electric Corp | Fault recording system |
JP2000207246A (en) * | 1999-01-13 | 2000-07-28 | Toshiba Corp | Debugging support device, method therefor and recording medium recorded with softwater for supporting debugging |
JP2001256082A (en) * | 2000-03-13 | 2001-09-21 | Nec Soft Ltd | System and method for acquiring memory dump |
JP2005332421A (en) * | 2005-08-03 | 2005-12-02 | Mitsubishi Electric Corp | Memory dump device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4846493B2 (en) | Debug system and debug circuit | |
US8850148B2 (en) | Data copy management for faster reads | |
JP2007004734A (en) | Information processing system, information processing method and computer program | |
US8438194B2 (en) | Information processing apparatus, control method for information processing apparatus, and storage medium | |
JP4640835B2 (en) | Information processing apparatus and program | |
JPWO2007099636A1 (en) | File system migration method, file system migration program, and file system migration apparatus | |
KR20140028930A (en) | Data processing apparatus, method for processing data and computer readable recording medium storing for a program for performing the method | |
US9009430B2 (en) | Restoration of data from a backup storage volume | |
US9760484B2 (en) | Data processing method and electronic device | |
JP5709903B2 (en) | METHOD, SYSTEM, COMPUTER PROGRAM, RECORDING MEDIUM, DATA STORAGE MEDIUM STORING DATA COLLECTION, AND CALL DATA RECORDING SYSTEM FOR COMPRESSING DATA RECORD AND PROCESSING COMPRESSED DATA RECORD | |
JP2010122759A (en) | Debugging device, method of storing and restoring dump file, and program thereof | |
JP4897359B2 (en) | MEMORY MANAGEMENT DEVICE, MEMORY MANAGEMENT METHOD, AND PROGRAM | |
JP2008234268A (en) | Information processor, information processing method and program | |
JP4119203B2 (en) | File processing program | |
JP2019106093A (en) | Computer, method of reproducing log, and storage medium | |
JP4888166B2 (en) | Information processing apparatus, process compression method, and program | |
JPH11212845A (en) | Device and method for backup data management and recording medium | |
JP2004341840A (en) | Backup method, system therefor, and restoration method | |
JP2012174031A (en) | Information processor, method for starting information processor and program | |
WO2008007533A1 (en) | Data deletion method and data deletion program | |
JPH0675957A (en) | Restoration mechanism of fault during editing | |
JP2002024055A (en) | Computer system and operation reproducing method of application program | |
JP2012084069A (en) | Computer system and failure information collection method | |
CN111597364A (en) | Engineering quantity calculation intermediate layer generation method and device, storage medium and electronic equipment | |
KR20130106258A (en) | Removable storage device and system comprising the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110422 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110510 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110913 |