JP2013206061A - Information processing device and method, and program - Google Patents

Information processing device and method, and program Download PDF

Info

Publication number
JP2013206061A
JP2013206061A JP2012073505A JP2012073505A JP2013206061A JP 2013206061 A JP2013206061 A JP 2013206061A JP 2012073505 A JP2012073505 A JP 2012073505A JP 2012073505 A JP2012073505 A JP 2012073505A JP 2013206061 A JP2013206061 A JP 2013206061A
Authority
JP
Japan
Prior art keywords
breakpoint
processing
program
information
breakpoints
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
JP2012073505A
Other languages
Japanese (ja)
Inventor
Yasuhiro Matsuzaki
泰裕 松崎
Hiroki Kaminaga
浩気 神長
Hiroki Nagahama
弘樹 長濱
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2012073505A priority Critical patent/JP2013206061A/en
Publication of JP2013206061A publication Critical patent/JP2013206061A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To perform breakpoint processing at a higher speed.SOLUTION: An information processing device of this technique comprises: a plurality of breakpoint processing parts for monitoring breakpoints of a program and performing breakpoint processing to stop the execution of the program by different execution methods respectively; and a selecting part for selecting a breakpoint processing part for monitoring each breakpoint from the plurality of breakpoint processing parts on the basis of information on the result of the breakpoint processing. Each of the plurality of breakpoint processing part monitors the breakpoint selected by the selecting part to itself. This technique can be applied to, for example, an analyzing device for performing debugging of a program.

Description

本技術は、情報処理装置および方法、並びに、プログラムに関し、特に、ブレークポイント処理をより効率よく行うことができるようにした情報処理装置および方法、並びに、プログラムに関する。   The present technology relates to an information processing apparatus and method, and a program, and more particularly, to an information processing apparatus and method that can perform breakpoint processing more efficiently, and a program.

ソフトウエアプログラムのデバッグ手法として、ブレークポイントが使われることがある。ブレークポイントには、命令の実行を捕獲するブレークポイントと、データへのアクセスを捕獲するデータブレークポイント(以下、ウォッチポイントとも称する)がある。 Breakpoints are sometimes used as a debugging method for software programs. Breakpoints include breakpoints that capture execution of instructions and data breakpoints that capture access to data (hereinafter also referred to as watchpoints).

それぞれの実施方式には、CPU等に備えられているハードウエアの監視機構を用いるハードウエア方式と、命令書き換えなど疑似的にソフトウエアで実現するソフトウエア方式がある。   Each implementation method includes a hardware method that uses a hardware monitoring mechanism provided in a CPU or the like, and a software method that is realized by software such as instruction rewriting.

ソフトウエアブレークポイントの例としては、命令を割り込み命令に書き換える手法が挙げられる。ソフトウエアウォッチポイント(データブレークポイント)の例としては、アクセス制御ユニット等を用いる手法が挙げられる(例えば、特許文献1参照)。この手法の場合、監視がブロックサイズ単位となっており、本来監視不要な条件まで捕獲してしまう恐れがあった。   An example of a software breakpoint is a method of rewriting an instruction to an interrupt instruction. As an example of the software watch point (data break point), there is a method using an access control unit or the like (for example, see Patent Document 1). In the case of this method, monitoring is performed in block size units, and there is a possibility that even conditions that are not originally required for monitoring are captured.

ハードウエア方式は、ソフトウエア方式に比べ高速にブレークポイント処理を行うことができるが、処理対象として設定することができるブレークポイントの数がソフトウエア方式に比べて少ない。これに対して、ソフトウエア方式は、ハードウエア方式に比べて多数のブレークポイントを処理対象として設定することができるが、処理のオーバーヘッドがハードウエア方式よりも大きい(すなわち、処理時間が長い)。   The hardware method can perform breakpoint processing at a higher speed than the software method, but the number of breakpoints that can be set as a processing target is smaller than that of the software method. In contrast, the software method can set a larger number of breakpoints as processing targets than the hardware method, but the processing overhead is larger than the hardware method (that is, the processing time is longer).

なお、ハードウエア方式の設定可能なブレークポイント数を増大させる方法が考えられた(例えば、特許文献2参照)。この方法の場合、ブレークポイントテーブルをメモリ上に持ち、直近の分岐命令にブレークポイントを設定して逐次テーブルと比較することで多数のブレークポイントの設定を実現する。   A method of increasing the number of break points that can be set in the hardware method has been considered (see, for example, Patent Document 2). In the case of this method, a breakpoint table is held in the memory, breakpoints are set in the latest branch instruction, and a number of breakpoints are set by sequentially comparing with the table.

しかしながら、この方法の場合、本来ブレークしないはずの分岐命令でブレークしたり、またテーブルとの比較処理を行ったりするので、オーバーヘッドが増大する恐れがあった。またウォッチポイントには適用することができなかった。   However, in the case of this method, there is a possibility that overhead is increased because a break is executed at a branch instruction that should not break, or comparison processing with a table is performed. It could not be applied to watchpoints.

このように、ブレークポイント処理について、例えばハードウエア方式とソフトウエア方式のように、互いに異なる複数の実施方式が実現可能な場合、いずれか一方の方法だけでは、十分に効率よくブレークポイント処理を行うことができなかった。   As described above, when a plurality of different implementation methods such as a hardware method and a software method can be realized, for example, only one of the methods can be used to perform the breakpoint processing sufficiently efficiently. I couldn't.

そこで、このような互いに異なる複数の実施方式を用いてブレークポイント処理を行う方法が考えられた。   Therefore, a method of performing breakpoint processing using such a plurality of different implementation methods has been considered.

特開平8−30485号公報JP-A-8-30485 特開2011−108124号公報JP 2011-108124 A

しかしながら、このような互いに異なる複数の実施方式のいずれを用いるかの選択を、プログラム開発者が指定するようにすると、プログラム開発者の煩雑な作業が必要になるだけでなく、プログラム開発者に正確かつ詳細な知識が必要であり、実現は困難であった。   However, if the program developer designates which of the plurality of different implementation methods to use, not only the program developer's cumbersome work is required, but also the program developer is accurate. In addition, detailed knowledge was necessary and it was difficult to realize.

そこで、ハードウエア方式の処理対象を優先的に設定するようにする方法が考えられた。すなわち、この場合、デバッガが、可能であれば、ブレークポイントをハードウエア方式のブレークポイントの処理対象として設定し、それが不可能である場合、ブレークポイントをソフトウエア方式のブレークポイント処理対象として設定する。   Therefore, a method for preferentially setting the hardware processing target has been considered. That is, in this case, if possible, the debugger sets the breakpoint as a hardware breakpoint processing target, and if that is not possible, sets the breakpoint as a software breakpoint processing target. To do.

しかしながら、この場合、ブレークポイント処理の効率は考慮されていなかった。例えば、捕獲回数が多いブレークポイントがソフトウエア方式に設定されると、ソフトウエア方式のブレークポイント処理がより多く実行されることになるので、オーバーヘッドが増大する恐れがあった。   However, in this case, the efficiency of breakpoint processing has not been considered. For example, if a break point with a large number of captures is set in the software method, more software-based break point processing is executed, which may increase the overhead.

本技術は、このような状況に鑑みて提案されたものであり、ブレークポイント処理をより効率よく行うことを目的とする。   The present technology has been proposed in view of such a situation, and an object thereof is to perform breakpoint processing more efficiently.

本技術の一側面は、プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理を、互いに異なる実施方式で行う複数のブレークポイント処理部と、各ブレークポイントを監視するブレークポイント処理部を、前記ブレークポイント処理の結果に関する情報に基づいて、前記複数のブレークポイント処理部の中から選択する選択部とを備え、前記複数のブレークポイント処理部は、それぞれ、前記選択部により自身が選択されたブレークポイントを監視する情報処理装置である。   One aspect of the present technology provides a plurality of breakpoint processing units that monitor breakpoints in a program and stop execution of the program in different implementation modes, and breakpoint processing that monitors each breakpoint. A selection unit that selects from among the plurality of breakpoint processing units based on information on the result of the breakpoint processing, and each of the plurality of breakpoint processing units is individually selected by the selection unit. An information processing apparatus that monitors a selected breakpoint.

前記複数のブレークポイント処理部は、第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部と、前記第1の方式と監視可能ブレークポイント数および処理時間の異なる第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部とを含むことができる。   The plurality of breakpoint processing units include a first breakpoint processing unit that performs the breakpoint processing according to a first method, and a second method that differs from the first method in the number of breakpoints that can be monitored and processing time. A second breakpoint processing unit that performs the breakpoint processing.

前記第2のブレークポイント処理部は、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行うことができる。   The second breakpoint processing unit can monitor more breakpoints than the first method, and the breakpoint processing is performed by the second method having a longer processing time than the first method. It can be performed.

前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式であることができる。   The first method may be a method using hardware that performs the breakpoint processing, and the second method may be a method using software that implements the breakpoint processing.

前記ブレークポイント処理の結果に関する情報は、前記ブレークポイント処理における、各ブレークポイントの捕獲回数に関する統計情報であることができる。   The information related to the result of the breakpoint process may be statistical information related to the number of times each breakpoint is captured in the breakpoint process.

前記選択部は、前記統計情報の上位のブレークポイントに対して、第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部を選択し、前記統計情報の上位のブレークポイント以外のブレークポイントに対して、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部を選択することができる。   The selection unit selects a first breakpoint processing unit that performs the breakpoint processing by a first method for a breakpoint higher in the statistical information, and breaks other than breakpoints higher in the statistical information. More second breakpoints can be monitored with respect to the point than the first method, and the breakpoint processing is performed by the second method having a longer processing time than the first method. A breakpoint processing unit can be selected.

前記選択部は、前記ブレークポイント処理の結果、前記統計情報の上位のブレークポイントが変化した場合、次のブレークポイント処理に対して、前記統計情報の上位から外れたブレークポイントを監視するブレークポイント処理部を、前記第1のブレークポイント処理部から前記第2のブレークポイント処理部に変更し、前記統計情報の上位に入ったブレークポイントを監視するブレークポイント処理部を、前記第2のブレークポイント処理部から前記第1のブレークポイント処理部に変更することができる。   When the higher breakpoint of the statistical information changes as a result of the breakpoint process, the selection unit monitors a breakpoint that is out of the higher rank of the statistical information for the next breakpoint process A break point processing unit that monitors a break point that has entered a higher rank of the statistical information, and changes the second break point processing unit from the first break point processing unit to the second break point processing unit. To the first breakpoint processing unit.

前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式であることができる。   The first method may be a method using hardware that performs the breakpoint processing, and the second method may be a method using software that implements the breakpoint processing.

前記選択部による前記ブレークポイント処理部の選択に応じて、前記ブレークポイントの配置を設定する設定部をさらに備えることができる。   According to selection of the breakpoint processing unit by the selection unit, a setting unit that sets an arrangement of the breakpoints can be further provided.

前記ブレークポイントは、データへのアクセスを捕獲するウォッチポイントと、命令の実行を捕獲するブレークポイントとを含むことができる。   The breakpoints can include watchpoints that capture access to data and breakpoints that capture instruction execution.

本技術の一側面は、また、情報処理装置の情報処理方法であって、前記情報処理装置が、プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択し、各ブレークポイントに対する前記ブレークポイント処理を、選択した実施方式により行う情報処理方法である。   One aspect of the present technology is also an information processing method of an information processing device, in which the information processing device monitors a breakpoint of a program and performs a breakpoint process for stopping execution of the program. The execution method of the breakpoint processing for each breakpoint of the program is selected from a plurality of different execution methods based on information on the result of the breakpoint processing, and the breakpoint processing for each breakpoint is selected. This is an information processing method performed according to the selected implementation method.

