JP2005352591A - Multiprocessor system, debugging method, and program - Google Patents
Multiprocessor system, debugging method, and program Download PDFInfo
- Publication number
- JP2005352591A JP2005352591A JP2004170291A JP2004170291A JP2005352591A JP 2005352591 A JP2005352591 A JP 2005352591A JP 2004170291 A JP2004170291 A JP 2004170291A JP 2004170291 A JP2004170291 A JP 2004170291A JP 2005352591 A JP2005352591 A JP 2005352591A
- Authority
- JP
- Japan
- Prior art keywords
- breakpoint
- program
- target program
- debug target
- setting table
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、マルチプロセッサシステム、デバッグ方法、及びプログラムに関し、特に、複数のプロセッサを備えたマルチプロセッサシステム、該マルチプロセッサシステムに適用されるデバッグ方法、及び該デバッグ方法をコンピュータに実行させるためのプログラムに関する。 The present invention relates to a multiprocessor system, a debugging method, and a program, and more particularly, a multiprocessor system including a plurality of processors, a debugging method applied to the multiprocessor system, and a program for causing a computer to execute the debugging method. About.
具体的には、デバッグ対象プログラムにブレークポイントを設け、ブレークポイントにおいてデバッグ対象プログラムの実行を中断し、デバッグ端末からオペレータがコマンドを与えることでデバッグ対象プログラムのデバッグを行うマルチプロセッサシステムに係わるものである。 Specifically, it relates to a multiprocessor system in which a breakpoint is provided in a debug target program, execution of the debug target program is interrupted at the breakpoint, and an operator gives a command from a debug terminal to debug the debug target program. is there.
プログラム開発時にプログラムの挙動を確認したり、不具合を発見、修正したりするために利用するデバッガプログラムには、デバッグ対象プログラムの実行を所定の命令で中断するブレークポイント機能が備えられている。この機能は、デバッグ対象プログラム上のあらかじめ指定した任意の命令でデバッグ対象プログラムの実行を中断させるものである。オペレータは、あらかじめ実行を停止させたい命令を指定しておいてから、デバッグ対象プログラムを始動させる。デバッグ対象プログラムが指定された命令で停止した時点で、オペレータはレジスタやメモリの値を調べたり、また、変更したりすることも可能である。その後、デバッグ対象プログラムをブレークポイントで停止した時点の状態から再開させることが可能である。このブレークポイント機能の実現手段としては、従来、次のような方法が知られている(非特許文献1および非特許文献2参照)。
A debugger program used for checking program behavior at the time of program development, or for finding and correcting defects, has a breakpoint function for interrupting execution of a program to be debugged with a predetermined instruction. This function interrupts execution of the debug target program at an arbitrary instruction specified in advance on the debug target program. The operator designates an instruction whose execution is to be stopped in advance, and then starts the debug target program. When the program to be debugged stops at the designated instruction, the operator can examine or change the value of the register or memory. After that, it is possible to resume the debug target program from the state at the time of stopping at the breakpoint. As means for realizing this breakpoint function, the following methods are conventionally known (see Non-Patent
(1)オペレータによりブレークポイントに指定された命令をトラップ命令で置き換え、デバッグ対象プログラムの実行中にトラップ命令が検知されると、トラップが発生し、トラップ処理ルーチンを介してデバッガプログラムが起動される。デバッグ対象プログラムの実行再開が指示されると、トラップ命令に置き換えられた元の命令の実行をシミュレートした後、制御をデバッグ対象プログラムに戻す。この方法には次の特徴がある。 (1) An instruction specified as a breakpoint by an operator is replaced with a trap instruction. When a trap instruction is detected during execution of a program to be debugged, a trap is generated and a debugger program is started via a trap processing routine. . When an instruction to resume execution of the debug target program is given, the execution of the original instruction replaced with the trap instruction is simulated, and then control is returned to the debug target program. This method has the following characteristics.
デバッグ対象プログラム中に複数のブレークポイントを設定できる。また、ブレークポイントを検知するための特別なハードウェアを必要としない。 Multiple breakpoints can be set in the program to be debugged. Also, no special hardware is required to detect breakpoints.
(2)ハードウェアにブレークポイントレジスタを設け、実行を停止させたいデバッグ対象プログラムの命令アドレスをブレークポイントレジスタ内に保持する。デバッグ対象プログラム実行中に、このブレークポイントレジスタで指定される命令が検知されると、トラップが発生し、トラップ処理ルーチンを介してデバッガプログラムが起動される。デバッグ対象プログラムの実行再開が指示されると、制御をデバッグ対象プログラムに戻す。この方法では次の特徴がある。 (2) A breakpoint register is provided in the hardware, and the instruction address of the debug target program whose execution is to be stopped is held in the breakpoint register. If an instruction specified by this breakpoint register is detected during execution of the program to be debugged, a trap is generated and the debugger program is activated via the trap processing routine. When an instruction to resume execution of the debug target program is given, control is returned to the debug target program. This method has the following characteristics.
デバッグ対象プログラムを書き換えることがなく、また、命令の置き換えがないため命令の実行をシミュレートする必要がない。 There is no need to rewrite the program to be debugged, and there is no need to simulate instruction execution because there is no instruction replacement.
(3)デバッグ対象プログラムの命令ごとにブレークポイントを制御するフラグを用意し、オペレータによりブレークポイントに指定された命令のフラグをセットする。このフラグがセットされている命令が検知されると、トラップが発生し、トラップ処理ルーチンを介してデバッガプログラムが起動される。デバッグ対象プログラムの実行再開が指示されると、制御をデバッグ対象プログラムに戻す。この方法では次の特徴がある。 (3) A flag for controlling a breakpoint is prepared for each instruction of the program to be debugged, and an instruction flag designated as a breakpoint by the operator is set. When an instruction with this flag set is detected, a trap is generated and the debugger program is activated via the trap processing routine. When an instruction to resume execution of the debug target program is given, control is returned to the debug target program. This method has the following characteristics.
デバッグ対象プログラムに複数のブレークポイントを設定でき、また、命令の置き換えがないため命令の実行をシミュレートする必要がない。 Multiple breakpoints can be set in the program to be debugged, and there is no instruction replacement, so there is no need to simulate instruction execution.
また、複数のプロセッサを有したマルチプロセッサシステムにおけるデバッガプログラムとしては、特許文献1および特許文献2に記載されたものがある。ここでは、ブレークポイント機能は、従来技術を使用しており、複数のプロセッサのうち、ある1つのプロセッサの状態によりトラップを発生し、デバッガプログラムを起動している。
しかしながら、上述したブレークポイントを設定しプログラムデバッガを起動する従来の方式では、ブレークポイントの発生条件が単一であるため、マルチプロセッサシステムで実行されるプログラムのデバッグを行う場合に、ある1つのプロセッサの状態によりブレーク要因が発生すると、常にデバッグ対象プログラムが中断される。このため、マルチプロセッサシステムでの複数のプロセッサの動作状態によっては、デバッグ情報が変わってしまったり、また、複数のプロセッサ間の通信状態によっては、本来のデバッグ対象プログラムを中断してデバッグを行うべき状態ではないにも拘わらず、デバッグ対象プログラムを中断してデバッグを行ってしまったりする不具合が発生する可能性があった。 However, in the conventional method in which the breakpoint is set and the program debugger is started, the breakpoint generation condition is single, so that when a program executed in a multiprocessor system is debugged, a certain processor is used. If a break factor occurs due to the state of, the debug target program is always interrupted. For this reason, depending on the operating state of multiple processors in a multiprocessor system, the debugging information may change. Depending on the communication state between multiple processors, the program to be debugged should be interrupted. In spite of not being in a state, there is a possibility that the debugging target program is interrupted and debugging is performed.
また、オペレータが、デバッグ対象プログラム中にブレークポイントを複数設定することができても、実際にデバッグを行いたい状態でデバッグ対象プログラムを中断させるためには、所望の状態に各プロセッサの状態が遷移するまで、何度もブレークポイントをヒットさせ、デバッグ対象プログラムの実行を中断させる必要があり、デバッグの効率が悪いという問題点があり、複数のプロセッサが密に連結し同時並列動作を行うようなプログラムのデバッグには適していなかった。 Even if the operator can set multiple breakpoints in the program to be debugged, the state of each processor transitions to the desired state in order to interrupt the program to be debugged in the state where debugging is actually desired. Until then, it is necessary to hit breakpoints many times and interrupt the execution of the program to be debugged, which has the problem that the debugging efficiency is poor, and multiple processors are closely connected to perform simultaneous parallel operation. It was not suitable for program debugging.
本発明はこのような問題点に鑑みてなされたものであって、デバッグ専用の特別なハードウェアを付加することなく、複数のブレークポイントを設定でき、デバッグ効率を向上できるマルチプロセッサシステム、デバッグ方法、及びプログラムを提供することを目的とする。 The present invention has been made in view of such problems, and a multiprocessor system and a debugging method capable of setting a plurality of breakpoints and improving debugging efficiency without adding special hardware dedicated for debugging. And to provide a program.
上記目的を達成するために、請求項1記載の発明によれば、複数のプロセッサを備えたマルチプロセッサシステムにおいて、デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件が設定されるブレークポイント設定テーブルと、前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を格納するブレークポイント履歴テーブルと、前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したか否かを判定する判定手段と、前記判定手段によって肯定の判定がなされたとき、デバッガプログラムを起動させる起動手段とを有することを特徴とするマルチプロセッサシステムが提供される。 To achieve the above object, according to the first aspect of the present invention, in a multiprocessor system including a plurality of processors, a predetermined breakpoint in the debug target program when the debug target program is executed by the plurality of processors. A breakpoint setting table in which each breakpoint occurrence condition is set in each processor corresponding to the above, and a breakpoint history table storing each break factor generated in each processor when the plurality of processors execute the debug target program All the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, the break factor stored in the breakpoint history table and the breakpoint set in the breakpoint setting table are There is provided a multiprocessor system comprising: determination means for determining whether or not the event generation condition matches; and start means for starting a debugger program when the determination means makes a positive determination. The
また、請求項2記載の発明によれば、複数のプロセッサを備えたマルチプロセッサシステムにおいて、デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件が時系列に沿って設定されるブレークポイント設定テーブルと、前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を時系列に沿って格納するブレークポイント履歴テーブルと、前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが、時系列順序を含めて一致したか否かを判定する判定手段と、前記判定手段によって肯定の判定がなされたとき、デバッガプログラムを起動させる起動手段とを有することを特徴とするマルチプロセッサシステムが提供される。 According to the invention of claim 2, in a multiprocessor system including a plurality of processors, each processor corresponding to a predetermined breakpoint in the debug target program when the debug target program is executed by the plurality of processors. A breakpoint setting table in which each breakpoint occurrence condition is set in time series, and each break factor generated in each processor when the plurality of processors execute the debug target program are stored in time series All the breakpoint occurrence conditions set in the breakpoint history table and the breakpoint setting table are satisfied, the break factor stored in the breakpoint history table and the breakpoint set in the breakpoint setting table are set. A determination means for determining whether or not a work point occurrence condition is matched including a time-series order, and an activation means for starting a debugger program when an affirmative determination is made by the determination means. A multiprocessor system is provided.
また、請求項5記載の発明によれば、複数のプロセッサを備えたマルチプロセッサシステムに適用されるデバッグ方法において、デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件をブレークポイント設定テーブルに設定する設定ステップと、前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因をブレークポイント履歴テーブルに格納する格納ステップと、前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したか否かを判定する判定ステップと、前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップとを有することを特徴とするデバッグ方法が提供される。 According to the fifth aspect of the present invention, in a debugging method applied to a multiprocessor system including a plurality of processors, a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program. A setting step for setting each breakpoint occurrence condition in each processor corresponding to each in the breakpoint setting table, and a breakpoint history table indicating each break factor generated in each processor when the plurality of processors execute the debug target program And the break step and the breakpoint setting stored in the breakpoint history table, and all the breakpoint occurrence conditions set in the breakpoint setting table are satisfied. A determination step for determining whether or not a breakpoint occurrence condition set in the table matches, and a startup step for starting a debugger program when an affirmative determination is made in the determination step. A debugging method is provided.
また、請求項6記載の発明によれば、複数のプロセッサを備えたマルチプロセッサシステムに適用されるデバッグ方法において、デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件を時系列に沿ってブレークポイント設定テーブルに設定する設定ステップと、前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を時系列に沿ってブレークポイント履歴テーブルに格納する格納ステップと、前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが、時系列順序を含めて一致したか否かを判定する判定ステップと、前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップとを有することを特徴とするデバッグ方法が提供される。 According to a sixth aspect of the present invention, in a debugging method applied to a multiprocessor system including a plurality of processors, a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program. A setting step for setting each breakpoint occurrence condition in each processor corresponding to each time in a breakpoint setting table in a time series, and each break factor generated in each processor when the plurality of processors execute the debug target program Storing in the breakpoint history table in chronological order, and the breakpoint occurrence conditions set in the breakpoint setting table are all satisfied, and the break requirements stored in the breakpoint history table are stored. And a breakpoint occurrence condition set in the breakpoint setting table, a determination step for determining whether or not the same including a time-series order, and a positive determination by the determination step, There is provided a debugging method characterized by having an activation step to be activated.
さらに、上記デバッグ方法をコンピュータに実行させるためのプログラムが提供される。 Furthermore, a program for causing a computer to execute the debugging method is provided.
本発明によれば、デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件をブレークポイント設定テーブルに設定するとともに、前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因をブレークポイント履歴テーブルに格納する。そして、前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したとき、デバッガプログラムを起動させる。 According to the present invention, each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when the debug target program is executed by a plurality of processors is set in the breakpoint setting table, and the debug Each break factor generated in each processor when the target program is executed by the plurality of processors is stored in the breakpoint history table. And all the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table matches the breakpoint occurrence conditions set in the breakpoint setting table When this happens, start the debugger program.
これにより、デバッグ専用の特別なハードウェアを付加することなく、複数のブレークポイントを設定でき、デバッグ効率を向上できる。 Thus, a plurality of breakpoints can be set without adding special hardware dedicated for debugging, and debugging efficiency can be improved.
以下、本発明を実施するための最良の形態について、図面を参照して説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
〔第1の実施の形態〕
図1は、本発明の第1の実施の形態に係るマルチプロセッサシステムの構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing a configuration of a multiprocessor system according to the first embodiment of the present invention.
図中、101はマルチプロセッサシステムであり、オペレーティングシステムおよび主要なアプリケーションプログラムが実行されるメインプロセッサ(以下「メインCPU」という)102と、メインCPU102に制御信号109により接続された複数(n個)のサブプロセッサ(以下「サブCPU」という)103a〜103dと、これらのCPU102,103a〜103dと共有バス108により接続されるメモリコントローラ107と、メモリコントローラ107に接続された共有メモリ106とから構成される。
In the figure,
マルチプロセッサシステム101内の各CPUは、メモリコントローラ107を介して、共有メモリ106に対し情報の書き込みと読み出しの機能を持っており、共有メモリ106を介して情報交換を行う。また、マルチプロセッサシステム101の動作手順を定めるプログラムは共有メモリ106内に記憶され、メインCPU102はそのプログラムに従い、制御信号109を介して複数のサブCPU103a〜103dの制御を行いながら動作する。マルチプロセッサシステム101で実行されるプログラムのデバッグは、メインCPU102にデバッガ制御部104を介して接続されたデバッガ端末105を用いて行う。
Each CPU in the
なお、マルチプロセッサシステム101内のメインCPU102とサブCPU103a〜103dとは異なるタイプのプロセッサである。
The
すなわち、メインCPU102は、オペレーティングシステムやアプリケーションプログラムを実行するための高性能なプロセッサで構成される。メインCPU102からは、制御信号109を介して複数のサブCPU103a〜103dの起動・停止・再開といった制御が可能である。
That is, the
複数のサブCPU103a〜103dは全て、同一タイプのプロセッサで構成され、マルチプロセッサシステム101内にある機能モジュール間の通信制御など、限られた目的で使用される専用プロセッサである。
The plurality of
図2は、共有メモリ106に設定格納される情報や領域を示す図である。なお、図2でも、図1と同様に、メインCPU102と複数のサブCPU103a〜103dとデバッガ制御部104とデバッガ端末105とを示すが、メモリコントローラ107の図示は省略している。
FIG. 2 is a diagram showing information and areas set and stored in the shared
共有メモリ106内には、メインCPU102で実行されるデバッグ対象プログラム201、デバッガプログラム202、デバッガインタフェース203、コマンドインタフェース204、ブレークポイント設定テーブル205、ブレークポイント履歴テーブル206、命令退避領域207、レジスタ退避領域208が設定されている。
In the shared
ここで、デバッガインタフェース203は、デバッガプログラム202とデバッグ対象プログラム201との間の情報交換に使用される。コマンドインタフェース204は、デバッガ端末105からオペレータにより入力されるコマンドを受け付け、デバッガプログラム202に情報を受け渡すのに使用される。またコマンドインタフェース204は、デバッガプログラム202からの情報をデバッガ端末105に表示し、オペレータに対してデバッグ情報を通知するのに使用される。ブレークポイント設定テーブル205は、デバッガ対象プログラム201を中断させるためのブレークポイントを設定するためのテーブルである(図3を参照して後述)。ブレークポイント履歴テーブル206は、発生したブレーク要因の履歴を格納するテーブルである(図6を参照して後述)。命令退避領域207は、ブレークポイント発生条件を示す命令がトラップ命令などに置換される場合、元の命令の退避格納領域として使用される。レジスタ退避領域208は、デバッグ対象プログラム201の実行が中断され、デバッガプログラム202が呼び出され実行されるときに、各CPUのレジスタ内容を退避させ、格納しておくための退避格納領域として使用される。
Here, the
つぎに、ブレークポイントの設定について説明する。 Next, breakpoint setting will be described.
ここで、メインCPU102上においてアプリケーションプログラムが実行され、メインCPU102の制御の下で、サブCPU103a〜103dが同時並列的にマルチプロセッサシステム101内の機能モジュール間の通信制御プログラムを実行しているものとする。このような状態において、メインCPU102上で実行されているアプリケーションプログラムをデバッグ対象プログラム201としてデバッグを行う場合、オペレータは、予めプログラムを中断してレジスタやメモリの情報を調べるためのブレークポイントを、デバッガ端末105からコマンドを入力して設定する。オペレータがデバッガ端末105から入力したコマンドは、コマンドインタフェース204を介してデバッガプログラム202で受け付けられる。デバッガプログラム202は、コマンドを解析し、デバッガインタフェース203を介して、共有メモリ106内のブレークポイント設定テーブル205にブレークポイントを設定する。
Here, an application program is executed on the
図3は、本発明の第1の実施の形態におけるブレークポイント設定テーブル205の記載内容を示す図である。 FIG. 3 is a diagram showing the description content of the breakpoint setting table 205 according to the first embodiment of this invention.
メインCPU102とn個のサブCPU103a〜103dとに対してブレークポイント発生条件をそれぞれ設定し、各CPUでブレークポイント発生条件が満たされたときトラップを発生し、デバッグ対象プログラムを中断させるために、ブレークポイント設定テーブル205は、1つのブレークポイントに対し複数個の設定フィールド(図3に示すテーブルの各行)を持っている。
A breakpoint generation condition is set for each of the
各フィールドは、CPU/IDが記載される列205aと、ブレークポイント発生条件が記載される列205cと、その条件を有効にするか否かを示すフラグが記載される205bとから構成される。ブレーク要因を発生させる対象となる全てのCPUについて、このブレークポイント設定テーブル205に、CPU/IDとブレークポイント発生条件と有効フラグとを設定することで、デバッグ対象プログラム201に対するブレークポイントの設定が終了する。
Each field includes a
列205aに記載されるCPU/IDは、各CPUに一意に付与されている個別の識別子であり、マルチプロセッサシステム101内に同一のCPU/IDを持つCPUが複数存在することは無い。列205cに記載されるブレークポイント発生条件としては、対応のCPUが実行する命令の中で、対象となる1つの命令の命令アドレスが設定される。列205bに記載される有効フラグは、対応のブレークポイント発生条件が有効であるか、すでにそのブレーク要因が発生して無効になっているかを示す。
The CPU / ID described in the
なお、ブレーク要因を発生させるCPUは複数である必要はない。また、ブレークポイント発生条件が1つしか設定されていなくても問題はない。ブレーク要因を発生させる対象とならないCPUに関しては、フィールドを設定する必要はない。 Note that it is not necessary to have a plurality of CPUs that generate break factors. Also, there is no problem if only one breakpoint occurrence condition is set. It is not necessary to set a field for a CPU that is not a target for generating a break factor.
また、ブレークポイント発生条件として設定された命令アドレスに対応する命令は、デバッガプログラム202によりトラップ命令に置換される。置換される前の命令は命令退避領域207に退避格納される。
An instruction corresponding to an instruction address set as a breakpoint occurrence condition is replaced with a trap instruction by the
ブレークポイント設定テーブル205は、図3では1つのみ示しているが、ブレークポイント設定テーブル205は、異なるブレークポイントごとに設けられ、したがって、共有メモリ106内に複数格納されることもある。
Although only one breakpoint setting table 205 is shown in FIG. 3, the breakpoint setting table 205 is provided for each different breakpoint, and therefore a plurality of breakpoint setting tables 205 may be stored in the shared
オペレータが所望のブレークポイントの設定を終了すると、デバッガプログラム202からデバッグ対象プログラム201に制御を移し、デバッガ対象プログラム201を始動させる。
When the operator finishes setting a desired breakpoint, control is transferred from the
次に、図4を参照してデバック処理を説明する。 Next, the debugging process will be described with reference to FIG.
図4は、本発明の第1の実施の形態におけるデバッグ処理の手順を示すフローチャートである。 FIG. 4 is a flowchart showing a procedure of debugging processing according to the first embodiment of the present invention.
デバッグ対象プログラム201実行中に、デバッガプログラム202により各サブCPU103a〜103dとメインCPU102とのプログラムカウンタの情報が、マルチプロセッサシステム101の動作クロックに合わせて収集される。
During execution of the
メインCPU102及び複数のサブCPU103a〜103dのうちの1つが、ブレークポイント発生条件の設定により置換されたトラップ命令を検知すると、図5に示すトラップ処理ルーチンが実行される(S1)。
When one of the
なお、ブレーク要因が発生していない場合、デバッグ対象プログラム201の実行は要因が発生するまで続けられる。
If no break factor has occurred, execution of the
図5は、トラップ処理ルーチンの手順を示すフローチャートである。 FIG. 5 is a flowchart showing the procedure of the trap processing routine.
図5において、トラップ命令が検知されると、トラップ命令を検知したCPUがトラップ処理ルーチンを実行する。すなわち、トラップ命令を検知したCPUがサブCPU103a〜103dのうちの1つである場合、メインCPU102へトラップ命令の検知を通知し、メインCPU102は、制御信号109を介して他のサブCPUの実行を停止する。サブCPUからメインCPU102へのトラップ命令の検知通知は、割り込み処理により行なわれる。一方、トラップ命令を検知したCPUがメインCPU102である場合、メインCPU102は、制御信号109を介して全てのサブCPU103a〜103dの実行を停止する(S11)。
In FIG. 5, when a trap instruction is detected, the CPU that detects the trap instruction executes a trap processing routine. That is, when the CPU that has detected the trap instruction is one of the
次に、トラップ命令を検知したCPUは、デバッガプログラム202を介してブレークポイント履歴テーブル206にアクセスして、CPU/ID、プログラムカウンタの内容、および、システムタイマの値を格納する(S12)。
Next, the CPU that has detected the trap instruction accesses the breakpoint history table 206 via the
図6は、ブレークポイント履歴テーブル206の記載内容を示す図である。 FIG. 6 is a diagram showing the description content of the breakpoint history table 206.
ブレークポイント履歴テーブル206には、トラップ命令を検知したCPUのCPU/IDが記載される列206aと、該CPUのプログラムカウンタの値が記載される列206bと、システムタイマの値が記載される列206cとが設けられ、トラップ命令の検知ごとに1行ずつ記載が行なわれる。
In the breakpoint history table 206, a
ステップS12では同時に、トラップ命令を検知したCPUが、ブレークポイント設定テーブル205にアクセスして、該CPUのCPU/IDに対応するフィールド(行)の列205bの有効フラグをクリアし、そのフィールドを無効にする。また、命令をトラップ命令に置換する前の命令に書き戻す。
At the same time, in step S12, the CPU that detected the trap instruction accesses the breakpoint setting table 205, clears the valid flag in the
次に、ブレークポイント設定テーブル205内の列205bにおいて、有効フラグが有効に設定されているものが残っていないかを走査する(S13)。その結果、有効フラグが有効になっているものがあった場合(S13でYES)、トラップ命令を検知したCPUでトラップ命令に置換される前の命令をシミュレートした後、実行停止しているサブCPUの実行を再開させ、デバッグ対象プログラム201の実行を再開させる(S11)。次のトラップ命令が検知されるまでデバッグ対象プログラム201の実行が進められる。これにより、このブレークポイントに関して、ブレークポイント設定テーブル205内の全てのブレークポイント発生条件が満たされるまで、デバッグ対象プログラム201の実行が進められる。
Next, the
一方、ブレークポイント設定テーブル205内の列205bにおいて有効フラグがすべて無効に設定されている場合(S13でNO)、トラップ命令を検知したCPUのCPU/IDがメインCPU102のものであれば、メインCPU102は、全てのサブCPU103a〜103dの動作を停止し、さらに、全てのCPUレジスタの内容をレジスタ退避領域208に退避格納する(S14)。その後、デバッガプログラム202を呼び出し(S15)、デバッガプログラム202に制御を移す(図4のステップS2へ進む)。
On the other hand, if all the valid flags are set to invalid in the
一方、トラップ命令を検知したCPUのCPU/IDがサブCPU103a〜103dうちの1つであれば、メインCPU102へのトラップ命令の検知の通知が発生し、トラップ処理ルーチンを介して全てのCPUレジスタの内容が、レジスタ退避領域208に退避格納された後(S14)、デバッガプログラム202が呼び出され(S15)、デバッガプログラム202に制御が移される(図4のステップS2へ進む)。同時に、メインCPU102は、制御信号109を介して、それぞれ同時並列的に動作している他のサブCPUの実行を停止する。
On the other hand, if the CPU / ID of the CPU that detected the trap instruction is one of the
次に図4のステップS2に戻って、該ステップS2では、デバッガプログラム202が呼び出され、起動されるが、この詳細な内容を、図7を参照して説明する。
Next, returning to step S2 in FIG. 4, in step S2, the
図7は、図4のステップS2の詳細な内容を示すフローチャートである。 FIG. 7 is a flowchart showing detailed contents of step S2 of FIG.
デバッガプログラム202が呼び出されると、デバッガプログラム202に制御を移すための環境が設定される(S21)。つぎに、全てのCPUの情報をデバッガプログラム202から走査できるようにするために、全てのCPUの同期化処理が行われる(S22)。
When the
ここで、デバッガプログラム202は、デバッガインタフェース203を介して、ブレークポイント設定テーブル205とブレークポイント履歴テーブル206との比較処理を行う(S23)。すなわち、ブレークポイント設定テーブル205内のブレークポイント発生条件(図3の列205c)と、ブレークポイント履歴テーブル206内のプログラムカウンタの値(図6の列206b)とが一致し、かつ、それらに対応するCPU/ID同士が一致していた場合には(S24でYES)、ブレークポイント履歴テーブル206の内容を基に、CPU/ID、ブレーク発生条件、及びブレーク要因発生時のシステムタイマ値を含むブレークヒットメッセージを生成する(S25)。一方、一致していない場合には(S24でNO)、エラーメッセージを生成する(S26)。
Here, the
デバッガプログラム202は、生成されたメッセージをデバッガ端末105に表示して(S26)、オペレータに対しブレークヒットの状況を通知した後、図4のステップS3へ進む。
The
図4のステップS3では、デバッグ対象プログラム201の実行が中断され、デバッガプログラム202に制御が移ることによって、オペレータがデバッグ端末105からデバッグコマンドの入力を行い、デバッグ作業を開始する。この処理内容を、図8を参照して説明する。
In step S3 of FIG. 4, execution of the
図8は、図4のステップS3の詳細な内容を示すフローチャートである。 FIG. 8 is a flowchart showing detailed contents of step S3 of FIG.
オペレータによりデバッガ端末105からコマンドが入力されると、デバッガプログラム202は、コマンドインタフェース204を介してコマンドを受け付け、コマンドの解析を行う(S31)。その結果、デバッガ端末105から入力されたコマンドが、デバッグ対象プログラム201への復帰コマンドであった場合(S32でYES)、デバッガプログラム201が呼び出された時点の環境へ設定を戻し(S33)、デバッグ対象プログラム201のデバッグ作業を終了する。
When a command is input from the
一方、デバッガ端末105から入力されたコマンドが、デバッグ対象プログラム201への復帰コマンドでなかった場合(S32でNO)、デバッガプログラム202は、さらにコマンドインタフェース204を介して、オペレータによるデバッガ端末105からの入力を受け付け、デバッグ対象プログラム201によるデバッグ作業を継続させる。オペレータが所望のデバッグ情報を収集し、デバッグ対象プログラム201への復帰コマンドをデバッガ端末105から入力するまでデバッグ作業が続けられる。
On the other hand, if the command input from the
図4に戻って、デバッガ端末105からオペレータにより、デバッグ対象プログラム201への復帰が指示されると(S4)、命令退避領域207に退避されていた、トラップ命令へ置換される前の命令を、トラップ命令を検知したCPUでシミュレートし、次に、レジスタ退避領域208に退避されていた他の全てのCPUのレジスタ情報を復帰させた後で、デバッグ対象プログラム201の実行が再開され(S5)、次のブレークポイントにヒットするまでデバッグ対象プログラム201の実行が続けられる。
Returning to FIG. 4, when a return instruction to the
なお、上記の第1の実施の形態では、デバッグ対象プログラム201は、メインCPU102上で実行されるアプリケーションプログラムとして説明したが、サブCPU103a〜103d上で実行される、マルチプロセッサシステム101内の機能モジュール間の通信制御プログラムをデバッグ対象プログラム201として、同じ方法でデバッグすることも可能である。
In the first embodiment, the
以上説明したように、本発明の第1の実施の形態におけるデバッガプログラム202では、ブレークポイントの設定に関して、ブレークポイント設定テーブル205を用いて、複数のCPUにおいてブレークポイント発生条件を個別に設定できるようにし、それらの条件がすべて満たされ、かつ、ブレークポイント設定テーブル205とブレークポイント履歴テーブル206とが一致した場合に、デバッグ対象プログラム201の実行を中断し、デバッガプログラム202を呼び出すようにしたので、次のような効果を奏することができる。
As described above, in the
1)マルチプロセッサシステム101の所望の状態からデバッグ作業を開始でき、デバッグの効率を向上させることができる。
1) Debugging work can be started from a desired state of the
2)ブレークポイント設定テーブル205を、共有メモリ106内に任意個数、設定することができ、したがって、複数個のブレークポイントを設定できる。
2) An arbitrary number of breakpoint setting tables 205 can be set in the shared
3)デバッグ専用の特別なハードウェアを必要とせず、マルチプロセッサシステム101でデバッグ作業を容易に行うことができる。
3) The
〔第2の実施の形態〕
次に、本発明の第2の実施の形態を説明する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described.
第2の実施の形態の構成は、基本的に第1の実施の形態の構成と同じであるので、第2の実施の形態の説明においては、第1の実施の形態の構成と同一部分には同一の参照符号を付して、第1の実施の形態の説明を流用し、異なる部分だけを説明する。 Since the configuration of the second embodiment is basically the same as the configuration of the first embodiment, in the description of the second embodiment, the same parts as the configuration of the first embodiment are used. Are denoted by the same reference numerals, and the description of the first embodiment is used, and only different portions will be described.
図9は、本発明の第2の実施の形態におけるブレークポイント設定テーブルの記載内容を示す図である。 FIG. 9 is a diagram showing the description content of the breakpoint setting table according to the second embodiment of the present invention.
メインCPU102とn個のサブCPU103a〜103dとに対してブレークポイント発生条件をそれぞれ設定し、各CPUでブレークポイント発生条件が満たされたときトラップを発生し、デバッグ対象プログラムを中断させるために、第2の実施の形態におけるブレークポイント設定テーブルも、1つのブレークポイントに対し複数個の設定フィールド(図9に示すテーブルの各行)を持っている。
In order to set a breakpoint generation condition for each of the
各フィールドは、CPU/IDが記載される列205gと、ブレークポイント発生条件が記載される列205fと、そのブレークポイント発生条件の前に発生するブレークポイント発生条件を表す先行IDが記載される列205hと、そのブレークポイント発生条件の後に発生するブレークポイント発生条件を表す後続IDが記載される列205iと、そのブレークポイント発生条件を有効にするか否かを示すフラグが記載される列205eと、そのブレークポイント発生条件個別の識別子であるIDが記載される列205dとから構成される。
Each field includes a
ブレーク要因を発生させる対象となる全てのCPUについて、ブレークポイント発生条件を発生させたい順番に、ブレークポイント設定テーブルにおける最上のフィールドから順に、ID、CPU/ID、先行ID、後続ID、ブレークポイント発生条件を設定し、また有効フラグを設定する。これによって、デバッグ対象プログラム201に対するブレークポイントの設定が終了する。
ID, CPU / ID, predecessor ID, subsequent ID, breakpoint generation from the top field in the breakpoint setting table in the order in which breakpoint generation conditions are to be generated for all CPUs for which break factors are to be generated Set conditions and set valid flags. Thereby, the setting of the breakpoint for the
列205gに記載されるCPU/IDは、各CPUに一意に付与される識別子であり、マルチプロセッサシステム101内に同一のCPU/IDを持つCPUが複数存在することは無い。列205fに記載されるブレークポイント発生条件としては、対応のCPUが実行する命令の中で、対象となる1つの命令の命令アドレスが設定される。列205eに記載される有効フラグは、対応のブレークポイント発生条件が有効であるか、すでにそのブレーク要因が発生して無効になっているかを示す。列205dに記載されるIDは、対応のフィールドを識別するための識別子であり、ブレークポイント設定テーブル内で重複する値になることは無い。列205hに記載される先行IDは、対応のブレークポイント発生条件の1つ前に発生するブレークポイント発生条件のIDを示す。一連のブレークポイント発生条件のうちで最初に発生させたいブレークポイント発生条件には、先行IDに、START条件であることを示すIDが設定される。列205iに記載される後続IDは、対応のブレークポイント発生条件の次に発生するブレークポイント発生条件のIDを示す。一連のブレークポイント発生条件で最後に発生させたいブレークポイント発生条件には、後続IDに、END条件であることを示すIDが設定される。
The CPU / ID described in the
なお、ブレーク要因を発生させるCPUは複数である必要はない。ある1つのCPUでのブレークポイント発生条件を、時系列に沿って設定するようにしてもよい。また、ブレークポイント発生条件が1つのみ設定されていてもよい。ブレーク要因を発生させる対象とならないCPUに関しては、フィールドを設定する必要はない。 Note that it is not necessary to have a plurality of CPUs that generate break factors. A breakpoint generation condition in a certain CPU may be set in time series. Further, only one breakpoint generation condition may be set. It is not necessary to set a field for a CPU that is not a target for generating a break factor.
また、ブレークポイント設定テーブル内の列205hの先行IDに、START条件のIDが設定され、一連のブレークポイント発生条件で発生順序が最初のブレークポイント発生条件に設定されたフィールド(行)において、列205fに記載されたブレークポイント発生条件で示されるアドレスに対応する命令は、デバッガプログラム202によりトラップ命令に書き変えられる。置換される前の命令は命令退避領域207に退避格納される。
In the field (row) in which the START condition ID is set in the preceding ID of the
次に、図4に示す第1の実施の形態におけるデバッグ処理のフローチャートを流用して、第2の実施の形態におけるデバッグ処理を説明する。 Next, the debugging process in the second embodiment will be described using the flowchart of the debugging process in the first embodiment shown in FIG.
デバッグ対象プログラム201の実行中に、メインCPU102を介して各サブCPU103a〜103dとメインCPU102のプログラムカウンタの情報が、マルチプロセッサシステム101の動作クロックに合わせて収集されている。
During execution of the
メインCPU102及び複数のサブCPU103a〜103dのうちの1つのCPUがブレークポイント発生条件の設定により置換されたトラップ命令を検知すると、図10に示すトラップ処理ルーチンが実行される(S1)。
When one of the
なお、ブレーク要因が発生していない場合、デバッグ対象プログラム201の実行は要因が発生するまで続けられる。
If no break factor has occurred, execution of the
図10は、トラップ処理ルーチンの手順を示すフローチャートである。 FIG. 10 is a flowchart showing the procedure of the trap processing routine.
図10において、トラップ命令が検知されると、トラップ命令を検知したCPUがトラップ処理ルーチンを実行する。すなわち、トラップ命令を検知したCPUがサブCPU103a〜103dのうちの1つである場合、トラップ命令が検知されたことがメインCPU102へ通知され、メインCPU102は制御信号109を介して他のサブCPUの実行を停止する。サブCPUからメインCPU102へのトラップ命令の検知通知は割り込み処理により通知される。一方、トラップ命令を検知したCPUがメインCPU102である場合、メインCPU102は制御信号109を介して全てのサブCPU103a〜103dの実行を停止する(S41)。
In FIG. 10, when a trap instruction is detected, the CPU that detects the trap instruction executes a trap processing routine. That is, when the CPU that has detected the trap command is one of the
次に、トラップ命令を検知したCPUは、デバッガプログラム202を介してブレークポイント履歴テーブル206にアクセスし、CPU/IDとプログラムカウンタの内容とシステムタイマの値とを格納する。同時に、トラップ命令を検知したCPUは、ブレークポイント設定テーブル205において、該CPUのCPU/IDに対応するフィールドの有効フラグをクリアし、そのフィールドを無効にする。また、命令をトラップ命令に置換する前の命令に書き戻す(S42)。
Next, the CPU that has detected the trap instruction accesses the breakpoint history table 206 via the
次に、ブレークポイント設定テーブル205内に、次に発生すべきブレーク要因が設定されていないか走査する(S43)。その結果、次に発生すべきブレーク要因が設定されている場合(S43でYES)、次のブレークポイント発生条件に設定されたフィールドに対応する命令はトラップ命令に置換される。そして、置換される前の命令は命令退避領域207に退避格納される。トラップ命令を検知したCPUは、トラップ命令に置換される前の命令をシミュレートした後、メインCPU102が、実行停止しているサブCPUの動作を再開させ、デバッグ対象プログラム201の実行を再開させる(S44)。次のトラップ命令が検知されるまでデバッグ対象プログラム201の実行が進められる。
Next, the breakpoint setting table 205 is scanned for a break factor to be generated next (S43). As a result, when the break factor to be generated next is set (YES in S43), the instruction corresponding to the field set in the next breakpoint generation condition is replaced with the trap instruction. The instruction before replacement is saved in the
ブレークポイント設定テーブル205内の有効フラグがすべて無効に設定され、かつ、後続IDにEND条件を示すIDが設定されて、次に発生すべきブレーク要因が設定されていない場合(S43でNO)、トラップ命令を検知したCPUのCPU/IDがメインCPU102のものであれば、メインCPU102は全てのサブCPU103a〜103dの実行動作を停止し、さらに、全てのCPUレジスタの内容をレジスタ退避領域208に退避格納した後(S45)、デバッガプログラム202を呼び出し(S46)、デバッガプログラム202に制御を移す(図4のステップS2へ進む)。
When all the valid flags in the breakpoint setting table 205 are set to invalid and an ID indicating an END condition is set in the subsequent ID, and a break factor to be generated next is not set (NO in S43), If the CPU / ID of the CPU that detected the trap instruction is that of the
一方、トラップ命令を検知したCPUのCPU/IDがサブCPU103a〜103dうちの1つのものであれば、メインCPU102へのトラップ命令の検知の通知が発生し、トラップ処理ルーチンを介して全てのCPUレジスタの内容がレジスタ退避領域208に退避された後(S45)、デバッガプログラム202が呼び出され(S46)、デバッガプログラム202に制御が移される(図4のステップS2へ進む)。同時に、メインCPU102は制御信号109を介して、それぞれ同時並列的に動作している他のサブCPUを停止する。
On the other hand, if the CPU / ID of the CPU that detected the trap instruction is one of the
なお、ブレークポイント設定テーブル205内の有効フラグがすべて無効に設定され、かつ、次に発生すべき要因が設定されている場合には、エラーメッセージを生成し、デバッガ端末105にエラーメッセージを表示し、オペレータにエラーの発生を通知する。
If all the valid flags in the breakpoint setting table 205 are set to invalid and the factor to be generated next is set, an error message is generated and the error message is displayed on the
次に図4のステップS2に戻って、該ステップS2では、デバッガプログラム202が呼び出され、起動されるが、この詳細な処理内容は、図7に示す第1の実施の形態の処理と同じである。
Next, returning to step S2 in FIG. 4, in step S2, the
ただし、ステップS24において、第2の実施の形態では、ブレークポイント設定テーブル205内のブレークポイント発生条件と、ブレークポイント履歴テーブル206内のプログラムカウンタの値とが全て一致し、かつ、該当するCPU/IDがすべて一致し、かつ、ブレークポイント設定テーブル205内で設定されたブレークポイント発生順序とブレークポイント履歴テーブル206内に記録されたブレークポイント発生順序とが一致した場合に(S24でYES)、ブレークポイント履歴テーブル206の内容を基に、CPU/ID、ブレークポイント発生条件、及びブレーク要因発生時のシステムタイマ値を含むブレークヒットメッセージが生成される(S25)。一方、それらのいずれかの1つでも一致していない場合には、エラーメッセージが生成される(S26)。 However, in step S24, in the second embodiment, the breakpoint occurrence condition in the breakpoint setting table 205 and the value of the program counter in the breakpoint history table 206 all match, and the corresponding CPU / When all the IDs match and the breakpoint occurrence order set in the breakpoint setting table 205 matches the breakpoint occurrence order recorded in the breakpoint history table 206 (YES in S24), a break occurs. Based on the contents of the point history table 206, a break hit message including a CPU / ID, a breakpoint occurrence condition, and a system timer value at the time of occurrence of a break factor is generated (S25). On the other hand, if any one of them does not match, an error message is generated (S26).
上記以外のステップでの処理内容は、第1の実施の形態と同じである。 The processing contents in the steps other than the above are the same as those in the first embodiment.
以上説明したように、第2の実施の形態におけるデバッガプログラム202では、ブレークポイントの設定に関して、ブレークポイント設定テーブルを用いて、複数のCPUにおいてブレークポイント発生条件を個別に設定できるようにし、かつ、ブレークポイントの発生順序を設定できるようにする。そして、それらのブレークポイント発生条件がすべて発生し、かつ、ブレークポイント設定テーブルとブレークポイント履歴テーブルとが発生順序を含めて一致した場合に、デバッグ対象プログラム201を中断し、デバッガプログラム202を呼び出すようにしたので、次のような効果を奏することができる。
As described above, in the
1)ブレーク要因の発生順序を時系列に指定できるため、複数プロセッサの各々で細かな条件を設定でき、デバッグ効率を向上させることが可能である。 1) Since the occurrence order of break factors can be specified in time series, detailed conditions can be set for each of a plurality of processors, and debugging efficiency can be improved.
2)第2の実施の形態でも、ブレークポイント設定テーブル205を、共有メモリ106内に任意個数、設定することができ、したがって、複数個のブレークポイントを設定できる。
2) Also in the second embodiment, an arbitrary number of breakpoint setting tables 205 can be set in the shared
3)第2の実施の形態でも、デバッグ専用の特別なハードウェアを必要とせず、マルチプロセッサシステム101でデバッグ作業を容易に行うことができる。
3) Even in the second embodiment, no special hardware dedicated for debugging is required, and the
4)ある1つのCPUに注目し、そのCPUのみで発生するブレークポイント発生条件を時系列に沿って複数設定し、デバッグすることが可能である。 4) Focusing on a certain CPU, it is possible to set and debug a plurality of breakpoint occurrence conditions that occur only in that CPU in time series.
〔他の実施の形態〕
なお、本発明の目的は、前述した各実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムまたは装置に供給し、そのシステムまたは装置のコンピュータ(またはCPU、MPU等)が記憶媒体に格納されたプログラムコードを読み出して実行することによっても達成される。
[Other Embodiments]
The object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and a computer (or CPU, MPU, etc.) of the system or apparatus. Is also achieved by reading and executing the program code stored in the storage medium.
この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体およびプログラムは本発明を構成することになる。 In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium and program storing the program code constitute the present invention.
また、プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。 The storage medium for supplying the program code is, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW. DVD + RW, magnetic tape, nonvolatile memory card, ROM, etc. can be used.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれる。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. Includes a case where the functions of the above-described embodiments are realized by performing part or all of the actual processing.
更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれる。 Further, after the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. This includes the case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
101 マルチプロセッサシステム
102 メインCPU(プロセッサ)
103a〜103d サブCPU(プロセッサ)
104 デバッガ制御部
105 デバッガ端末
106 共有メモリ
107 メモリコントローラ
108 システムバス
109 制御信号
201 デバッグ対象プログラム
202 デバッガプログラム
203 デバッガインタフェース
204 コマンドインタフェース
205 ブレークポイント設定テーブル
206 ブレークポイント履歴テーブル
207 命令退避領域
208 レジスタ退避領域
101
103a to 103d Sub CPU (processor)
DESCRIPTION OF
Claims (8)
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件が設定されるブレークポイント設定テーブルと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を格納するブレークポイント履歴テーブルと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したか否かを判定する判定手段と、
前記判定手段によって肯定の判定がなされたとき、デバッガプログラムを起動させる起動手段と
を有することを特徴とするマルチプロセッサシステム。 In a multiprocessor system having a plurality of processors,
A breakpoint setting table in which each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program;
A breakpoint history table storing each break factor generated in each processor when the plurality of processors execute the debug target program;
Whether all the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table matches the breakpoint occurrence conditions set in the breakpoint setting table Determining means for determining whether or not;
A multiprocessor system comprising: an activation unit that activates a debugger program when an affirmative determination is made by the determination unit.
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件が時系列に沿って設定されるブレークポイント設定テーブルと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を時系列に沿って格納するブレークポイント履歴テーブルと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが、時系列順序を含めて一致したか否かを判定する判定手段と、
前記判定手段によって肯定の判定がなされたとき、デバッガプログラムを起動させる起動手段と
を有することを特徴とするマルチプロセッサシステム。 In a multiprocessor system having a plurality of processors,
A breakpoint setting table in which each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program is set in time series;
A breakpoint history table for storing each break factor generated in each processor when the plurality of processors execute the debug target program in time series;
All the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table and the breakpoint occurrence conditions set in the breakpoint setting table are time-series. A judging means for judging whether or not they are matched including the order;
A multiprocessor system comprising: an activation unit that activates a debugger program when an affirmative determination is made by the determination unit.
前記デバッガプログラムは前記メインプロセッサによって実行されて、該メインプロセッサ及び前記少なくとも1つのサブプロセッサの実行情報を収集することを特徴とする請求項1または請求項2記載のマルチプロセッサシステム。 The plurality of processors includes a main processor and at least one sub-processor connected to the main processor via a bus and controlled by the main processor,
3. The multiprocessor system according to claim 1, wherein the debugger program is executed by the main processor and collects execution information of the main processor and the at least one sub processor.
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件をブレークポイント設定テーブルに設定する設定ステップと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因をブレークポイント履歴テーブルに格納する格納ステップと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したか否かを判定する判定ステップと、
前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップと
を有することを特徴とするデバッグ方法。 In a debugging method applied to a multiprocessor system having a plurality of processors,
A setting step for setting each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program in a breakpoint setting table;
A storage step of storing each break factor generated in each processor when the plurality of processors execute the debug target program in a breakpoint history table;
Whether all the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table matches the breakpoint occurrence conditions set in the breakpoint setting table A determination step for determining whether or not;
And a starting step of starting a debugger program when an affirmative determination is made in the determining step.
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件を時系列に沿ってブレークポイント設定テーブルに設定する設定ステップと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を時系列に沿ってブレークポイント履歴テーブルに格納する格納ステップと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが、時系列順序を含めて一致したか否かを判定する判定ステップと、
前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップと
を有することを特徴とするデバッグ方法。 In a debugging method applied to a multiprocessor system having a plurality of processors,
A setting step of setting each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program in a breakpoint setting table in time series;
A storage step of storing each break factor generated in each processor when the plurality of processors execute the debug target program in a breakpoint history table in time series,
All the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table and the breakpoint occurrence conditions set in the breakpoint setting table are time-series. A determination step for determining whether or not they are matched including the order; and
And a starting step of starting a debugger program when an affirmative determination is made in the determining step.
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件をブレークポイント設定テーブルに設定する設定ステップと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因をブレークポイント履歴テーブルに格納する格納ステップと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが一致したか否かを判定する判定ステップと、
前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップと
を有することを特徴とするプログラム。 In a program for causing a computer to execute a debugging method applied to a multiprocessor system including a plurality of processors,
A setting step for setting each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program in a breakpoint setting table;
A storage step of storing each break factor generated in each processor when the plurality of processors execute the debug target program in a breakpoint history table;
Whether all the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table matches the breakpoint occurrence conditions set in the breakpoint setting table A determination step for determining whether or not;
And a starting step of starting a debugger program when an affirmative determination is made in the determination step.
デバッグ対象プログラムを複数のプロセッサが実行した場合の前記デバッグ対象プログラムにおける所定のブレークポイントに対応する各プロセッサにおける各ブレークポイント発生条件を時系列に沿ってブレークポイント設定テーブルに設定する設定ステップと、
前記デバッグ対象プログラムを前記複数のプロセッサが実行した場合に各プロセッサで発生した各ブレーク要因を時系列に沿ってブレークポイント履歴テーブルに格納する格納ステップと、
前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件が全て成立し、かつ、前記ブレークポイント履歴テーブルに格納されたブレーク要因と前記ブレークポイント設定テーブルに設定されたブレークポイント発生条件とが、時系列順序を含めて一致したか否かを判定する判定ステップと、
前記判定ステップによって肯定の判定がなされたとき、デバッガプログラムを起動させる起動ステップと
を有することを特徴とするプログラム。 In a program for causing a computer to execute a debugging method applied to a multiprocessor system including a plurality of processors,
A setting step of setting each breakpoint occurrence condition in each processor corresponding to a predetermined breakpoint in the debug target program when a plurality of processors execute the debug target program in a breakpoint setting table in time series;
A storage step of storing each break factor generated in each processor when the plurality of processors execute the debug target program in a breakpoint history table in time series,
All the breakpoint occurrence conditions set in the breakpoint setting table are satisfied, and the break factor stored in the breakpoint history table and the breakpoint occurrence conditions set in the breakpoint setting table are time-series. A determination step for determining whether or not they are matched including the order; and
And a starting step of starting a debugger program when an affirmative determination is made in the determination step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004170291A JP4944368B2 (en) | 2004-06-08 | 2004-06-08 | Multiprocessor system, debugging method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004170291A JP4944368B2 (en) | 2004-06-08 | 2004-06-08 | Multiprocessor system, debugging method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005352591A true JP2005352591A (en) | 2005-12-22 |
JP4944368B2 JP4944368B2 (en) | 2012-05-30 |
Family
ID=35587050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004170291A Expired - Fee Related JP4944368B2 (en) | 2004-06-08 | 2004-06-08 | Multiprocessor system, debugging method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4944368B2 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008117230A (en) * | 2006-11-06 | 2008-05-22 | Sanyo Electric Co Ltd | Program processor and program processing method |
JP2008146148A (en) * | 2006-12-06 | 2008-06-26 | Mitsubishi Electric Corp | Computer system |
JP2009252247A (en) * | 2008-04-07 | 2009-10-29 | Internatl Business Mach Corp <Ibm> | Debugger data processing system, debugging method and computer program |
US8429615B2 (en) | 2007-09-26 | 2013-04-23 | Renesas Electronics Corporation | Semiconductor integrated circuit |
JP2014164378A (en) * | 2013-02-22 | 2014-09-08 | Nec Corp | Parallel debug system, parallel debug method, and parallel debug program |
JP2016532216A (en) * | 2013-09-03 | 2016-10-13 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Method and apparatus for realizing a breakpoint determination unit in an artificial neural system |
US10713147B2 (en) | 2017-03-28 | 2020-07-14 | Fujitsu Limited | Test apparatus and method implementing instruction request command for testing computing machine resources |
-
2004
- 2004-06-08 JP JP2004170291A patent/JP4944368B2/en not_active Expired - Fee Related
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008117230A (en) * | 2006-11-06 | 2008-05-22 | Sanyo Electric Co Ltd | Program processor and program processing method |
US8732443B2 (en) | 2006-11-06 | 2014-05-20 | Semiconductor Components Industries, Llc | Program processing device and program processing method which is able to control writing into an internal memory |
JP2008146148A (en) * | 2006-12-06 | 2008-06-26 | Mitsubishi Electric Corp | Computer system |
US8429615B2 (en) | 2007-09-26 | 2013-04-23 | Renesas Electronics Corporation | Semiconductor integrated circuit |
JP2009252247A (en) * | 2008-04-07 | 2009-10-29 | Internatl Business Mach Corp <Ibm> | Debugger data processing system, debugging method and computer program |
JP2014164378A (en) * | 2013-02-22 | 2014-09-08 | Nec Corp | Parallel debug system, parallel debug method, and parallel debug program |
JP2016532216A (en) * | 2013-09-03 | 2016-10-13 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Method and apparatus for realizing a breakpoint determination unit in an artificial neural system |
US10713147B2 (en) | 2017-03-28 | 2020-07-14 | Fujitsu Limited | Test apparatus and method implementing instruction request command for testing computing machine resources |
Also Published As
Publication number | Publication date |
---|---|
JP4944368B2 (en) | 2012-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4222370B2 (en) | Program for causing a computer to execute a debugging support apparatus and a debugging processing method | |
JP3965142B2 (en) | Method, system and software product for debugging a computer program | |
JP3571976B2 (en) | Debugging apparatus and method, and program recording medium | |
US7945900B2 (en) | Debugging tool for debugging multi-threaded programs | |
CN109726135B (en) | Multi-core debugging method and device and computer readable storage medium | |
KR102025078B1 (en) | Diagnosing code using single step execution | |
JP2010086364A (en) | Information processing device, operation state monitoring device and method | |
JP4944368B2 (en) | Multiprocessor system, debugging method, and program | |
CN111708662A (en) | Debugging method and device | |
JP2004302731A (en) | Information processor and method for trouble diagnosis | |
JP2010102454A (en) | Information processing apparatus and information processing program | |
US8726244B2 (en) | Software breakpoint handling by eliminating instruction replacement and execution under certain conditions | |
JP2008140124A (en) | Data processor | |
JP2017199180A (en) | Image processing device | |
JPH09204205A (en) | Program control system | |
JP2007213396A (en) | Debugging system, operation system, debugging method, and program | |
TW202102998A (en) | Recording method for debug messages of bios in a boot phase and a post-boot operation phase | |
TW201303729A (en) | System and method for setting editions of a BIOS | |
JP2007041887A (en) | Debugging apparatus, its memory access method and program for realizing memory access method | |
JPH08263279A (en) | Method of patch making for virtual machine | |
JP2001147830A (en) | Method for changing state of real time os | |
JPS62113238A (en) | Correction system for program of electronic computer system | |
JPS6146535A (en) | Pseudo error setting control system | |
JPH05324416A (en) | System error history saving system | |
JPS62150440A (en) | Diagnostic system in computer by microprogram control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060418 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070607 |
|
RD05 | Notification of revocation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7425 Effective date: 20070626 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090702 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090714 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090908 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100202 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100330 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100831 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101130 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20101222 |
|
A912 | Removal of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20110128 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120203 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120302 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4944368 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150309 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |