JPH05324393A - Debugging system - Google Patents

Debugging system

Info

Publication number
JPH05324393A
JPH05324393A JP4119379A JP11937992A JPH05324393A JP H05324393 A JPH05324393 A JP H05324393A JP 4119379 A JP4119379 A JP 4119379A JP 11937992 A JP11937992 A JP 11937992A JP H05324393 A JPH05324393 A JP H05324393A
Authority
JP
Japan
Prior art keywords
instruction
breakpoint
shared memory
target program
management 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.)
Withdrawn
Application number
JP4119379A
Other languages
Japanese (ja)
Inventor
Shiyuuichi Hiroya
修一 廣屋
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP4119379A priority Critical patent/JPH05324393A/en
Publication of JPH05324393A publication Critical patent/JPH05324393A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve debugging performance by holding the break point of a debugging object program stored in a shared memory even while a debugging monitor is traveling. CONSTITUTION:Whether or not an instruction to be changed is stored in a break point control table is investigated (PS120) and when it is stored, the corresponding instruction to be replaced stored in the break point control table is changed (PS121). When the instruction is not stored in the break point control table, a shared bus is acquired (PS122), the corresponding instruction of the debugging object program on the shared memory is changed (PS123) and thereafter the occupied shared bus is released (PS124). Then, when the break point is set at a traveling starting address, the shared bus is acquired (PS151) and the instruction to be replaced corresponding to the traveling starting address is acquired from the break point control table to be written in the traveling starting address on the shared memory.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はデバッグ方式に関し、特
に共有メモリ型マルチプロセッサ上で動作するプログラ
ムのデバッグ方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging system, and more particularly to a debugging system for a program operating on a shared memory type multiprocessor.

【0002】[0002]

【従来の技術】プログラムのデバッグを行なうには、そ
のプログラムの進行の適宜の箇所(これをブレークポイ
ントと言い、ブレークポイントの番地をブレークポイン
トアドレスという)に散在する複数の命令に代えて、そ
れぞれブレークポイント命令を挿入してこの命令に到来
したときにプログラムの進行を中断してデバッグモニタ
に制御を移してバグを探索するのが通常である。ブレー
クポイント命令に置換されたデバッグ対象プログラムの
命令を以後被置換命令という。
2. Description of the Related Art In order to debug a program, instead of a plurality of instructions scattered at appropriate points in the progress of the program (this is called a breakpoint and the address of the breakpoint is called a breakpoint address), It is usual to insert a breakpoint instruction and interrupt the progress of the program when the instruction is reached and transfer control to the debug monitor to search for a bug. The instruction of the program to be debugged, which is replaced by the breakpoint instruction, is hereinafter referred to as the replaced instruction.

【0003】ブレークポイントの管理にはブレークポイ
ント管理テーブルが使用され、これには、それぞれのブ
レークポイント固有の識別子とそれに対応するブレーク
ポイントアドレス、被置換命令が格納されている。
A breakpoint management table is used to manage the breakpoints, which stores the unique identifiers of the respective breakpoints, the corresponding breakpoint addresses, and the instructions to be replaced.

【0004】従来の、共有メモリ型マルチプロセッサ上
で動作するプログラムのデバッグ方式は、シングルプロ
セッサ用デバッグモニタの拡張として実現されてきた。
この拡張方法について説明する前に、まず、図2を用い
て、従来から広く利用されてきたシングルプロセッサ用
デバッグモニタの構成方法について説明する。
A conventional debugging method for a program operating on a shared memory type multiprocessor has been realized as an extension of a debug monitor for a single processor.
Before describing the extension method, first, a method of configuring a debug monitor for a single processor, which has been widely used in the past, will be described with reference to FIG.

【0005】プログラムステップ(以下PSと呼ぶ)1
60がデバッグ対象プログラムで、それ以外のPSがデ
バッグモニタである。PS160からPS100へは通
常デバッグ対象プログラムに配置されたブレークポイン
ト命令が実行された時に遷移する。
Program step (hereinafter referred to as PS) 1
Reference numeral 60 is a debug target program, and PS other than that is a debug monitor. A transition is made from PS160 to PS100 when a breakpoint instruction normally arranged in the debug target program is executed.