本技術の一側面は、さらに、コンピュータを、プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択する選択部と、各ブレークポイントに対する前記ブレークポイント処理を、前記選択部により選択された実施方式により行うブレークポイント処理部として機能させるためのプログラムである。   One aspect of the present technology further relates to a method of performing breakpoint processing for each breakpoint of the program, with respect to a program in which a computer performs breakpoint processing for monitoring a program breakpoint and stopping execution of the program Are selected from a plurality of different execution methods based on information on the result of the breakpoint processing, and the breakpoint processing for each breakpoint is performed by the execution method selected by the selection unit This is a program for functioning as a breakpoint processing unit.

本技術の一側面においては、プログラムのブレークポイントを監視し、ブレークポイントに対する所定の条件が満たされる場合、プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、プログラムの各ブレークポイントに対するブレークポイント処理の実施方式が、ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択され、各ブレークポイントに対するブレークポイント処理が、選択した実施方式により行われる。   In one aspect of the present technology, a breakpoint for each breakpoint of a program is monitored for a program in which breakpoint processing for stopping execution of the program is performed when a breakpoint of the program is monitored and a predetermined condition for the breakpoint is satisfied. The execution method of the process is selected from a plurality of different execution methods based on the information on the result of the breakpoint process, and the breakpoint process for each breakpoint is performed by the selected execution method.

本技術によれば、情報を処理することが出来る。特に、ブレークポイント処理をより効率よく行うことができる。   According to the present technology, information can be processed. In particular, breakpoint processing can be performed more efficiently.

解析装置の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of an analyzer. ブレークポイント設定の様子の例を説明する図である。It is a figure explaining the example of the mode of a breakpoint setting. ブレークポイント設定の様子の例を説明する図である。It is a figure explaining the example of the mode of a breakpoint setting. ブレークポイント設定の様子の例を説明する図である。It is a figure explaining the example of the mode of a breakpoint setting. ブレークポイントの配置を設定する様子の例を説明する図である。It is a figure explaining the example of a mode that the arrangement | positioning of a breakpoint is set. ブレークポイントの配置を設定する様子の例を説明する図である。It is a figure explaining the example of a mode that the arrangement | positioning of a breakpoint is set. 解析処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an analysis process. ブレークポイント制御処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a breakpoint control process. 監視方式設定処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a monitoring system setting process. プログラム生成処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a program production | generation process. コンピュータの主な構成例を示すブロック図である。And FIG. 20 is a block diagram illustrating a main configuration example of a computer.

以下、本開示を実施するための形態(以下実施の形態とする)について説明する。なお、説明は以下の順序で行う。
1.第1の実施の形態(解析装置)
2.第2の実施の形態(コンピュータ)
Hereinafter, modes for carrying out the present disclosure (hereinafter referred to as embodiments) will be described. The description will be given in the following order.
1. 1st Embodiment (analysis apparatus)
2. Second embodiment (computer)

<1.第1の実施の形態>
[1−1ブレークポイント処理の選択]
ソフトウエアプログラムのデバッグ手法の1つに、プログラムに設定されたブレークポイントを監視し、前記ブレークポイントに対する所定の条件が満たされる場合、前記プログラムの実行を停止するブレークポイント処理がある。
<1. First Embodiment>
[1-1 Selecting breakpoint processing]
One of the software program debugging methods is breakpoint processing for monitoring a breakpoint set in a program and stopping execution of the program when a predetermined condition for the breakpoint is satisfied.

ブレークポイントには、命令の実行を捕獲するブレークポイントと、データへのアクセスを捕獲するデータブレークポイント(以下、ウォッチポイントとも称する)がある。   Breakpoints include breakpoints that capture execution of instructions and data breakpoints that capture access to data (hereinafter also referred to as watchpoints).

ブレークポイントの実施方式は、複数の方法が存在する。例えば、CPU等に備えられているハードウエアの監視機構を用いるハードウエア方式と、命令書き換えなど疑似的にソフトウエアで実現するソフトウエア方式がある。   There are a plurality of methods for implementing breakpoints. For example, there are a hardware system that uses a hardware monitoring mechanism provided in a CPU or the like, and a software system that is realized by software such as instruction rewriting.

ブレークポイント処理を行うハードウエアを利用するハードウエア方式は高速であるものの、監視対象として設定できるブレークポイントの数が限られている。ブレークポイント処理を実現するソフトウエアを利用するソフトウエア方式は、ハードウエア方式の場合よりも多くのブレークポイントを監視対象として設定することができるものの、ブレークポイント処理のオーバーヘッドが大きい。つまり、ソフトウエア方式の方が処理時間が長い。   Although the hardware method using hardware that performs breakpoint processing is high-speed, the number of breakpoints that can be set as monitoring targets is limited. Although a software method using software that realizes breakpoint processing can set more breakpoints as monitoring targets than in the hardware method, the overhead of breakpoint processing is large. That is, the processing time is longer in the software method.

ソフトウエアブレークポイントの例としては、命令を割り込み命令に書き換える手法が挙げられる。ソフトウエアウォッチポイント(データブレークポイント)の例としては、特許文献1に記載のような、アクセス制御ユニット等を用いる手法が挙げられる。このソフトウエアウォッチポイント手法では、監視がブロックサイズ単位となっており、本来監視不要な条件まで捕獲してしまう恐れがあった。   An example of a software breakpoint is a method of rewriting an instruction to an interrupt instruction. As an example of the software watch point (data break point), there is a method using an access control unit or the like as described in Patent Document 1. In this software watchpoint method, monitoring is performed in block size units, and there is a possibility that even conditions that are not originally required for monitoring are captured.

また、ハードウエア方式の手法として、特許文献2には、ブレークポイントテーブルをメモリ上に持ち、直近の分岐命令にブレークポイントを設定して逐次テーブルと比較することで多数のブレークポイントの設定を実現する手法が提案されている。しかしながら、この手法の場合、本来ブレークしないはずの分岐命令でブレークしたり、またテーブルとの比較処理を行ったりするので、オーバーヘッドが増大する恐れがあった。またウォッチポイントには適用することができなかった。   In addition, as a hardware method, Patent Literature 2 has a breakpoint table in memory, sets breakpoints in the latest branch instruction, and sets a number of breakpoints by sequentially comparing with the table. A technique has been proposed. However, in the case of this method, there is a possibility that the overhead increases because a break is executed by a branch instruction that should not break, or a comparison process with a table is performed. It could not be applied to watchpoints.

ハードウエア方式とソフトウエア方式のいずれを用いた方がより効率的であるかは、デバッグされるプログラム等に依存する。そのため、より確実により効率的な設定にするためには、ユーザが各ブレークポイントについて、ブレークポイント処理の実施方式を1つずつ指定する必要があった。ただし、その際、正しく指定を行うためには、プログラム開発者に正確かつ詳細な知識が必要であった。また、その設定にはプログラム開発者の煩雑な作業が必要であった。したがって、この設定作業の時間もブレークポイント処理に必要な時間として考えると、ブレークポイント処理の処理時間を低減させることは困難であった。   Which of the hardware method and the software method is more efficient depends on the program to be debugged. Therefore, in order to make the setting more surely and more efficient, it is necessary for the user to designate one execution method of breakpoint processing for each breakpoint. However, in order to specify correctly, the program developer needed accurate and detailed knowledge. Also, the setting required complicated work of the program developer. Therefore, considering the setting work time as the time required for the breakpoint processing, it is difficult to reduce the processing time of the breakpoint processing.

なお、デバッガによっては設定順にハードウエアが空いていれば自動的に選択するものもあるが、処理の効率化は考慮されていなかった。したがって、例えば、捕獲回数が多いブレークポイントがソフトウエア方式に設定される場合もあり、ブレークポイント処理のオーバーヘッドが増大する恐れもあった。   Some debuggers automatically select hardware if it is available in the order of setting, but processing efficiency has not been considered. Therefore, for example, a break point with a large number of captures may be set in the software method, and there is a possibility that the overhead of break point processing increases.

以上のように、従来の方式では、ブレークポイント処理の処理時間を十分に低減させることは、実質的に困難であった。   As described above, with the conventional method, it has been substantially difficult to sufficiently reduce the processing time of breakpoint processing.

ところで、デバッグにおいてはブレークポイント処理が繰り返し行われる。そこで、プログラムに対してブレークポイント処理を含む動的解析を行う解析装置が、過去のブレークポイント処理の処理結果を用いて、効率よくブレークポイント処理が実行されるように、ブレークポイント処理の方式を決定するようにする。   By the way, breakpoint processing is repeatedly performed in debugging. Therefore, a breakpoint processing method is used so that an analysis device that performs dynamic analysis including breakpoint processing on a program can efficiently execute breakpoint processing using the results of past breakpoint processing. Make a decision.

例えば、解析装置が、過去のブレークポイントの捕獲回数に応じて、各ブレークポイントに対するブレークポイント処理の方式をハードウエア方式にするか、ソフトウエア方式にするかを選択するようにする。   For example, the analysis apparatus selects whether the breakpoint processing method for each breakpoint is the hardware method or the software method according to the number of times of the past breakpoint capture.

より具体的には、例えば、解析装置が、過去に捕獲された回数が多いブレークポイントに対して、ハードウエア方式のブレークポイント処理を選択する。また、例えば、解析装置が、過去に捕獲された回数が少ないブレークポイントに対して、ソフトウエア方式のブレークポイント処理を選択する。   More specifically, for example, the analysis apparatus selects a hardware breakpoint process for a breakpoint that has been captured many times in the past. In addition, for example, the analysis apparatus selects software-type breakpoint processing for breakpoints that have been captured in the past in a small number of times.

換言するに、解析装置は、ハードウエア方式のブレークポイント処理が、過去に捕獲された回数が多いブレークポイントを監視するようにし、ソフトウエア方式のブレークポイント処理が、過去に捕獲された回数が少ないブレークポイントを監視するようにする。   In other words, the analysis apparatus monitors breakpoints that have been captured in the past by hardware-based breakpoint processing, and the number of times that software-based breakpoint processing has been captured in the past is small. Try to watch for breakpoints.

このように、各ブレークポイントに対するブレークポイント処理の実施方式を選択することにより、捕獲される可能性が高いブレークポイントを、より高速なハードウエア方式のブレークポイント処理に割り当てることができる。また、それ以外のブレークポイントを、ソフトウエア方式のブレークポイント処理を用いて処理することができる。したがって、監視装置は、ブレークポイントの数が、ハードウエア方式のみでは監視できないほど多い場合であっても、より効率よくブレークポイント処理を行うことができる。   In this way, by selecting a breakpoint processing execution method for each breakpoint, a breakpoint that is highly likely to be captured can be assigned to a faster hardware-based breakpoint process. Further, other breakpoints can be processed using software-based breakpoint processing. Therefore, the monitoring apparatus can perform breakpoint processing more efficiently even when the number of breakpoints is so large that it cannot be monitored only by the hardware method.