【0006】PS100とPS102とはデバッグモニ
タがデバッグ対象プログラムで利用しているレジスタの
内容を破壊しないようにするためのものである。
PS 100 and PS 102 are for preventing the contents of the registers used by the debug monitor in the debug target program from being destroyed.

【0007】PS200では、デバッグ対象プログラム
内にあるブレークポイント命令をブレークポイント管理
テーブル内にある対応する被置換命令で置換する。これ
により、命令参照/命令変更コマンドは、デバッグ対象
プログラムを格納しているメモリへの単純な参照/変更
により実現できる(PS210、PS220)。また、
ブレークポイントの設定/削除コマンドは、ブレークポ
イント管理テーブルに対する追加/削除のみとなる(P
S230、PS240)。
In the PS200, the breakpoint instruction in the program to be debugged is replaced with the corresponding replaced instruction in the breakpoint management table. As a result, the instruction reference / instruction change command can be realized by simple reference / change to the memory storing the debug target program (PS210, PS220). Also,
Breakpoint setting / deletion commands can only be added / deleted in the breakpoint management table (P
S230, PS240).

【0008】デバッグ対象プログラムへのブレークポイ
ント命令の埋め込みは、デバッグ対象プログラムの走行
開始直前にまとめて行なう(PS251)。
The embedding of the breakpoint instruction in the debug target program is collectively performed immediately before the running of the debug target program (PS251).

【0009】デバッグ対象プログラムの実行コマンドで
は、まず開始アドレスにおいてシングルステップ(PS
250)を行なった後に、ブレークポイント管理テーブ
ルを参照してブレークポイントアドレスに存在する命
令、すなわち被置換命令をブレークポイント管理テーブ
ルに退避させ、この代りにブレークポイント命令をそこ
に埋め込み(PS251)、レジスタの内容をデバッグ
対象プログラムのものに復帰させて(PS102)、デ
バッグ対象プログラムへ制御を移す(PS160)。
In the execution command of the program to be debugged, first a single step (PS
250), the instruction existing at the breakpoint address, that is, the replaced instruction is saved in the breakpoint management table by referring to the breakpoint management table, and the breakpoint instruction is embedded therein instead (PS251), The contents of the register are restored to those of the debug target program (PS102), and control is transferred to the debug target program (PS160).

【0010】図2では5つのコマンドをPS101で切
り分けて実行しているが、この他にレジスタの参照/変
更などいくつかのデバッグコマンドが存在してもよい。
In FIG. 2, five commands are separated by the PS 101 and executed, but some debug commands such as register reference / change may exist.

【0011】上記のシングルプロセッサ用デバッグモニ
タを拡張して共有メモリ型マルチプロセッサ用デバッグ
モニタを構成するには、従来、下記の2つの方法があっ
た。
Conventionally, there have been the following two methods for expanding the debug monitor for a single processor to configure a debug monitor for a shared memory type multiprocessor.

【0012】1. PS100の直後にデバッグモニタ
走行権獲得関数を、また、PS102の直前にデバッグ
モニタ走行権開放関数を挿入することにより、デバッグ
モニタ本体部分の走行をプロセッサ間で排他制御する。
1. By inserting a debug monitor running right acquisition function immediately after PS100 and a debug monitor running right release function immediately before PS102, the running of the debug monitor main body is exclusively controlled between the processors.

【0013】2. PS100の直後に、自プロセッサ
以外の全プロセッサへデバッグ対象プログラムの走行停
止要求を行なう。全デバッグ対象プログラムの停止を確
認した後に、デバッグモニタの本体部分を自プロセッサ
のみで実行する。PS102の直前で、自プロセッサ以
外の全プロセッサへデバッグ対象プログラムの走行開始
要求を行なう。
2. Immediately after PS100, a request to stop running the debug target program is issued to all processors other than the own processor. After confirming that all the debuggee programs are stopped, execute the main part of the debug monitor only with the local processor. Immediately before the PS 102, a running start request of the debug target program is issued to all processors other than the own processor.

【0014】上記の方法であれば、シングルプロセッサ
用デバッグモニタ本体部分を改造することなく、容易に
共有メモリ型マルチプロセッサ用デバッグモニタを実現
することができた。
According to the above method, the debug monitor for the shared memory type multiprocessor could be easily realized without modifying the main body of the debug monitor for the single processor.