また、監視装置は、ブレークポイント処理の実施方式の選択を、過去のブレークポイント処理の処理結果を用いて行うので、処理対象のプログラムに応じて、より効率的にブレークポイント処理を行うことができるようにすることができる。つまり、監視装置は、どのようなプログラムに対しても、プログラム開発者の指示なしに、より効率的にブレークポイント処理を行うようにすることができる。   Moreover, since the monitoring apparatus selects the execution method of the breakpoint processing using the processing result of the past breakpoint processing, it can perform the breakpoint processing more efficiently according to the processing target program. Can be. In other words, the monitoring apparatus can perform breakpoint processing more efficiently without any instruction from the program developer for any program.

以上のように、監視装置は、各ブレークポイントに対するブレークポイント処理の実施方式の選択によって、ブレークポイント処理の効率化を実現する。したがって、監視装置は、ブレークポイント処理の処理時間を低減させることができる。   As described above, the monitoring apparatus achieves efficient breakpoint processing by selecting the execution method of breakpoint processing for each breakpoint. Therefore, the monitoring apparatus can reduce the processing time of breakpoint processing.

[1−2解析装置]
図1は、解析装置の主な構成例を示すブロック図である。
[1-2 analyzer]
FIG. 1 is a block diagram illustrating a main configuration example of the analysis apparatus.

図1に示される解析装置100は、所定の情報を処理する情報処理装置であり、例えば、ソースコードをコンパイルして得られるプログラムを実行させて解析する動的解析を行う。その際、解析装置100は、ブレークポイント処理を、ハードウエア方式とソフトウエア方式の両方の方式で行う。   An analysis apparatus 100 shown in FIG. 1 is an information processing apparatus that processes predetermined information. For example, the analysis apparatus 100 performs a dynamic analysis in which a program obtained by compiling a source code is executed and analyzed. At that time, the analysis apparatus 100 performs breakpoint processing by both the hardware method and the software method.

図1に示されるように、解析装置100は、例えば、デバッガ101、ハードウエアブレークポイント処理部102、ソフトウエアブレークポイント処理部103、記憶部104、管理部105、およびコンパイラ106を有する。   As illustrated in FIG. 1, the analysis apparatus 100 includes, for example, a debugger 101, a hardware breakpoint processing unit 102, a software breakpoint processing unit 103, a storage unit 104, a management unit 105, and a compiler 106.

デバッガ101は、ハードウエアブレークポイント処理部102やソフトウエアブレークポイント処理部103を制御して、記憶部104に記憶される情報(プログラム121やデータ122)に対するブレークポイント処理を実行させる。   The debugger 101 controls the hardware breakpoint processing unit 102 and the software breakpoint processing unit 103 to execute breakpoint processing for information (program 121 and data 122) stored in the storage unit 104.

デバッガ101は、動的解析を行うプログラムのブレークポイントを示す情報であるブレークポイント情報111を有する。ブレークポイント情報111は、アドレスなどブレークポイント機構(ハードウエアブレークポイント処理部102やソフトウエアブレークポイント処理部103)に設定する情報を含む。   The debugger 101 has breakpoint information 111 that is information indicating a breakpoint of a program that performs dynamic analysis. The breakpoint information 111 includes information to be set in a breakpoint mechanism (hardware breakpoint processing unit 102 or software breakpoint processing unit 103) such as an address.

デバッガ101は、そのブレークポイント情報111に示される各ブレークポイントを、ハードウエアブレークポイント処理部102若しくはソフトウエアブレークポイント処理部103に設定する(監視設定)。   The debugger 101 sets each breakpoint indicated by the breakpoint information 111 in the hardware breakpoint processing unit 102 or the software breakpoint processing unit 103 (monitor setting).

例えば、デバッガ101は、ハードウエアブレークポイント処理部102にブレークポイントを設定し、そのブレークポイントを監視させる。ハードウエアブレークポイント処理部102は、設定されたブレークポイントに対して、ハードウエア方式でブレークポイント処理を行う。ハードウエアブレークポイント処理部102は、設定されたブレークポイントを監視し、所定のブレーク条件を満たした場合、プログラムの実行を停止する。なお、所定のブレーク条件を満たしたことを検出することを捕獲とも称する。そして、ハードウエアブレークポイント処理部102は、捕獲した旨をデバッガ101に通知する(捕獲通知)。   For example, the debugger 101 sets a breakpoint in the hardware breakpoint processing unit 102 and monitors the breakpoint. The hardware breakpoint processing unit 102 performs breakpoint processing on the set breakpoint by a hardware method. The hardware breakpoint processing unit 102 monitors the set breakpoint and stops execution of the program when a predetermined break condition is satisfied. Note that detecting that a predetermined break condition is satisfied is also referred to as capturing. Then, the hardware breakpoint processing unit 102 notifies the debugger 101 that it has been captured (capture notification).

また、例えば、デバッガ101は、ソフトウエアブレークポイント処理部103にブレークポイントを設定し、そのブレークポイントを監視させる。ソフトウエアブレークポイント処理部103は、設定されたブレークポイントに対して、ソフトウエア方式でブレークポイント処理を行う。ソフトウエアブレークポイント処理部103は、設定されたブレークポイントを監視し、所定のブレーク条件を満たした場合、プログラムの実行を停止する。そして、ソフトウエアブレークポイント処理部103は、捕獲した旨をデバッガ101に通知する(捕獲通知)。   For example, the debugger 101 sets a breakpoint in the software breakpoint processing unit 103 and monitors the breakpoint. The software breakpoint processing unit 103 performs breakpoint processing on the set breakpoint by a software method. The software breakpoint processing unit 103 monitors the set breakpoint and stops execution of the program when a predetermined break condition is satisfied. Then, the software breakpoint processing unit 103 notifies the debugger 101 that it has been captured (capture notification).

デバッガ101は、動的解析を行うプログラムの各ブレークポイントについて、過去の捕獲回数を用いた統計情報を、ブレーク統計情報112として管理している。ブレーク統計情報は、ブレークポイント処理の実施方式を決定するために参照される情報である。例えば、ブレーク統計情報は、各ブレークポイントとその捕獲回数を対応させるテーブルを含んでもよい。例えば、その捕獲回数に対して所定の重み付けが行われるようにしてもよい。また、ブレーク統計情報は、各ブレークポイントの捕獲回数を用いて算出される集計結果を含んでもよい。   The debugger 101 manages, as break statistical information 112, statistical information using the past number of captures for each breakpoint of a program that performs dynamic analysis. The break statistical information is information that is referred to in order to determine an execution method of breakpoint processing. For example, the break statistical information may include a table that associates each breakpoint with the number of times of capture. For example, a predetermined weight may be given to the number of captures. Further, the break statistical information may include a total result calculated using the number of times each break point is captured.

デバッガ101は、捕獲通知を取得すると、その捕獲結果をブレーク統計情報112に反映させる。例えば、デバッガ101は、捕獲通知に従って、捕獲されたブレークポイントの捕獲回数を1増加させる。なお、ブレーク統計情報において、捕獲回数に重み付けが行われたり、所定の演算が行われたりする場合、デバッガ101は、それらの演算結果にも捕獲結果を反映させる。   When acquiring the capture notification, the debugger 101 reflects the capture result in the break statistical information 112. For example, the debugger 101 increases the number of captured breakpoints by 1 according to the capture notification. Note that when the number of captures is weighted or a predetermined calculation is performed in the break statistical information, the debugger 101 also reflects the capture results in those calculation results.

デバッガ101は、上述したブレークポイントの割り当てを、このブレーク統計情報112に基づいて行う。例えば、デバッガ101は、各ブレークポイントをハードウエア方式のブレークポイント処理に割り当てるか、ソフトウエア方式のブレークポイント処理に割り当てるかを、過去の捕獲回数に基づいて行う。   The debugger 101 performs the above-described breakpoint assignment based on the break statistical information 112. For example, the debugger 101 determines whether each breakpoint is assigned to a hardware breakpoint process or a software breakpoint process based on the past number of captures.

例えば、捕獲回数上位の所定数のブレークポイントを、ハードウエア方式に割り当て(ハードウエアブレークポイント処理部102に設定し)、それより下位のブレークポイントを、ソフトウエア方式に割り当てる(ソフトウエアブレークポイント処理部103にブレークポイントを設定する)。   For example, a predetermined number of breakpoints higher in the number of captures are assigned to the hardware method (set in the hardware breakpoint processing unit 102), and lower breakpoints are assigned to the software method (software breakpoint processing) Set a breakpoint in the part 103).

このようにすることにより、デバッガ101は、捕獲される可能性が高いブレークポイントを、より高速なハードウエア方式のブレークポイント処理に割り当てることができる。また、ソフトウエア方式のブレークポイント処理も併用することにより、デバッガ101は、より多くのブレークポイントを監視させることができる。したがって、デバッガ101は、より効率よくブレークポイント処理を実行させることができる。   In this way, the debugger 101 can assign a breakpoint that is likely to be captured to a faster hardware-based breakpoint process. Further, by using software breakpoint processing together, the debugger 101 can monitor more breakpoints. Therefore, the debugger 101 can execute breakpoint processing more efficiently.

なお、ブレーク統計情報(捕獲回数)の更新により、捕獲回数上位のブレークポイントが、下位のブレークポイントと入れ替わった場合、デバッガ101は、このブレークポイントの割り当ても更新する(設定切替)。   When the break statistical information (capture count) is updated and the break point higher in the capture count is replaced with the lower break point, the debugger 101 also updates the assignment of the break point (setting switching).

つまり、デバッガ101は、最新のブレーク統計情報(捕獲回数)に基づいて、ブレークポイントの割り当てを行うことができる。したがって、デバッガ101は、プログラムの実行状況等に応じて、より効率よくブレークポイント処理を実行させることができる。   That is, the debugger 101 can assign breakpoints based on the latest break statistical information (capture count). Therefore, the debugger 101 can execute breakpoint processing more efficiently according to the execution status of the program.

なお、ブレークポイント情報やブレーク統計情報は、管理部105に格納されている(ブレークポイント情報131、ブレーク統計情報132)。デバッガ101は、動的解析を行うプログラムのブレークポイント情報111やブレーク統計情報112を、管理部105から取得する。また、それらの情報が更新された場合、デバッガ101は、更新されたブレークポイント情報111やブレーク統計情報112を管理部105に供給し、管理部105により管理されているそれらの情報を更新させる。   Note that breakpoint information and break statistical information are stored in the management unit 105 (breakpoint information 131 and break statistical information 132). The debugger 101 acquires from the management unit 105 breakpoint information 111 and break statistical information 112 of a program that performs dynamic analysis. Further, when such information is updated, the debugger 101 supplies the updated breakpoint information 111 and break statistical information 112 to the management unit 105 to update the information managed by the management unit 105.

デバッガ101は、例えば、後述する制御部151に制御されて、上述したような処理を行う。例えば、デバッガ101は、制御部151により指定されたプログラムを動的解析の対象とし、上述した処理を行う。   For example, the debugger 101 is controlled by a control unit 151 described later, and performs the above-described processing. For example, the debugger 101 performs the above-described processing using a program specified by the control unit 151 as a target of dynamic analysis.

動的解析の対象とされるプログラムは、記憶部104に記憶される(プログラム121)。なお、記憶部104には、そのプログラム121が実行されることにより生成されるデータ(例えば変数や出力データ等)も記憶される(データ122)。記憶部104に記憶されるプログラム121やデータ122は、ブレークポイント処理の監視対象とされる。   A program to be subjected to dynamic analysis is stored in the storage unit 104 (program 121). The storage unit 104 also stores data (for example, variables and output data) generated by executing the program 121 (data 122). The program 121 and data 122 stored in the storage unit 104 are to be monitored for breakpoint processing.