【0015】[0015]

【発明が解決しようとする課題】上述した従来のデバッ
グ方式の1.では、デバッグモニタ走行中に図2のPS
200により共有メモリに格納されているデバッグ対象
プログラムの各ブレークポント命令は被置換命令に置換
されているためにデバッグ対象プログラムにはブレーク
ポイント命令は存在しなくなっており、デバッグモニタ
を走行しているプロセッサが存在する場合には、デバッ
グ対象プログラムを走行させている他のプロセッサに対
してデバッグ対象プログラムをブレークポイント無しの
状態で走行さすことになり、共有メモリ型マルチプロセ
ッサ上でブレークポイントでデバッグ対象プログラムを
中断してバグを調査するというデバッグ本来の目的を達
成することはできないという欠点があった。
SUMMARY OF THE INVENTION 1. The conventional debug method described above. Then, while running the debug monitor, PS of Figure 2
Since each break point instruction of the debug target program stored in the shared memory by 200 is replaced by the replaced instruction, the breakpoint target instruction does not exist in the debug target program, and the program is running in the debug monitor. If there is a processor, the debug target program is run without breakpoints to other processors running the debug target program, and the debug target program is debugged at the breakpoint on the shared memory multiprocessor. There was a drawback that the original purpose of debugging, that is, interrupting the program and investigating the bug, could not be achieved.

【0016】また、上述した従来のデバッグ方式の2.
では、強制的に全デバッグ対象プログラムが停止させら
れるため、デバッグモニタに入ったデバッグ対象プログ
ラム以外が実時間で動作しなければバグが再現さないよ
うな場合には、デバッグができないという欠点があっ
た。
In addition, the above-mentioned conventional debug method 2.
However, since all the debug target programs are forcibly stopped, there is a drawback that you cannot debug if the bug cannot be reproduced unless the debug target program entered in the debug monitor operates in real time. It was

【0017】本発明の目的は、デバッグモニタ走行中で
も共有メモリに格納されているデバッグ対象プログラム
のブレークポイントを保持することにより共有メモリ型
マルチプロセッサ上でもデバッグ性能を格段に向上でき
るデバッグ方式を提供することにある。
An object of the present invention is to provide a debugging method capable of remarkably improving the debugging performance even on a shared memory multiprocessor by holding a breakpoint of a program to be debugged stored in the shared memory even while the debug monitor is running. Especially.

【0018】[0018]

【課題を解決するための手段】本発明のデバッグ方式
は、共有メモリ型マルチプロセッサ上で動作するプログ
ラムのデバッグ方式において、前記デバッグ対象プログ
ラムに設定する各ブレークポイントの固有の識別子とそ
の設定位置を示すブレークポイントアドレスと前記ブレ
ークポイントアドレスにありブレークポイトン命令によ
り置換された前記デバッグ対象プログラムの命令である
被置換命令とを格納するブレークポイント管理テーブル
を設け、ブレークポイント設定コマンドの入力に応じて
指定されたブレークポイントアドレスにある前記共有メ
モリ上の前記デバッグ対象プログラムの命令をこのブレ
ークポイントアドレスとともに前記ブレークポイント管
理テーブルへ格納するとともにこれに代えて前記デバッ
グ対象プログラムにブレークポイント命令を書込み、ブ
レークポイント削除コマンドの入力に応じて前記ブレー
クポイント管理テーブルを参照し指定されたブレークポ
イント識別子に対応するブレークポイントアドレスに被
置換命令を復帰させその後対応するブレークポイント情
報を前記ブレークポイント管理テーブルから削除し、命
令参照コマンドの入力に応じて前記共有メモリに格納さ
れている前記デバッグ対象プログラムの命令の参照と前
記ブレークポイント管理テーブルに格納されている被置
換命令の参照とのいずれかを行ない、命令変更コマンド
の入力に応じて変更すべき命令が前記ブレークポイント
管理テーブルにあるときには対応する被置換命令の変更
を行ない前記ブレークポイント管理テーブルにないとき
には前記命令変更コマンドが入力されたプロセッサで前
記共有メモリの独占的利用を開始して前記共有メモリに
格納されている前記デバッグ対象プログラムの対応する
命令の変更を行ないその後このプロセッサによる前記共
有メモリの独占的利用を終了し、前記デバッグ対象プロ
グラムの実行コマンドの入力に応じて前記デバッグ対象
プログラムの走行開始アドレスにブレークポイント命令
が設定されていない場合には前記走行開始アドレスから
走行を行ない、前記デバッグ対象プログラムの実行コマ
ンドの入力に応じて前記デバッグ対象プログラムの走行
開始アドレスにブレークポイント命令が設定されている
場合には前記実行コマンドが入力されたプロセッサで前
記共有メモリの独占的利用を開始して前記ブレークポイ
ント管理テーブルを参照して前記走行開始アドレスに対
応する被置換命令を前記共有メモリ上の走行開始アドレ
スへ書込み前記デバッグ対象プログラムを前記走行開始
アドレスにおいてシングルステップさせ再度ブレークポ
イント命令を前記共有メモリ上の前記走行開始アドレス
の場所へ書込みその後このプロセッサによる前記共有メ
モリの独占的利用を終了し前記シングルステップ直後の
アドレスから前記デバッグ対象プログラムを走行開始さ
せることを特徴としている。
According to a debugging method of the present invention, in the debugging method of a program operating on a shared memory type multiprocessor, a unique identifier of each breakpoint set in the program to be debugged and its setting position are set. A breakpoint management table for storing the indicated breakpoint address and the replaced instruction which is the instruction of the debug target program which is replaced by the break point instruction at the breakpoint address and which is specified according to the input of the breakpoint setting command The instruction of the debug target program on the shared memory at the specified breakpoint address is stored in the breakpoint management table together with the breakpoint address, and the instruction is stored in the debug target program instead. The breakpoint instruction is written, the breakpoint management table is referred to in response to the input of the breakpoint deletion command, the replaced instruction is returned to the breakpoint address corresponding to the specified breakpoint identifier, and then the corresponding breakpoint information is written. Of the instruction of the debug target program which is deleted from the breakpoint management table and is stored in the shared memory in response to the input of the instruction reference command and the reference of the replaced instruction which is stored in the breakpoint management table. If any of the instructions is changed and the instruction to be changed in response to the input of the instruction change command is in the breakpoint management table, the corresponding replaced instruction is changed, and if it is not in the breakpoint management table, the instruction change command is input. The processor starts the exclusive use of the shared memory, changes the corresponding instruction of the debug target program stored in the shared memory, and thereafter ends the exclusive use of the shared memory by the processor, and the debug When a break point instruction is not set in the running start address of the debug target program in response to the input of the execution command of the target program, the program starts running from the running start address and responds to the input of the execution command of the debug target program. If a breakpoint instruction is set at the running start address of the debug target program, the processor to which the execution command is input starts exclusive use of the shared memory and refers to the breakpoint management table. Corresponds to the start address Write the replaced instruction to the running start address on the shared memory, single step the debug target program at the running start address, and write the breakpoint instruction again to the location of the running start address on the shared memory. The exclusive use of the shared memory is terminated, and the debug target program is started to run from the address immediately after the single step.

【0019】[0019]

【作用】本発明においては、デバッグモニタ走行中にも
ブレークポンイント命令を共有メモリ上にあるデバッグ
対象プログラムから引き抜かないことにより、デバッグ
モニタ走行中のプロセッサが存在しても、プレークポイ
ントが無視されることがないようにしている。ただし、
デバッグ対象プログラム走行開始直前のシングルステッ
プ動作においては、一時的に共有メモリ上にあるデバッ
グ対象プログラムに被置換命令を復帰させる必要の生ず
る場合があるため、そのときにはデバッグモニタを走行
させるプロセッサに共有メモリを独占させたままで、ブ
レークポイント命令と被置換命令の置換およびシングル
ステップ動作を行なわせ、この操作中に他のプロセッサ
がブレークポイントを無視することがないようにしてい
る。また、命令が計算機の語長より長い場合を考慮して
命令変更コマンドの実行に際しては、共有メモリ上の命
令を変更するときには、共有メモリを独占使用させ命令
変更時の誤動作を防止している。
According to the present invention, the break point instruction is not extracted from the program to be debugged in the shared memory even while the debug monitor is running, so that the break point is ignored even if there is a processor running the debug monitor. I am trying not to However,
In the single-step operation immediately before the debug target program starts running, it may be necessary to temporarily restore the replaced instruction to the debug target program in the shared memory. While the instruction is being monopolized, the breakpoint instruction and the replaced instruction are replaced and the single step operation is performed so that another processor does not ignore the breakpoint during this operation. Further, when the instruction change command is executed in consideration of the case where the instruction is longer than the word length of the computer, when the instruction on the shared memory is changed, the shared memory is exclusively used to prevent a malfunction when the instruction is changed.