ハードウエアブレークポイント処理部102は、ブレークポイント処理を行うハードウエアを有しており、そのハードウエアを用いて、デバッガ101に指定された、記憶部104に記憶されているプログラム121を実行し、さらに、そのプログラム121やデータ122の、デバッガ101に設定されたブレークポイントを監視する。そして、所定のブレーク条件が満たされた場合、ハードウエアブレークポイント処理部102は、プログラムの実行を停止し、デバッガ101に捕獲通知を行う。   The hardware breakpoint processing unit 102 has hardware for performing breakpoint processing, and executes the program 121 stored in the storage unit 104 designated by the debugger 101 using the hardware, Further, breakpoints set in the debugger 101 in the program 121 and data 122 are monitored. When a predetermined break condition is satisfied, the hardware breakpoint processing unit 102 stops execution of the program and notifies the debugger 101 of capture.

ソフトウエアブレークポイント処理部103は、ブレークポイント処理を実現するソフトウエアを有しており、そのソフトウエアを実行することができる。ソフトウエアブレークポイント処理部103は、そのソフトウエアを実行することにより、デバッガ101に指定された、記憶部104に記憶されているプログラム121を実行し、さらに、そのプログラム121やデータ122の、デバッガ101に設定されたブレークポイントを監視する。そして、所定のブレーク条件が満たされた場合、ソフトウエアブレークポイント処理部103は、プログラムの実行を停止し、デバッガ101に捕獲通知を行う。   The software breakpoint processing unit 103 has software that realizes breakpoint processing, and can execute the software. The software breakpoint processing unit 103 executes the software to execute the program 121 specified in the debugger 101 and stored in the storage unit 104. Further, the software breakpoint processing unit 103 executes the program 121 and the data 122 in the debugger. The breakpoint set at 101 is monitored. When a predetermined break condition is satisfied, the software breakpoint processing unit 103 stops execution of the program and notifies the debugger 101 of capture.

ハードウエアブレークポイント処理部102は、ハードウエア方式でブレークポイント処理を行うため、ソフトウエアブレークポイント処理部103よりも高速にブレークポイント処理を行うことができる。これに対してソフトウエアブレークポイント処理部103は、ソフトウエア方式によりブレークポイント処理を行うため、ハードウエアブレークポイント処理部102よりも、多くのブレークポイントを監視することができる。   Since the hardware breakpoint processing unit 102 performs breakpoint processing by a hardware method, the hardware breakpoint processing unit 102 can perform breakpoint processing faster than the software breakpoint processing unit 103. On the other hand, since the software breakpoint processing unit 103 performs breakpoint processing by the software method, it can monitor more breakpoints than the hardware breakpoint processing unit 102.

デバッガ101は、上述したように、捕獲される可能性の高いブレークポイントをハードウエア方式に集中させ、ハードウエア方式で対応できない残りのブレークポイントをソフトウエア方式で対応するようにする。つまり、デバッガ101は、ハードウエア方式とソフトウエア方式のそれぞれの特徴(長所)を活かすように、ブレークポイントの割り当てを行う。従って、デバッガ101は、より効率よくブレークポイント処理を実行させることができる。   As described above, the debugger 101 concentrates breakpoints that are likely to be captured on the hardware method, and handles the remaining breakpoints that cannot be handled by the hardware method by the software method. That is, the debugger 101 assigns breakpoints so as to make use of the features (advantages) of the hardware method and the software method. Therefore, the debugger 101 can execute breakpoint processing more efficiently.

管理部105は、解析装置100が動的解析を行うことができる各プログラムについて、ブレークポイント情報とブレーク統計情報を記憶し、管理する(ブレークポイント情報131、ブレーク統計情報132)。   The management unit 105 stores and manages breakpoint information and break statistical information for each program that can be analyzed dynamically by the analysis apparatus 100 (breakpoint information 131 and break statistical information 132).

管理部105は、例えば、デバッガ101の要求に基づいて、管理しているブレークポイント情報131の中から、要求されたプログラムのブレークポイント情報をデバッガ101に供給する。また、管理部105は、例えば、デバッガ101の要求に基づいて、管理しているブレーク統計情報132の中から、要求されたプログラムのブレーク統計情報をデバッガ101に供給する。   For example, based on a request from the debugger 101, the management unit 105 supplies breakpoint information of the requested program to the debugger 101 from the managed breakpoint information 131. For example, the management unit 105 supplies the break statistical information of the requested program to the debugger 101 from the managed break statistical information 132 based on the request of the debugger 101.

また、管理部105は、例えば、デバッガ101から更新されたブレークポイント情報やブレーク統計情報を供給された場合、その更新内容を、管理しているブレークポイント情報131やブレーク統計情報132に反映させる。つまり、管理部105は、最新の情報を記憶する。   For example, when the updated breakpoint information or break statistical information is supplied from the debugger 101, the management unit 105 reflects the updated contents in the managed breakpoint information 131 or break statistical information 132. That is, the management unit 105 stores the latest information.

さらに、管理部105は、例えば、コンパイラ106の要求に基づいて、管理しているブレークポイント情報131の中から、要求されたプログラムのブレークポイント情報をコンパイラ106に供給する。また、管理部105は、例えば、コンパイラ106の要求に基づいて、管理しているブレーク統計情報132の中から、要求されたプログラムのブレーク統計情報をコンパイラ106に供給する。   Furthermore, the management unit 105 supplies breakpoint information of the requested program to the compiler 106 from the managed breakpoint information 131 based on a request from the compiler 106, for example. For example, the management unit 105 supplies break statistical information of the requested program to the compiler 106 from the managed break statistical information 132 based on a request from the compiler 106.

コンパイラ106は、ソースコードをコンパイルしてプログラムを生成し、記憶部104に供給して記憶させる(プログラム121)。コンパイラ106は、例えば、制御部151の制御に従ってコンパイルを行う。例えば、コンパイラ106は、制御部151から供給されるソースコードをコンパイルする。   The compiler 106 compiles the source code, generates a program, supplies the program to the storage unit 104, and stores it (program 121). For example, the compiler 106 performs compilation according to the control of the control unit 151. For example, the compiler 106 compiles the source code supplied from the control unit 151.

なお、コンパイラ106は、管理部105からブレークポイント情報やブレーク統計情報を取得し、それらの情報に基づいて、記憶部104におけるプログラム121(の各命令)やデータ122の配置を設定することができる。詳細については後述するが、このように、プログラム121やデータ122の配置を、ブレークポイントに応じて制御することにより、ブレークポイント処理の更なる高効率化が実現可能となる。   The compiler 106 can acquire breakpoint information and break statistical information from the management unit 105, and set the arrangement of the program 121 (each instruction) and data 122 in the storage unit 104 based on the information. . Although details will be described later, by controlling the arrangement of the program 121 and the data 122 in accordance with the breakpoints as described above, it is possible to realize further higher efficiency of the breakpoint processing.

また、解析装置100は、制御部151、入力部161、出力部162、記憶部163、通信部164、およびドライブ165を有する。   The analysis apparatus 100 includes a control unit 151, an input unit 161, an output unit 162, a storage unit 163, a communication unit 164, and a drive 165.

制御部151は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、およびRAM(Random Access Memory)等を有し、解析装置100の各部(例えば、デバッガ101やコンパイラ106)を制御する。例えば、制御部151のCPUは、ROMに記憶されているプログラムに従って各種の処理を実行する。また、そのCPUは、記憶部163からRAMにロードされたプログラムに従って各種の処理を実行する。RAMにはまた、CPUが各種の処理を実行するにあたって必要なデータなども適宜記憶される。   The control unit 151 includes, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and controls each unit (for example, the debugger 101 and the compiler 106) of the analysis apparatus 100. . For example, the CPU of the control unit 151 executes various processes according to programs stored in the ROM. In addition, the CPU executes various processes in accordance with programs loaded from the storage unit 163 into the RAM. The RAM also appropriately stores data necessary for the CPU to execute various processes.

入力部161は、例えば、キーボード、マウス、タッチパネル、および外部入力端子などよりなり、ユーザ指示や外部からの情報の入力を受け付け、制御部151に供給する。出力部162は、例えば、CRT(Cathode Ray Tube)ディスプレイやLCD(Liquid Crystal Display)等のディスプレイ、スピーカ、並びに外部出力端子などよりなり、制御部151から供給される各種情報を画像、音声、若しくは、アナログ信号やデジタルデータとして出力する。   The input unit 161 includes, for example, a keyboard, a mouse, a touch panel, an external input terminal, and the like. The input unit 161 accepts user instructions and external information input, and supplies the information to the control unit 151. The output unit 162 includes, for example, a display such as a CRT (Cathode Ray Tube) display or an LCD (Liquid Crystal Display), a speaker, and an external output terminal. The output unit 162 can display various information supplied from the control unit 151 as images, sounds, or Output as analog signal or digital data.

記憶部163は、例えばフラッシュメモリ等SSD(Solid State Drive)やハードディスクなどよりなり、制御部151から供給される情報を記憶したり、制御部151からの要求に従って、記憶している情報を読み出して供給したりする。   The storage unit 163 includes, for example, an SSD (Solid State Drive) such as a flash memory, a hard disk, etc., stores information supplied from the control unit 151, or reads out stored information in accordance with a request from the control unit 151. Or supply.

通信部164は、例えば、有線LAN(Local Area Network)や無線LANのインタフェースやモデムなどよりなり、インターネットを含むネットワークを介して、外部の装置との通信処理を行う。例えば、通信部164は、制御部151から供給される情報を通信相手に送信したり、通信相手から受信した情報を制御部151に供給したりする。   The communication unit 164 includes, for example, a wired LAN (Local Area Network), a wireless LAN interface, a modem, and the like, and performs communication processing with an external device via a network including the Internet. For example, the communication unit 164 transmits information supplied from the control unit 151 to the communication partner or supplies information received from the communication partner to the control unit 151.

ドライブ165は、必要に応じて制御部151に接続される。そして、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア171がそのドライブ165に適宜装着される。そして、そのドライブ165を介してリムーバブルメディア171から読み出されたコンピュータプログラムが、必要に応じて記憶部163にインストールされる。   The drive 165 is connected to the control unit 151 as necessary. Then, a removable medium 171 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately attached to the drive 165. Then, the computer program read from the removable medium 171 via the drive 165 is installed in the storage unit 163 as necessary.

以上のように、解析装置100は、ブレークポイント処理をより効率よく行うことができる。したがって、解析装置100は、ブレークポイント処理の処理時間を低減させることができる。   As described above, the analysis apparatus 100 can perform breakpoint processing more efficiently. Therefore, the analysis apparatus 100 can reduce the processing time of breakpoint processing.

なお、以上においては、ブレークポイント処理の実施方式として、ハードウエア方式とソフトウエア方式を用いるように説明したが、ブレークポイント処理の実施方式は、どのような方式であってもよい。デバッガ101が、ブレーク統計情報に基づいて、各方式の特徴に応じたブレークポイントの割り当てを行えばよい。   In the above description, the hardware method and the software method are used as the breakpoint processing execution method. However, any breakpoint processing execution method may be used. The debugger 101 may assign breakpoints according to the characteristics of each method based on the break statistical information.

また、ブレークポイント処理の実施方式の数は任意である。以上においては2方式の場合について説明したが、3方式以上であってもよい。その場合、デバッガ101は、所定の優先順序に従って、各ブレークポイントを各方式に割り当てるか、各ブレークポイントに各方式に対する優先度を持たせて各ブレークポイント同士の優先順序を計算して割り当てるようにしても良い。   In addition, the number of execution methods of breakpoint processing is arbitrary. In the above, the case of two systems has been described, but three or more systems may be used. In this case, the debugger 101 assigns each breakpoint to each method according to a predetermined priority order, or assigns each breakpoint a priority for each method and calculates and assigns the priority order between the breakpoints. May be.

なお、デバッガ101は、プログラム開発者が操作するプログラムであってもよいし、オペレーティングシステムに組み込まれる機能であってもよい。またハードウエアに接続して対象システムの動作監視などを行う、ハードウエア機器であっても良い。   The debugger 101 may be a program operated by a program developer, or may be a function incorporated in an operating system. Further, it may be a hardware device that is connected to hardware and monitors the operation of the target system.

また、ブレーク統計情報の内容は任意であるが、例えば、ブレークポイントで捕獲された回数、タイミング、頻度、以前の実行時の学習データ、ソースコードから静的に予測された情報などを含むようにしてもよい。またはハードウエアが持つキャッシュなどの付加情報を含むようにしてもよい。   The content of the break statistical information is arbitrary, but may include, for example, the number of times captured at the breakpoint, the timing, the frequency, the learning data at the previous execution, the information statically predicted from the source code, etc. Good. Alternatively, additional information such as a cache held by the hardware may be included.

[1−3具体的動作例]
次に、以上のような解析装置100の具体的な動作例を説明する。図2乃至図4を参照して、ブレークポイントの設定の様子を説明する。あるプログラムのアドレスA乃至アドレスEに対してブレークポイントを設定する例を説明する。
[1-3 Specific operation example]
Next, a specific operation example of the analysis apparatus 100 as described above will be described. With reference to FIG. 2 to FIG. 4, how to set breakpoints will be described. An example in which breakpoints are set for addresses A to E of a program will be described.

デバッガ101が、初期状態またはある時点で図2に示される状態のブレーク統計情報201を有するとする。図2に示されるように、ブレーク統計情報201においては、各アドレスの捕獲回数が示されている。   Assume that the debugger 101 has break statistical information 201 in an initial state or a state shown in FIG. As shown in FIG. 2, the break statistics information 201 indicates the number of captures of each address.

図2の状態において、捕獲回数上位2つのアドレス(アドレスCとアドレスE)のブレークポイントが、ハードウエアブレークポイント処理部102に設定され(ハードウエアブレークポイント202)ている。また、捕獲回数3位以下の3つのアドレス(アドレスB、アドレスA、およびアドレスD)のブレークポイントがソフトウエアブレークポイント処理部103に設定されている(ソフトウエアブレークポイント203)。   In the state of FIG. 2, breakpoints at the top two capture times (address C and address E) are set in the hardware breakpoint processing unit 102 (hardware breakpoint 202). In addition, breakpoints at three addresses (address B, address A, and address D) having the third or less number of captures are set in the software breakpoint processing unit 103 (software breakpoint 203).

ここでアドレスBのブレークポイントにおいてブレークしたとする。デバッガ101は、図3に示されるように、統計情報のうちアドレスBに対するブレークポイントの捕獲回数を1増やす。これによりアドレスBのブレークポイントの捕獲回数は120回から121回に更新される。   Here, it is assumed that a break occurs at a breakpoint at address B. As shown in FIG. 3, the debugger 101 increments the number of breakpoint captures for address B in the statistical information by one. As a result, the number of breakpoints captured at address B is updated from 120 to 121 times.

この後、アドレスBのブレークポイントで更に3回ブレークしたとすると、ブレーク統計情報201は、図4に示される状態になる。つまり、アドレスBのブレークポイントの捕獲回数が124回になる。したがって、アドレスBのブレークポイントの捕獲回数は、アドレスEのブレークポイントの捕獲回数(123回)を抜き、順位が変わる(捕獲回数第2位となる)。   Thereafter, if it is further broken three times at the break point at the address B, the break statistical information 201 is in the state shown in FIG. That is, the number of breakpoints captured at address B is 124. Therefore, the number of breakpoints captured at address B is different from the number of breakpoints captured at address E (123 times), and the order is changed (it is second in the number of captures).

したがって、デバッガ101は、アドレスEのブレークポイントに対するブレークポイントの実施方式を、ハードウエア方式からソフトウエア方式に変更する。またアドレスBのブレークポイントに対するブレークポイントの実施方式を、ソフトウエア方式からハードウエア方式に変更する。   Therefore, the debugger 101 changes the breakpoint execution method for the breakpoint at the address E from the hardware method to the software method. Also, the breakpoint execution method for the breakpoint at address B is changed from the software method to the hardware method.

つまり、デバッガ101は、捕獲回数上位(2位以内)に入った、ソフトウエアブレークポイント処理部103に設定されているアドレスBのブレークポイントを、ハードウエアブレークポイント処理部102に設定する。また、デバッガ101は、捕獲回数上位(2位以内)から外れた、ハードウエアブレークポイント処理部102に設定されているアドレスEのブレークポイントを、ソフトウエアブレークポイント処理部103に設定する。   In other words, the debugger 101 sets the breakpoint at the address B set in the software breakpoint processing unit 103 that has entered the upper rank (within 2nd place) in the hardware breakpoint processing unit 102. Further, the debugger 101 sets the breakpoint at the address E set in the hardware breakpoint processing unit 102 that is out of the upper number of capture times (within 2nd place) in the software breakpoint processing unit 103.

このように、デバッガ101は、より捕獲回数が多いブレークポイントをハードウエア方式に割り当てることができる。これにより、解析装置100は、ブレークポイント処理をより効率よく行うことができる。   In this way, the debugger 101 can assign a break point with a larger number of captures to the hardware method. Thereby, the analysis apparatus 100 can perform breakpoint processing more efficiently.

なお、解析装置100は、ブレークポイント処理の効率をさらに向上させるために、監視対象の、記憶部104における配置を制御(若しくは変更)することができる。   Note that the analysis apparatus 100 can control (or change) the arrangement of the monitoring target in the storage unit 104 in order to further improve the efficiency of breakpoint processing.

例えば、従来の方式によるデータの配置(若しくは配置変更前の状態)が、図5に示される例であるとする。図5おいては、記憶部104のメモリ254の番地00乃至番地04に、データA乃至データEがそれぞれ格納されている。これらのうち、データA、データD、およびデータEをソフトウエア方式およびハードウエア方式のウォッチポイントで監視するとする。   For example, it is assumed that the data arrangement (or the state before the arrangement change) according to the conventional method is an example shown in FIG. In FIG. 5, data A to data E are stored at addresses 00 to 04 of the memory 254 of the storage unit 104, respectively. Of these, data A, data D, and data E are monitored by software and hardware watchpoints.

ソフトウエア方式のブレークポイント処理では、特定アドレス単体の監視ができず、ブロックサイズで範囲監視となる。つまり、ソフトウエアブレークポイント処理部103において、ソフトウエアウォッチポイント253は、図5に示される例のように範囲で指定される。したがって、本来監視の必要のないデータBやデータCも監視対象とされてしまう。   In software breakpoint processing, a specific address alone cannot be monitored, and the range is monitored by block size. That is, in the software breakpoint processing unit 103, the software watchpoint 253 is designated by a range as in the example shown in FIG. Therefore, data B and data C that originally do not need to be monitored are also monitored.

また、ハードウエア方式のブレークポイント処理の場合、アドレス毎の監視が可能である。図5に示される例の場合、ハードウエアブレークポイント処理部102において、ハードウエアウォッチポイント252は、各ウォッチポイントをアドレス毎に指定している。つまり、データA、データD、およびデータEを監視するのに3つのウォッチポイントが用いられている。   In addition, in the case of hardware breakpoint processing, it is possible to monitor for each address. In the example shown in FIG. 5, in the hardware breakpoint processing unit 102, the hardware watchpoint 252 designates each watchpoint for each address. That is, three watchpoints are used to monitor data A, data D, and data E.

そこで、解析装置100は、図6に示されるように、メモリ254の監視対象のデータを集め、監視対象外のデータと違うブロックに配置するようにする。このようにメモリ254における各データ配置を制御すると、ソフトウエアウォッチポイント253は、図6に示される例のように設定される。つまり、ブロックサイズ単位でしか監視ができないソフトウエア方式において、2つのウォッチポイントにより、データA、データD、およびデータEを監視することができる。また、本来監視の必要のないデータBおよびデータCを監視対象から外すことができる。   Therefore, as shown in FIG. 6, the analysis apparatus 100 collects the monitoring target data in the memory 254 and arranges the data in a different block from the data that is not the monitoring target. When the data arrangement in the memory 254 is controlled in this way, the software watch point 253 is set as in the example shown in FIG. That is, in the software method that can be monitored only in block size units, data A, data D, and data E can be monitored by two watch points. Further, data B and data C that are not originally required to be monitored can be excluded from the monitoring targets.

また、このようにメモリ254における各データ配置を制御すると、ハードウエアウォッチポイント252は、図6に示される例のように設定される。つまり、ハードウエア方式においても、範囲指定を活用することができ、2つのウォッチポイントにより、データA、データD、およびデータEを監視することができる。つまり、解析装置100は、使用するウォッチポイントの数を低減させることができ、数が限られていて貴重なハードウエアウォッチポイントをより有効に活用することができる。   When the data arrangement in the memory 254 is controlled in this way, the hardware watch point 252 is set as in the example shown in FIG. That is, even in the hardware method, range specification can be utilized, and data A, data D, and data E can be monitored by two watch points. That is, the analysis apparatus 100 can reduce the number of watchpoints to be used, and can more effectively utilize the valuable hardware watchpoints that are limited in number.

つまり、コンパイラ106が、ソースコードのコンパイルを行う際に、管理部105から取得したブレークポイント情報やブレーク統計情報に基づいて、各データの配置を、上述のように制御する。なお、コンパイラ106は、既にコンパイルされたソースコードを、各データの配置を上述のように制御するように再度コンパイルすることにより、各データの配置を変更(更新)することもできる。   That is, when compiling the source code, the compiler 106 controls the arrangement of each data as described above based on the breakpoint information and the break statistical information acquired from the management unit 105. The compiler 106 can change (update) the arrangement of each data by recompiling the already compiled source code so as to control the arrangement of each data as described above.

[1−4処理の流れ]
次に、解析装置100により実行される各処理について説明する。
[1-4 Process Flow]
Next, each process executed by the analysis apparatus 100 will be described.

(1)解析処理
図7のフローチャートを参照して、解析装置100により実行される解析処理の流れの例を説明する。解析装置100は、動的解析を行う場合、この解析処理を実行する。
(1) Analysis Processing With reference to the flowchart of FIG. 7, an example of the flow of analysis processing executed by the analysis device 100 will be described. The analysis apparatus 100 executes this analysis process when performing dynamic analysis.

例えば、ユーザや他の装置等に、動的解析処理の実行が指示されると、制御部151は、解析処理を開始し、その指示において指定されたプログラムをデバッガ101に通知する。   For example, when the user or another device is instructed to execute the dynamic analysis process, the control unit 151 starts the analysis process and notifies the debugger 101 of the program specified in the instruction.

デバッガ101は、ステップS101において、指定されたプログラムのブレークポイント情報を管理部105から取得する。   In step S <b> 101, the debugger 101 acquires breakpoint information of the designated program from the management unit 105.