【0020】シングルプロセッサ用デバッグモニタにお
いては、デバッグ対象プログラムが停止している時には
必ずメモリ上にあるデバッグ対象プログラムに命令の原
本が存在したが、本発明のマルチプロセッサ用デバッグ
モニタにおいては、命令の原本が共有メモリのデバッグ
対象プログラムとブレークポイント管理テーブルとの2
つに存在するため、命令参照コマンドおよび命令変更コ
マンドの実行に際してはこれに対応できるようにしてい
る。
In the debug monitor for a single processor, the original instruction is always present in the debug target program on the memory when the debug target program is stopped. However, in the multiprocessor debug monitor of the present invention, the instruction The original is a shared memory debug target program and a breakpoint management table.
Therefore, when executing the instruction reference command and the instruction change command, it is possible to deal with this.

【0021】シングルプロセッサ用デバッグモニタにお
いては、プレークポイント命令と被置換命令の置換をデ
バッグ対象プログラムの停止時および実行開始時にまと
めて行なっていたが、本発明のマルチプロセッサ用デバ
ッグモニタにおいては、これをブレークポイント設定コ
マンドおよびブレークポイント削除コマンドの実行時に
行なっている。
In the debug monitor for a single processor, the replacement of the break point instruction and the replaced instruction is performed collectively at the time of stopping and starting the execution of the program to be debugged. Is executed when the breakpoint setting command and the breakpoint deletion command are executed.

【0022】[0022]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0023】図1は本発明のデバッグ方式の一実施例を
示す流れ図である。
FIG. 1 is a flow chart showing an embodiment of the debugging method of the present invention.

【0024】本実施例のデバッグ方式は、共有バス/共
有メモリ型マルチプロセッサを想定したものであり、特
定プロセッサによる独占的な共有メモリの利用を特定プ
ロセッサによる継続的な共有バス獲得により実現してい
る。また、ブレークポイント命令は計算機の語長以下と
している。
The debug system of the present embodiment assumes a shared bus / shared memory type multiprocessor, and realizes exclusive use of the shared memory by the specific processor by continuously acquiring the shared bus by the specific processor. There is. In addition, the break point instruction is less than or equal to the word length of the computer.

【0025】ブレークポイント設定コマンドの実行は、
まず、コマンドで指定されたブレークポイントアドレス
が指す共有メモリ上にあるデバッグ対象プログラムの命
令を、ブレークポイントアドレスとともにブレークポイ
ント管理テーブルへ格納し(PS130)、次に、ブレ
ークイントアドレスが指す共有メモリ上の場所へブレー
クポイント命令を書込む(PS131)。
Execution of the breakpoint setting command
First, the instruction of the program to be debugged in the shared memory pointed to by the breakpoint address specified by the command is stored in the breakpoint management table together with the breakpoint address (PS130), and then in the shared memory pointed to by the breakpoint address. Write a breakpoint instruction to the location (PS131).

【0026】ブレークポイント削除コマンドの実行は、
まず、コマンドで指定されたブレークポイント識別子
で、ブレークポイント管理テーブルを検索することによ
り、ブレークポイントアドレスと被置換命令を獲得する
(PS140)。次に、この被置換命令を、ブレークポ
イントアドレスが指す共有メモリ上の場所へ復帰させる
(PS141)。その後、ブレークポイント識別子に対
応するブレークポイント情報をブレークポイント管理テ
ーブルから削除する(PS142)。
Execution of the breakpoint deletion command
First, the breakpoint address and the replaced instruction are acquired by searching the breakpoint management table with the breakpoint identifier specified by the command (PS140). Next, the replaced instruction is returned to the location on the shared memory pointed to by the breakpoint address (PS141). After that, the breakpoint information corresponding to the breakpoint identifier is deleted from the breakpoint management table (PS142).