ステップS102において、デバッガ101は、指定されたプログラムのブレーク統計情報を管理部105から取得する。   In step S <b> 102, the debugger 101 acquires break statistical information of the designated program from the management unit 105.

ステップS103において、デバッガ101は、取得したブレークポイント情報およびブレーク統計情報に基づいて、各ブレークポイントの監視方法(例えば、ブレークポイント処理の実施方式をハードウエア方式にするかソフトウエア方式にするか)を決定する。   In step S103, the debugger 101 monitors each breakpoint on the basis of the acquired breakpoint information and break statistical information (for example, whether the breakpoint processing execution method is a hardware method or a software method). To decide.

ステップS104において、デバッガ101は、その監視方法の決定に従って、各ブレークポイントを設定する。例えば、デバッガ101は、各ブレークポイントを、図2乃至図4を参照して説明したように、ハードウエアブレークポイント処理部102若しくはソフトウエアブレークポイント処理部103に設定する。   In step S104, the debugger 101 sets each breakpoint according to the determination of the monitoring method. For example, the debugger 101 sets each breakpoint in the hardware breakpoint processing unit 102 or the software breakpoint processing unit 103 as described with reference to FIGS.

ステップS105において、デバッガ101は、ハードウエアブレークポイント処理部102およびソフトウエアブレークポイント処理部103にプログラムを実行させ、それぞれに設定されたブレークポイントを監視させる。   In step S105, the debugger 101 causes the hardware breakpoint processing unit 102 and the software breakpoint processing unit 103 to execute the program and monitor the breakpoints set for each.

ステップS106において、デバッガ101は、ハードウエアブレークポイント処理部102若しくはソフトウエアブレークポイント処理部103からの捕獲通知に基づいて、ブレークしたか否かを判定する。ブレークしていないと判定された場合、処理はステップS107に進む。   In step S106, the debugger 101 determines whether or not a break has occurred based on the capture notification from the hardware breakpoint processing unit 102 or the software breakpoint processing unit 103. If it is determined that a break has not occurred, the process proceeds to step S107.

ステップS107において、デバッガ101は、プログラムの実行が最後まで行われ、終了したか否かを判定する。終了していないと判定された場合、処理はステップS106に戻る。   In step S107, the debugger 101 determines whether or not the execution of the program has been completed to the end. If it is determined that the process has not ended, the process returns to step S106.

また、ステップS107において、終了したと判定された場合、処理はステップS110に進む。   If it is determined in step S107 that the process has ended, the process proceeds to step S110.

また、ステップS106において、ブレークしたと判定された場合、処理は、ステップS108に進む。   If it is determined in step S106 that a break has occurred, the process proceeds to step S108.

ステップS108において、デバッガ101は、一般的なデバッグ処理を行う。例えば、デバッガ101は、制御部151を介して、プログラム開発者への通知や、開発者が予め指定した処理などを行う。もちろん、それ以外の処理が行われても良い。   In step S108, the debugger 101 performs general debugging processing. For example, the debugger 101 performs notification to the program developer or processing designated in advance by the developer via the control unit 151. Of course, other processes may be performed.

ステップS109において、デバッガ101は、上述したようにブレーク統計情報等に基づいてブレークポイントの設定を制御するブレークポイント制御処理を行う。ブレークポイント制御処理が終了すると、処理はステップS107に戻る。   In step S109, the debugger 101 performs a breakpoint control process for controlling the setting of breakpoints based on the break statistical information as described above. When the breakpoint control process ends, the process returns to step S107.

ステップS110において、デバッガ101は、ブレーク統計情報が更新された場合、その更新されたブレーク統計情報を管理部105に供給し、記憶させる。   In step S110, when the break statistical information is updated, the debugger 101 supplies the updated break statistical information to the management unit 105 for storage.

ステップS110の処理が終了すると解析処理が終了する。   When the process of step S110 ends, the analysis process ends.

(2)ブレークポイント制御処理
次に、図8のフローチャートを参照して、図7のステップS109において実行されるブレークポイント制御処理の流れの例を説明する。
(2) Breakpoint Control Process Next, an example of the breakpoint control process executed in step S109 in FIG. 7 will be described with reference to the flowchart in FIG.

ブレークポイント制御処理が開始されると、デバッガ101は、ステップS131において、捕獲通知に基づいてブレーク統計情報を更新する。   When the breakpoint control process is started, the debugger 101 updates the break statistical information based on the capture notification in step S131.

ステップS132において、デバッガ101は、ブレーク統計情報の上位(すなわち、ハードウエアブレークポイント処理部102に設定するブレークポイント)が変化したか否かを判定する。変化したと判定された場合、処理はステップS133に進む。   In step S132, the debugger 101 determines whether or not the higher rank of the break statistical information (that is, the breakpoint set in the hardware breakpoint processing unit 102) has changed. If it is determined that the change has occurred, the process proceeds to step S133.

ステップS133において、デバッガ101は、ブレーク統計情報の更新結果に従って、各ブレークポイントの監視方式(ブレークポイント処理の実施方式)の設定を行う。   In step S133, the debugger 101 sets a monitoring method for each breakpoint (breakpoint processing execution method) according to the update result of the break statistical information.

ステップS133の処理が終了すると、処理は、図7に戻る。また、ステップS132において、ブレーク統計情報の上位が変化していないと判定された場合、処理は、図7に戻る。   When the process of step S133 ends, the process returns to FIG. If it is determined in step S132 that the top of the break statistical information has not changed, the process returns to FIG.

(3)監視方式設定処理
次に、図9のフローチャートを参照して、図8のステップS133において実行される監視方式設定処理の流れの例を説明する。
(3) Monitoring Method Setting Process Next, an example of the monitoring method setting process executed in step S133 in FIG. 8 will be described with reference to the flowchart in FIG.

監視方式設定処理が開始されると、デバッガ101は、ステップS151において、ブレーク統計情報の上位から外れたブレークポイントをハードウエア方式から外す。ステップS152において、デバッガ101は、そのブレーク統計情報の上位から外れたブレークポイントをソフトウエア方式に設定する。   When the monitoring method setting process is started, the debugger 101 removes from the hardware method breakpoints that are out of the top of the break statistical information in step S151. In step S152, the debugger 101 sets a breakpoint that is out of the higher rank of the break statistical information in the software method.

つまり、デバッガ101は、ブレーク統計情報の上位から外れたブレークポイントの設定先を、ハードウエアブレークポイント処理部102からソフトウエアブレークポイント処理部103に変更する。   In other words, the debugger 101 changes the setting point of the break point that is out of the higher rank of the break statistical information from the hardware break point processing unit 102 to the software break point processing unit 103.

ステップS153において、デバッガ101は、ブレーク統計情報の上位に入ったブレークポイントをハードウエア方式に設定する。ステップS154において、デバッガ101は、ブレーク統計情報の上位に入ったブレークポイントをソフトウエア方式から外す。   In step S153, the debugger 101 sets a breakpoint that has entered the top of the break statistical information in the hardware method. In step S154, the debugger 101 removes from the software method the breakpoint that has entered the top of the break statistical information.

つまり、デバッガ101は、ブレーク統計情報の上位に入ったブレークポイントの設定先を、ソフトウエアブレークポイント処理部103からハードウエアブレークポイント処理部102に変更する。   That is, the debugger 101 changes the setting point of the breakpoint that is placed at the top of the break statistical information from the software breakpoint processing unit 103 to the hardware breakpoint processing unit 102.

ステップS154の処理が終了すると、処理は、図8に戻る。   When the process of step S154 ends, the process returns to FIG.

以上のように各処理を実行することにより、解析装置100は、ブレークポイント処理をより効率よく行うことができる。したがって、解析装置100は、ブレークポイント処理の処理時間を低減させることができる。   By executing each process as described above, the analysis apparatus 100 can perform the breakpoint process more efficiently. Therefore, the analysis apparatus 100 can reduce the processing time of breakpoint processing.

(4)プログラム生成処理
次に、図10のフローチャートを参照して、解析装置100により実行されるプログラム生成処理の流れの例を説明する。解析装置100は、ソースコードをコンパイルする場合、このプログラム生成処理を実行する。
(4) Program Generation Processing Next, an example of the flow of program generation processing executed by the analysis apparatus 100 will be described with reference to the flowchart of FIG. The analysis apparatus 100 executes the program generation process when compiling the source code.

例えば、ユーザや他の装置等に、コンパイルが指示されると、制御部151は、プログラム生成処理を開始し、その指示において指定されたソースコードをコンパイラ106に提供する。   For example, when the user or another device is instructed to compile, the control unit 151 starts the program generation process and provides the compiler 106 with the source code specified in the instruction.

コンパイラ106は、ステップS171において、制御部151から供給されるソースコードを取得する。   In step S171, the compiler 106 acquires the source code supplied from the control unit 151.

ステップS172において、コンパイラ106は、管理部105からブレークポイント情報やブレーク統計情報を取得する。   In step S <b> 172, the compiler 106 acquires breakpoint information and break statistical information from the management unit 105.

ステップS173において、コンパイラ106は、ステップS171において取得したソースコードをコンパイルし、プログラムを生成する。   In step S173, the compiler 106 compiles the source code acquired in step S171 and generates a program.

ステップS174において、コンパイラ106は、ブレークポイント情報に基づいて、ステップS173において生成したプログラムの、監視対象の配置を設定する。   In step S174, the compiler 106 sets the monitoring target arrangement of the program generated in step S173 based on the breakpoint information.

ステップS174の処理が終了すると、プログラム生成処理が終了する。   When the process of step S174 ends, the program generation process ends.

以上のようにプログラムを生成することにより、解析装置100は、ブレークポイント処理をより効率よく行うことができる。したがって、解析装置100は、ブレークポイント処理の処理時間を低減させることができる。   By generating the program as described above, the analysis apparatus 100 can perform breakpoint processing more efficiently. Therefore, the analysis apparatus 100 can reduce the processing time of breakpoint processing.

例えば、解析装置100は、ブレークの頻度が高いブレークポイントを、ハードウエア方式等、オーバーヘッドの小さい方式に設定し、その他をソフトウエア方式等、潤沢に使える方式に自動的に切り替えながら設定する。したがって、解析装置100は、数に限りがあるハードウエア方式等を効率的に使用し、かつソフトウエア方式等、オーバーヘッドが大きい方式を使用しつつもオーバーヘッドを低減させることができる。   For example, the analysis apparatus 100 sets break points with a high frequency of breaks to a method with a small overhead such as a hardware method, and others while automatically switching to a method that can be used abundantly such as a software method. Accordingly, the analysis apparatus 100 can efficiently use a limited number of hardware methods and the like, and can reduce overhead while using a method with a large overhead such as a software method.

また、解析装置100は、ブレーク統計情報を基に、どの方式を使用するかを自動的に設定する。したがって、ユーザが効率を考えて手動で設定する必要が無くなる。   The analysis apparatus 100 automatically sets which method is used based on the break statistical information. Therefore, it is not necessary for the user to set manually for efficiency.

また、解析装置100は、監視対象の配置を適切に変えることで、ブレークポイントを効率的に使用することができる。範囲指定が可能な方式であれば、使用できる数に限りがある中で、使用数を削減することができる。ブロック単位でしか指定ができない方式であれば、本来捕獲不要な条件での捕獲が減り、オーバーヘッドを低減することができる。   Moreover, the analysis apparatus 100 can use breakpoints efficiently by appropriately changing the arrangement of the monitoring targets. If the range can be specified, the number of uses can be reduced while the number that can be used is limited. If the method can be specified only in units of blocks, capture under conditions that originally do not require capture is reduced, and overhead can be reduced.

<2.第2の実施の形態>
[コンピュータ]
上述した一連の処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、コンピュータにインストールされる。ここでコンピュータには、専用のハードウエアに組み込まれているコンピュータや、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータ等が含まれる。
<2. Second Embodiment>
[Computer]
The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software is installed in the computer. Here, the computer includes, for example, a general-purpose personal computer that can execute various functions by installing a computer incorporated in dedicated hardware and various programs.

図11は、上述した一連の処理をプログラムにより実行するコンピュータのハードウエアの構成例を示すブロック図である。   FIG. 11 is a block diagram illustrating a hardware configuration example of a computer that executes the above-described series of processing by a program.

図11に示されるコンピュータ500において、CPU(Central Processing Unit)501、ROM(Read Only Memory)502、RAM(Random Access Memory)503は、バス504を介して相互に接続されている。   In a computer 500 shown in FIG. 11, a CPU (Central Processing Unit) 501, a ROM (Read Only Memory) 502, and a RAM (Random Access Memory) 503 are connected to each other via a bus 504.

バス504にはまた、入出力インタフェース510も接続されている。入出力インタフェース510には、入力部511、出力部512、記憶部513、通信部514、およびドライブ515が接続されている。   An input / output interface 510 is also connected to the bus 504. An input unit 511, an output unit 512, a storage unit 513, a communication unit 514, and a drive 515 are connected to the input / output interface 510.

入力部511は、例えば、キーボード、マウス、マイクロホン、タッチパネル、入力端子などよりなる。出力部512は、例えば、ディスプレイ、スピーカ、出力端子などよりなる。記憶部513は、例えば、ハードディスク、RAMディスク、不揮発性のメモリなどよりなる。通信部514は、例えば、ネットワークインタフェースよりなる。ドライブ515は、磁気ディスク、光ディスク、光磁気ディスク、または半導体メモリなどのリムーバブルメディア521を駆動する。   The input unit 511 includes, for example, a keyboard, a mouse, a microphone, a touch panel, an input terminal, and the like. The output unit 512 includes, for example, a display, a speaker, an output terminal, and the like. The storage unit 513 includes, for example, a hard disk, a RAM disk, a nonvolatile memory, and the like. The communication unit 514 includes a network interface, for example. The drive 515 drives a removable medium 521 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

以上のように構成されるコンピュータでは、CPU501が、例えば、記憶部513に記憶されているプログラムを、入出力インタフェース510およびバス504を解して、RAM503にロードして実行することにより、上述した一連の処理が行われる。RAM503にはまた、CPU501が各種の処理を実行する上において必要なデータなども適宜記憶される。   In the computer configured as described above, for example, the CPU 501 loads the program stored in the storage unit 513 via the input / output interface 510 and the bus 504, loads the program into the RAM 503, and executes the program. A series of processing is performed. The RAM 503 also appropriately stores data necessary for the CPU 501 to execute various processes.

コンピュータ(CPU501)が実行するプログラムは、例えば、パッケージメディア等としてのリムーバブルメディア521に記録して適用することができる。また、プログラムは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供することができる。   The program executed by the computer (CPU 501) can be recorded and applied to a removable medium 521 as a package medium or the like, for example. The program can be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.

コンピュータでは、プログラムは、リムーバブルメディア521をドライブ515に装着することにより、入出力インタフェース510を介して、記憶部513にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部514で受信し、記憶部513にインストールすることができる。その他、プログラムは、ROM502や記憶部513に、あらかじめインストールしておくことができる。   In the computer, the program can be installed in the storage unit 513 via the input / output interface 510 by attaching the removable medium 521 to the drive 515. The program can be received by the communication unit 514 via a wired or wireless transmission medium and installed in the storage unit 513. In addition, the program can be installed in the ROM 502 or the storage unit 513 in advance.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

また、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   Further, in the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but may be performed in parallel or It also includes processes that are executed individually.

また、本明細書において、システムとは、複数の構成要素(装置、モジュール(部品)等)の集合を意味し、全ての構成要素が同一筐体中にあるか否かは問わない。したがって、別個の筐体に収納され、ネットワークを介して接続されている複数の装置、及び、1つの筐体の中に複数のモジュールが収納されている1つの装置は、いずれも、システムである。   In this specification, the system means a set of a plurality of components (devices, modules (parts), etc.), and it does not matter whether all the components are in the same housing. Accordingly, a plurality of devices housed in separate housings and connected via a network and a single device housing a plurality of modules in one housing are all systems. .

また、以上において、1つの装置(または処理部)として説明した構成を分割し、複数の装置(または処理部)として構成するようにしてもよい。逆に、以上において複数の装置(または処理部)として説明した構成をまとめて1つの装置(または処理部)として構成されるようにしてもよい。また、各装置(または各処理部)の構成に上述した以外の構成を付加するようにしてももちろんよい。さらに、システム全体としての構成や動作が実質的に同じであれば、ある装置(または処理部)の構成の一部を他の装置(または他の処理部)の構成に含めるようにしてもよい。   In addition, in the above description, the configuration described as one device (or processing unit) may be divided and configured as a plurality of devices (or processing units). Conversely, the configurations described above as a plurality of devices (or processing units) may be combined into a single device (or processing unit). Of course, a configuration other than that described above may be added to the configuration of each device (or each processing unit). Furthermore, if the configuration and operation of the entire system are substantially the same, a part of the configuration of a certain device (or processing unit) may be included in the configuration of another device (or other processing unit). .

以上、添付図面を参照しながら本開示の好適な実施形態について詳細に説明したが、本開示の技術的範囲はかかる例に限定されない。本開示の技術分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本開示の技術的範囲に属するものと了解される。   The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the technical scope of the present disclosure is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field of the present disclosure can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that it belongs to the technical scope of the present disclosure.

例えば、本技術は、1つの機能を、ネットワークを介して複数の装置で分担、共同して処理するクラウドコンピューティングの構成をとることができる。   For example, the present technology can take a configuration of cloud computing in which one function is shared by a plurality of devices via a network and jointly processed.

また、上述のフローチャートで説明した各ステップは、1つの装置で実行する他、複数の装置で分担して実行することができる。   In addition, each step described in the above flowchart can be executed by being shared by a plurality of apparatuses in addition to being executed by one apparatus.

さらに、1つのステップに複数の処理が含まれる場合には、その1つのステップに含まれる複数の処理は、1つの装置で実行する他、複数の装置で分担して実行することができる。   Further, when a plurality of processes are included in one step, the plurality of processes included in the one step can be executed by being shared by a plurality of apparatuses in addition to being executed by one apparatus.

なお、本技術は以下のような構成も取ることができる。
(1) プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理を、互いに異なる実施方式で行う複数のブレークポイント処理部と、
各ブレークポイントを監視するブレークポイント処理部を、前記ブレークポイント処理の結果に関する情報に基づいて、前記複数のブレークポイント処理部の中から選択する選択部と
を備え、
前記複数のブレークポイント処理部は、それぞれ、前記選択部により自身が選択されたブレークポイントを監視する
情報処理装置。
(2) 前記複数のブレークポイント処理部は、
第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部と、
前記第1の方式と監視可能ブレークポイント数および処理時間の異なる第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部と
を含む前記(1)に記載の情報処理装置。
(3) 前記複数のブレークポイント処理部は、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行う
前記(2)に記載の情報処理装置。
(4) 前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、
前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式である
前記(3)に記載の情報処理装置。
(5) 前記ブレークポイント処理の結果に関する情報は、前記ブレークポイント処理における、各ブレークポイントの捕獲回数に関する統計情報である
前記(1)乃至(4)のいずれかに記載の情報処理装置。
(6) 前記選択部は、
前記統計情報の上位のブレークポイントに対して、第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部を選択し、
前記統計情報の上位のブレークポイント以外のブレークポイントに対して、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部を選択する
前記(5)のいずれかに記載の情報処理装置。
(7) 前記選択部は、前記ブレークポイント処理の結果、前記統計情報の上位のブレークポイントが変化した場合、次のブレークポイント処理に対して、
前記統計情報の上位から外れたブレークポイントを監視するブレークポイント処理部を、前記第1のブレークポイント処理部から前記第2のブレークポイント処理部に変更し、
前記統計情報の上位に入ったブレークポイントを監視するブレークポイント処理部を、前記第2のブレークポイント処理部から前記第1のブレークポイント処理部に変更する
前記(6)に記載の情報処理装置。
(8) 前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、
前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式である
前記(6)または(7)に記載の情報処理装置。
(9) 前記選択部による前記ブレークポイント処理部の選択に応じて、前記ブレークポイントの配置を設定する設定部をさらに備える
前記(1)乃至(8)のいずれかに記載の情報処理装置。
(10) 前記ブレークポイントは、データへのアクセスを捕獲するウォッチポイントと、命令の実行を捕獲するブレークポイントとを含む
前記(1)乃至(9)のいずれかに記載の情報処理装置。
(11) 情報処理装置の情報処理方法であって、
前記情報処理装置が、
プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択し、
各ブレークポイントに対する前記ブレークポイント処理を、選択した実施方式により行う
情報処理方法。
(12) コンピュータを、
プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択する選択部と、
各ブレークポイントに対する前記ブレークポイント処理を、前記選択部により選択された実施方式により行うブレークポイント処理部と
して機能させるためのプログラム。
In addition, this technique can also take the following structures.
(1) A plurality of breakpoint processing units that monitor breakpoints of a program and perform breakpoint processing for stopping execution of the program by different implementation methods;
A selection unit that selects a breakpoint processing unit that monitors each breakpoint from the plurality of breakpoint processing units based on information on a result of the breakpoint processing; and
Each of the plurality of break point processing units monitors a break point selected by the selection unit.
(2) The plurality of breakpoint processing units are:
A first breakpoint processing unit that performs the breakpoint processing according to a first method;
The information processing apparatus according to (1), further including: a second breakpoint processing unit that performs the breakpoint processing according to a second method that is different from the first method in the number of monitorable breakpoints and processing time.
(3) The plurality of breakpoint processing units can monitor more breakpoints than the first method, and the breakpoint is generated by the second method having a longer processing time than the first method. The information processing apparatus according to (2), wherein point processing is performed.
(4) The first method is a method using hardware that performs the breakpoint processing.
The information processing apparatus according to (3), wherein the second method uses a software that realizes the breakpoint processing.
(5) The information processing apparatus according to any one of (1) to (4), wherein the information related to the result of the breakpoint process is statistical information related to the number of times each breakpoint is captured in the breakpoint process.
(6) The selection unit includes:
Select a first breakpoint processing unit that performs the breakpoint processing according to a first method for breakpoints higher in the statistical information,
More breakpoints than the first method can be monitored for breakpoints other than the higher breakpoints of the statistical information, and the processing time is longer than that of the first method. The information processing apparatus according to any one of (5), wherein a second breakpoint processing unit that performs the breakpoint processing is selected by a method.
(7) If the higher breakpoint of the statistical information is changed as a result of the breakpoint process, the selection unit performs the following breakpoint process:
Changing the breakpoint processing unit that monitors breakpoints out of the top of the statistical information from the first breakpoint processing unit to the second breakpoint processing unit;
The information processing apparatus according to (6), wherein a breakpoint processing unit that monitors a breakpoint that has entered a higher rank of the statistical information is changed from the second breakpoint processing unit to the first breakpoint processing unit.
(8) The first method is a method using hardware that performs the breakpoint processing.
The information processing apparatus according to (6) or (7), wherein the second method is a method using software that realizes the breakpoint processing.
(9) The information processing apparatus according to any one of (1) to (8), further including a setting unit that sets an arrangement of the breakpoints in response to selection of the breakpoint processing unit by the selection unit.
(10) The information processing apparatus according to any one of (1) to (9), wherein the breakpoint includes a watchpoint that captures access to data and a breakpoint that captures execution of an instruction.
(11) An information processing method for an information processing apparatus,
The information processing apparatus is
Based on information related to the result of the breakpoint process, the execution method of the breakpoint process for each breakpoint of the program is determined for a program in which a breakpoint process for monitoring a program breakpoint and stopping the execution of the program is performed. Select from a plurality of different implementation methods,
An information processing method for performing the breakpoint processing for each breakpoint according to a selected execution method.
(12) Connect the computer
Based on information related to the result of the breakpoint process, the execution method of the breakpoint process for each breakpoint of the program is determined for a program in which a breakpoint process for monitoring a program breakpoint and stopping the execution of the program is performed. A selection unit for selecting from a plurality of different implementation methods;
A program for causing the breakpoint processing for each breakpoint to function as a breakpoint processing section that performs the execution method selected by the selection section.