【0027】命令参照コマンドの実行には、まず、参照
すべき命令がブレークポイント管理テーブルに格納され
ているかどうかを調べる(PS110)。ブレークポイ
ント管理テーブルに格納されているときには(PS11
0のYES 枝)、ブレークポイント管理テーブルに格納さ
れている対応する被置換命令を参照する(PS11
1)。ブレークポイント管理テーブルに格納されていな
いときには(PS110のNO枝)、共有メモリ上にある
デバッグ対象プログラムの対応する命令を参照する(P
S112)。
To execute the instruction reference command, it is first checked whether the instruction to be referred to is stored in the breakpoint management table (PS110). When it is stored in the breakpoint management table (PS11
(YES branch of 0), refer to the corresponding replaced instruction stored in the breakpoint management table (PS11
1). When it is not stored in the breakpoint management table (NO branch of PS110), the corresponding instruction of the debug target program in the shared memory is referenced (P
S112).

【0028】命令変更コマンドの実行に際しては、命令
が計算機の語長より長い場合を考慮して命令変更時の誤
動作を防止するため、共有メモリを独占使用させる。先
ず、変更すべき命令がブレークポイント管理テーブルに
格納されているかどうかを調べる(PS120)。ブレ
ークポイント管理テーブルに格納されているときには
(PS120のYES 枝)、ブレークポイント管理テーブ
ルに格納されている対応する被置換命令を変更する(P
S121)。ブレークポイント管理テーブルに格納され
ていないときには(PS120のNO枝) 、PS122で
共有バスを獲得して、共有メモリ上にあるデバッグ対象
プログラムの対応する命令を変更し(PS123)、そ
の後占有していた共有バスを解放する(PS124)。
In executing the instruction change command, the shared memory is exclusively used in order to prevent a malfunction when changing the instruction in consideration of the case where the instruction is longer than the word length of the computer. First, it is checked whether the instruction to be changed is stored in the breakpoint management table (PS120). When stored in the breakpoint management table (YES branch of PS120), the corresponding replaced instruction stored in the breakpoint management table is changed (P
S121). When it is not stored in the break point management table (NO branch of PS120), the shared bus is acquired by PS122, the corresponding instruction of the debug target program on the shared memory is changed (PS123), and then occupied. The shared bus is released (PS124).

【0029】デバッグ対象プログラムの実行コマンドで
は、まず最初に走行開始アドレスにブレークポイントが
設定されているがどうかをブレークポイント管理テーブ
ルを利用して調べる(PS150)。
In the execution command of the program to be debugged, first, whether or not a break point is set at the running start address is checked using the break point management table (PS150).

【0030】その結果、設定されていないことが判明し
た場合には、即座にデバッグ対象プログラムのレジスタ
値を復帰させて(PS102)、制御をデバッグ対象プ
ログラムへ移す。
As a result, when it is determined that the debug target program is not set, the register value of the debug target program is immediately restored (PS102), and the control is transferred to the debug target program.

【0031】走行開始アドレスにブレークポイントが設
定されている場合には、先ず、共有バスを獲得して(P
S151)、ブレークポイント管理テーブルから走行開
始アドレスに対応した被置換命令を獲得し、これを共有
メモリ上の走行開始アドレスへ書込み(PS152)、
デバッグ対象プログラムを走行開始アドレスにおいてシ
ングルステップさせ(PS153)、再度ブレークポイ
ント命令を共有メモリ上の走行開始アドレスの場所へ書
込み(PS154)、その後、共有バスを解放する(P
S155)。そして、レジスタの内容を復帰させて(P
S102)、シングルステップ直後のアドレスからデバ
ッグ対象プログラムを走行開始させる。
When a break point is set at the running start address, the shared bus is first acquired (P
S151), The replaced instruction corresponding to the running start address is acquired from the breakpoint management table, and this is written to the running start address on the shared memory (PS152).
The debug target program is single-stepped at the run start address (PS153), the breakpoint instruction is written again to the place of the run start address on the shared memory (PS154), and then the shared bus is released (P
S155). Then, restore the contents of the register (P
S102), the debug target program is started to run from the address immediately after the single step.

【0032】シングルステップの直前にはレジスタ内容
の復帰、直後にはレジスタ内容の退避動作があるが説明
は省略してある。
Although the register contents are restored immediately before the single step and the register contents are saved immediately after the single step, the description thereof is omitted.

【0033】また命令参照/変更コマンド処理に際して
は、バッフアメモリを使用して複数の命令を一括して処
理し処理効率を向上することができる。
In processing the instruction reference / modification command, a plurality of instructions can be collectively processed by using the buffer memory to improve the processing efficiency.

【0034】命令変更コマンドの処理に際しては、処理
に先立ち、先ず、共有バスを獲得してから処理を行な
い、処理終了後、共有バスを開放してもよい。
In processing the instruction change command, the shared bus may be acquired first before the processing, and the shared bus may be released after the processing is completed.

【0035】[0035]

【発明の効果】以上説明したように、本発明のデバッグ
方式は、デバッグモニタ走行中でも共有メモリに格納さ
れているデバッグ対象プログラムのブレークポイントを
保持することにより共有メモリ型マルチプロセッサ上で
もデバッグ性能を格段に向上できるという効果を有す
る。
As described above, according to the debugging method of the present invention, the debug performance is maintained even on the shared memory type multiprocessor by holding the breakpoint of the program to be debugged stored in the shared memory while the debug monitor is running. It has an effect that it can be remarkably improved.

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

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

【図2】従来のデバッグ方式の例を示す流れ図である。FIG. 2 is a flowchart showing an example of a conventional debugging method.

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

PS100〜102、110〜112、120〜12
4、130〜131、140〜141、150〜15
5、160、210、220、230、240、25
0、251 流れ図のステッブ
PS100-102, 110-112, 120-12
4, 130-131, 140-141, 150-15
5, 160, 210, 220, 230, 240, 25
0,251 Flow chart step

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 共有メモリ型マルチプロセッサ上で動作
するプログラムのデバッグ方式において、前記デバッグ
対象プログラムに設定する各ブレークポイントの固有の
識別子とその設定位置を示すブレークポイントアドレス
と前記ブレークポイントアドレスにありブレークポイト
ン命令により置換された前記デバッグ対象プログラムの
命令である被置換命令とを格納するブレークポイント管
理テーブルを設け、ブレークポイント設定コマンドの入
力に応じて指定されたブレークポイントアドレスにある
前記共有メモリ上の前記デバッグ対象プログラムの命令
をこのブレークポイントアドレスとともに前記ブレーク
ポイント管理テーブルへ格納するとともにこれに代えて
前記デバッグ対象プログラムにブレークポイント命令を
書込み、ブレークポイント削除コマンドの入力に応じて
前記ブレークポイント管理テーブルを参照し指定された
ブレークポイント識別子に対応するブレークポイントア
ドレスに被置換命令を復帰させその後対応するブレーク
ポイント情報を前記ブレークポイント管理テーブルから
削除し、命令参照コマンドの入力に応じて前記共有メモ
リに格納されている前記デバッグ対象プログラムの命令
の参照と前記ブレークポイント管理テーブルに格納され
ている被置換命令の参照とのいずれかを行ない、命令変
更コマンドの入力に応じて変更すべき命令が前記ブレー
クポイント管理テーブルにあるときには対応する被置換
命令の変更を行ない前記ブレークポイント管理テーブル
にないときには前記命令変更コマンドが入力されたプロ
セッサで前記共有メモリの独占的利用を開始して前記共
有メモリに格納されている前記デバッグ対象プログラム
の対応する命令の変更を行ないその後このプロセッサに
よる前記共有メモリの独占的利用を終了し、前記デバッ
グ対象プログラムの実行コマンドの入力に応じて前記デ
バッグ対象プログラムの走行開始アドレスにブレークポ
イント命令が設定されていない場合には前記走行開始ア
ドレスから走行を行ない、前記デバッグ対象プログラム
の実行コマンドの入力に応じて前記デバッグ対象プログ
ラムの走行開始アドレスにブレークポイント命令が設定
されている場合には前記実行コマンドが入力されたプロ
セッサで前記共有メモリの独占的利用を開始して前記ブ
レークポイント管理テーブルを参照して前記走行開始ア
ドレスに対応する被置換命令を前記共有メモリ上の走行
開始アドレスへ書込み前記デバッグ対象プログラムを前
記走行開始アドレスにおいてシングルステップさせ再度
ブレークポイント命令を前記共有メモリ上の前記走行開
始アドレスの場所へ書込みその後このプロセッサによる
前記共有メモリの独占的利用を終了し前記シングルステ
ップ直後のアドレスから前記デバッグ対象プログラムを
走行開始させることを特徴とするデバッグ方式。
1. In a debugging method of a program operating on a shared memory multiprocessor, a unique identifier of each breakpoint set in the debug target program and a breakpoint address indicating the setting position and the breakpoint address are present. A breakpoint management table is provided for storing a replaced instruction which is an instruction of the debug target program replaced by a break point instruction, and is on the shared memory at a breakpoint address specified according to an input of a breakpoint setting command. The instruction of the program to be debugged is stored in the breakpoint management table together with the breakpoint address, and instead, a breakpoint instruction is written to the program to be debugged to In response to the input of the delete command, the breakpoint management table is referenced, the replaced instruction is returned to the breakpoint address corresponding to the specified breakpoint identifier, and then the corresponding breakpoint information is deleted from the breakpoint management table. Changing the instruction by referring to the instruction of the debug target program stored in the shared memory or the replaced instruction stored in the breakpoint management table in response to an instruction reference command input. When the instruction to be changed in response to the input of the command is in the breakpoint management table, the corresponding replaced instruction is changed, and when it is not in the breakpoint management table, the processor in which the instruction change command is input changes the shared memory Exclusive use Start and change the corresponding instruction of the debug target program stored in the shared memory, then end the exclusive use of the shared memory by this processor, and in response to the input of the execution command of the debug target program. When no breakpoint instruction is set in the run start address of the debug target program, the program starts running from the run start address, and the run start address of the debug target program is set according to the input of the execution command of the debug target program. When a break point instruction is set, the processor to which the execution command is input starts exclusive use of the shared memory and refers to the break point management table to replace the replaced instruction corresponding to the running start address. Run on the shared memory Write to the start address, single-step the debug target program at the run start address, write a breakpoint instruction again to the location of the run start address on the shared memory, and then end the exclusive use of the shared memory by the processor A debugging method characterized in that the program to be debugged is started from the address immediately after a single step.
JP4119379A 1992-05-13 1992-05-13 Debugging system Withdrawn JPH05324393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4119379A JPH05324393A (en) 1992-05-13 1992-05-13 Debugging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4119379A JPH05324393A (en) 1992-05-13 1992-05-13 Debugging system

Publications (1)

Publication Number Publication Date
JPH05324393A true JPH05324393A (en) 1993-12-07

Family

ID=14760058

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4119379A Withdrawn JPH05324393A (en) 1992-05-13 1992-05-13 Debugging system

Country Status (1)

Country Link
JP (1) JPH05324393A (en)

Similar Documents

Publication Publication Date Title
US5870607A (en) Method and apparatus for selective replay of computer programs
JP4476193B2 (en) Information processing method and information processing apparatus
US7010725B2 (en) Method and apparatus for getting dump of a computer system
JPS62221732A (en) Register saving and recovery system
JPH0810437B2 (en) Guest execution control method for virtual machine system
JPH10214203A (en) Information processor
JP2922723B2 (en) Information processing device
JPH05324393A (en) Debugging system
JPH0789328B2 (en) Data processing device
US20080133838A1 (en) Data processing device
US5813039A (en) Guest execution control system, method and computer process for a virtual machine system
JP2653412B2 (en) How to set breakpoints
JP2671160B2 (en) Exception handling method
JPS61184643A (en) Starting control system for virtual computer
JP3130798B2 (en) Bus transfer device
JPS62125437A (en) Control method for additional processor
JPH0391055A (en) Method for setting hardware lock, hardware lock controller, method and device for detecting hardware lock
JPS63157238A (en) Computer
JP2001166966A (en) Method for managing execution environment of program to be tested in debugger
JP2718028B2 (en) How to access the program test file
JPH0150936B2 (en)
JPH0727477B2 (en) Instruction replacement method
JPS6214240A (en) Program inspecting system
JPS59189452A (en) Queue structure for data processor
JPH0772874B2 (en) Interrupt receiving device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990803