100 解析装置, 101 デバッガ, 102 ハードウエアブレークポイント処理部, 103 ソフトウエアブレークポイント処理部, 104 記憶部, 105 管理部, 106 コンパイラ, 111 ブレークポイント情報, 112 ブレーク統計情報, 121 プログラム, 122 データ, 131 ブレークポイント情報, 132 ブレーク統計情報, 151 制御部, 161 入力部, 162 出力部, 163 記憶部, 164 通信部, 165 ドライブ, 171 リムーバブルメディア   DESCRIPTION OF SYMBOLS 100 Analysis apparatus, 101 Debugger, 102 Hardware breakpoint processing part, 103 Software breakpoint processing part, 104 Storage part, 105 Management part, 106 Compiler, 111 Breakpoint information, 112 Break statistical information, 121 Program, 122 Data, 131 break point information, 132 break statistical information, 151 control unit, 161 input unit, 162 output unit, 163 storage unit, 164 communication unit, 165 drive, 171 removable media

Claims (12)

プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理を、互いに異なる実施方式で行う複数のブレークポイント処理部と、
各ブレークポイントを監視するブレークポイント処理部を、前記ブレークポイント処理の結果に関する情報に基づいて、前記複数のブレークポイント処理部の中から選択する選択部と
を備え、
前記複数のブレークポイント処理部は、それぞれ、前記選択部により自身が選択されたブレークポイントを監視する
情報処理装置。
A plurality of breakpoint processing units that monitor breakpoints of a program and perform breakpoint processing for stopping execution of the program by different implementation methods;
A selection unit that selects a breakpoint processing unit that monitors each breakpoint from the plurality of breakpoint processing units based on information on a result of the breakpoint processing; and
Each of the plurality of break point processing units monitors a break point selected by the selection unit.
前記複数のブレークポイント処理部は、
第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部と、
前記第1の方式と監視可能ブレークポイント数および処理時間の異なる第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部と
を含む請求項1に記載の情報処理装置。
The plurality of breakpoint processing units are:
A first breakpoint processing unit that performs the breakpoint processing according to a first method;
The information processing apparatus according to claim 1, further comprising: a second breakpoint processing unit that performs the breakpoint processing according to a second method that is different from the first method in the number of monitorable breakpoints and processing time.
前記第2のブレークポイント処理部は、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行う
請求項2に記載の情報処理装置。
The second breakpoint processing unit can monitor more breakpoints than the first method, and the breakpoint processing is performed by the second method having a longer processing time than the first method. The information processing apparatus according to claim 2.
前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、
前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式である
請求項3に記載の情報処理装置。
The first method is a method using hardware that performs the breakpoint processing,
The information processing apparatus according to claim 3, wherein the second method uses a software that realizes the breakpoint processing.
前記ブレークポイント処理の結果に関する情報は、前記ブレークポイント処理における、各ブレークポイントの捕獲回数に関する統計情報である
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the information related to the result of the breakpoint process is statistical information related to the number of times each breakpoint is captured in the breakpoint process.
前記選択部は、
前記統計情報の上位のブレークポイントに対して、第1の方式により前記ブレークポイント処理を行う第1のブレークポイント処理部を選択し、
前記統計情報の上位のブレークポイント以外のブレークポイントに対して、前記第1の方式よりも多くのブレークポイントを監視することができ、かつ、前記第1の方式よりも処理時間が長い第2の方式により前記ブレークポイント処理を行う第2のブレークポイント処理部を選択する
請求項5に記載の情報処理装置。
The selection unit includes:
Select a first breakpoint processing unit that performs the breakpoint processing according to a first method for breakpoints higher in the statistical information,
More breakpoints than the first method can be monitored for breakpoints other than the higher breakpoints of the statistical information, and the processing time is longer than that of the first method. The information processing apparatus according to claim 5, wherein a second breakpoint processing unit that performs the breakpoint processing is selected according to a method.
前記選択部は、前記ブレークポイント処理の結果、前記統計情報の上位のブレークポイントが変化した場合、次のブレークポイント処理に対して、
前記統計情報の上位から外れたブレークポイントを監視するブレークポイント処理部を、前記第1のブレークポイント処理部から前記第2のブレークポイント処理部に変更し、
前記統計情報の上位に入ったブレークポイントを監視するブレークポイント処理部を、前記第2のブレークポイント処理部から前記第1のブレークポイント処理部に変更する
請求項6に記載の情報処理装置。
When the higher breakpoint of the statistical information has changed as a result of the breakpoint process, the selection unit, for the next breakpoint process,
Changing the breakpoint processing unit that monitors breakpoints out of the top of the statistical information from the first breakpoint processing unit to the second breakpoint processing unit;
The information processing apparatus according to claim 6, wherein a breakpoint processing unit that monitors a breakpoint that enters a higher rank of the statistical information is changed from the second breakpoint processing unit to the first breakpoint processing unit.
前記第1の方式は、前記ブレークポイント処理を行うハードウエアを利用する方式であり、
前記第2の方式は、前記ブレークポイント処理を実現するソフトウエアを利用する方式である
請求項6に記載の情報処理装置。
The first method is a method using hardware that performs the breakpoint processing,
The information processing apparatus according to claim 6, wherein the second method is a method using software that realizes the breakpoint processing.
前記選択部による前記ブレークポイント処理部の選択に応じて、前記ブレークポイントの配置を設定する設定部をさらに備える
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, further comprising: a setting unit that sets an arrangement of the breakpoints according to selection of the breakpoint processing unit by the selection unit.
前記ブレークポイントは、データへのアクセスを捕獲するウォッチポイントと、命令の実行を捕獲するブレークポイントとを含む
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the breakpoint includes a watchpoint that captures access to data and a breakpoint that captures execution of an instruction.
情報処理装置の情報処理方法であって、
前記情報処理装置が、
プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択し、
各ブレークポイントに対する前記ブレークポイント処理を、選択した実施方式により行う
情報処理方法。
An information processing method for an information processing apparatus,
The information processing apparatus is
Based on information related to the result of the breakpoint process, the execution method of the breakpoint process for each breakpoint of the program is determined for a program in which a breakpoint process for monitoring a program breakpoint and stopping the execution of the program is performed. Select from a plurality of different implementation methods,
An information processing method for performing the breakpoint processing for each breakpoint according to a selected execution method.
コンピュータを、
プログラムのブレークポイントを監視し、前記プログラムの実行を停止するブレークポイント処理が行われるプログラムについて、前記プログラムの各ブレークポイントに対する前記ブレークポイント処理の実施方式を、前記ブレークポイント処理の結果に関する情報に基づいて、互いに異なる複数の実施方式の中から選択する選択部と、
各ブレークポイントに対する前記ブレークポイント処理を、前記選択部により選択された実施方式により行うブレークポイント処理部と
して機能させるためのプログラム。
Computer
Based on information related to the result of the breakpoint process, the execution method of the breakpoint process for each breakpoint of the program is determined for a program in which a breakpoint process for monitoring a program breakpoint and stopping the execution of the program is performed. A selection unit for selecting from a plurality of different implementation methods;
A program for causing the breakpoint processing for each breakpoint to function as a breakpoint processing section that performs the execution method selected by the selection section.
JP2012073505A 2012-03-28 2012-03-28 Information processing device and method, and program Pending JP2013206061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012073505A JP2013206061A (en) 2012-03-28 2012-03-28 Information processing device and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012073505A JP2013206061A (en) 2012-03-28 2012-03-28 Information processing device and method, and program

Publications (1)

Publication Number Publication Date
JP2013206061A true JP2013206061A (en) 2013-10-07

Family

ID=49525089

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012073505A Pending JP2013206061A (en) 2012-03-28 2012-03-28 Information processing device and method, and program

Country Status (1)

Country Link
JP (1) JP2013206061A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018088213A (en) * 2016-11-30 2018-06-07 日本電気株式会社 Verification device, method, and program
CN113762763A (en) * 2021-09-01 2021-12-07 北京汽车集团越野车有限公司 Engineering change data processing method and device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018088213A (en) * 2016-11-30 2018-06-07 日本電気株式会社 Verification device, method, and program
CN113762763A (en) * 2021-09-01 2021-12-07 北京汽车集团越野车有限公司 Engineering change data processing method and device and storage medium

Similar Documents

Publication Publication Date Title
CN109800159B (en) Program debugging method, program debugging device, terminal device, and storage medium
US8578340B1 (en) Recording and replaying computer program execution with recorded execution event breakpoints
US9244815B2 (en) Integrated debugger and code coverage tool
US9430353B2 (en) Analysis and visualization of concurrent thread execution on processor cores
Zhang et al. Panappticon: Event-based tracing to measure mobile application and platform performance
JP5520371B2 (en) Time-based context sampling of trace data with support for multiple virtual machines
US20150006961A1 (en) Capturing trace information using annotated trace output
US10725889B2 (en) Testing multi-threaded applications
WO2011083459A1 (en) Utilizing temporal assertions in a debugger
US20080127119A1 (en) Method and system for dynamic debugging of software
US9117020B2 (en) Determining control flow divergence due to variable value difference
US8533683B2 (en) Stack walking enhancements using sensorpoints
US9361206B2 (en) Code coverage framework
US20080127118A1 (en) Method and system for dynamic patching of software
US20110314453A1 (en) Real time profiling of a computer software application running on parallel computing resources
Li et al. Effectively manifesting concurrency bugs in android apps
US9870306B2 (en) Exception prediction before an actual exception during debugging
Wienke et al. Results of the survey: failures in robotics and intelligent systems
JP2013206061A (en) Information processing device and method, and program
Fedorova et al. Performance comprehension at WiredTiger
CN112740187A (en) Method and system for debugging program
CN112527638A (en) Program monitoring system, method and computer readable storage medium
JP2010039695A (en) Multitask operating system and debugging device
Kranzlmuller et al. Monitoring strategies for hypercube systems
Sairabanu et al. A survey of performance analysis tools for OpenMP and MPI