JPH04145544A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPH04145544A
JPH04145544A JP2268905A JP26890590A JPH04145544A JP H04145544 A JPH04145544 A JP H04145544A JP 2268905 A JP2268905 A JP 2268905A JP 26890590 A JP26890590 A JP 26890590A JP H04145544 A JPH04145544 A JP H04145544A
Authority
JP
Japan
Prior art keywords
thread
address
debugging
identifier
broken
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
JP2268905A
Other languages
Japanese (ja)
Inventor
Koichi Nakamoto
幸一 中本
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 JP2268905A priority Critical patent/JPH04145544A/en
Publication of JPH04145544A publication Critical patent/JPH04145544A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To make independent break points settable at every thread so as to improve the efficiency of the debugging work of a debugging device by providing the identifier to the thread being executed at a real machine. CONSTITUTION:A thread identifier to be broken and address are inputted from a keyboard 13 and a break point discrimination circuit 17 is selected on the basis of the thread identifier. After selection, a break point address is set in the circuit 17. When thread switching operations occur during the execution of a real machine 2, the identifier of the thread to be executed next is set in a register 18 and the break point discrimination circuit 17 corresponding to the thread is selected through a decoder 19. The break point of the thread is discriminated by means of the selected circuit 17. Therefore, the need of discriminating whether or not a broken thread is an aimed thread to be made whenever the execution is broken at break points is eliminated and the efficiency of the debugging work of this debugging device is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデバッグ装置に関し、特に同一アドレス空間で
複数のスレッドが実行される場合にスレッド毎に独立し
たブレークポイントを設定するデパック装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a debugging device, and particularly to a depacking device that sets independent breakpoints for each thread when a plurality of threads are executed in the same address space.

〔従来の技術〕[Conventional technology]

従来、実機に接続してデバッグを行なうためのデバッグ
装置において、実機の実行を停止させるため、該実機の
アドレス信号及びコントロール信号からブレークすべき
アドレスか否かを判定するブレークポイント判定回路と
して、該実機のアドレス信号及びコントロール信号から
求められた命令フェッチアドレスと該デバッグ装置自身
に設定されたブレークポイントアドレスとを比較して判
定する方法と前記命令フェッチアドレスに対応する該デ
バッグ装置内にあるセレクトマツプメモリの出力により
判定する方法とがあった。
Conventionally, in a debugging device connected to an actual device for debugging, a breakpoint determination circuit is used to determine whether or not an address at which a break should be made is reached based on the address signal and control signal of the actual device in order to stop the execution of the actual device. A method for comparing and determining an instruction fetch address obtained from an address signal and a control signal of an actual machine with a breakpoint address set in the debug device itself, and a select map in the debug device corresponding to the instruction fetch address. There is a method of determining based on memory output.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の方法では、同一アドレス空間を走行する
スレッドをデバッグする場合、デバッグ装置内にはデバ
ッグ対象となるスレッドのブレークポイントがすべて設
定されており、実機のアドレスバス上に命令フェッチア
ドレスとしてブレークポイントが現れる毎に実行ブレー
ク動作が生しることになり、目的のスレッドの目的のア
ドレスに対してのみブレークポイントが設定できないと
いう問題があった。
In the conventional method described above, when debugging threads running in the same address space, all breakpoints for the threads to be debugged are set in the debugging device, and the breakpoints are set as instruction fetch addresses on the address bus of the actual machine. An execution break operation occurs every time a point appears, and there is a problem in that a breakpoint cannot be set only at the target address of the target thread.

このため操作者は、実機において実行がブレークしたス
レッドが目的とするスレッドか否かを判断し、目的とす
るプログラムであればデバッグ操作を行っており、デバ
ッグ時の作業能率が悪いという欠点があった。
Therefore, the operator has to judge whether the thread whose execution has broken on the actual machine is the target thread or not, and if it is the target program, debug it, which has the disadvantage of poor work efficiency during debugging. Ta.

本発明はこのような従来の欠点を解決したもので、その
目的は同一アドレス空間を走行するスレッドにおいても
スレッド毎に独立したブレークポイントを設定すること
ができるようにして、デバッグ作業の能率を高めること
にある。
The present invention solves these conventional drawbacks, and its purpose is to improve the efficiency of debugging by making it possible to set independent breakpoints for each thread even in threads running in the same address space. There is a particular thing.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のデバッグ装置は、プロセッサと前記プロセッサ
の制御プログラムを記憶したプログラムメモリを具備す
る実機のシステムバスもしくは前記プロセッサのリード
端子からアドレス信号、データ信号およびコントロール
信号を取り出してプログラムデバッグを行なうデバッグ
装置であって、前記実機で実行中のスレッドの識別子を
蓄積する手段と、前記実機で実行中のアドレス信号及び
コントロール信号からブレークすべきアドレスか否かを
判定するブレークポイント判定回路と、前記ブレークポ
イント判定回路をスタックポインタの値により選択する
回路とを具備し、スレッドに独立したブレーク動作を行
なうようにして構成される。
A debugging device of the present invention is a debugging device that performs program debugging by extracting address signals, data signals, and control signals from a system bus of an actual machine or a read terminal of the processor, which is equipped with a processor and a program memory storing a control program for the processor. means for accumulating identifiers of threads being executed on the actual device; a breakpoint determination circuit that determines whether an address should be broken from an address signal and a control signal that are being executed on the actual device; and the breakpoint. The CPU 11 includes a circuit for selecting a determination circuit based on the value of a stack pointer, and is configured to perform a thread-independent break operation.

〔実施例〕〔Example〕

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

第1図は本発明によるデバッグ装置の一実施例のブロッ
ク図であり、デバッグ装置1と実機2で構成されている
FIG. 1 is a block diagram of an embodiment of a debugging device according to the present invention, and is composed of a debugging device 1 and an actual device 2. In FIG.

デバッグ装置1は、プロセッサ10、メモリ11、デイ
スプレイエ2、キーボード13、ブレークポイント判定
回路17、実行中のスレッドの識別子を蓄積するレジス
タ18、レジスタ18の出力をデコードしブレークポイ
ント判定回路17を選択するためのデコーダ19を具備
する。
The debug device 1 includes a processor 10 , a memory 11 , a display 2 , a keyboard 13 , a breakpoint determination circuit 17 , a register 18 that stores the identifier of the thread being executed, and the output of the register 18 is decoded and the breakpoint determination circuit 17 is selected. A decoder 19 is provided for

実機2は、プロセッサ201及び該プロセッサ20の制
御プログラムが格納されたプログラムメモリ21を具備
する。プロセッサ20とプログラムメモリ21はアドレ
スバス22、データバス23、コントロールバス24に
よってデバッグ装置1のレジスタ18に接続されている
。さらに実機2のアドレスバス22.コントロールバス
24はデパック装置1のブレークポイント判定回路17
に接続されている。
The actual device 2 includes a processor 201 and a program memory 21 in which a control program for the processor 20 is stored. The processor 20 and program memory 21 are connected to the registers 18 of the debug device 1 by an address bus 22, a data bus 23, and a control bus 24. Furthermore, the address bus 22 of the actual machine 2. The control bus 24 is the breakpoint determination circuit 17 of the depacking device 1.
It is connected to the.

デバッグ装置1のメモリ11にはデイスプレィ12とキ
ーボード13を制御して設定すべきスレッドに対応する
ブレークボイド判定回路17にブレークポイントアドレ
スを設定、解除するプログラムが含まれる。
The memory 11 of the debugging device 1 includes a program that controls the display 12 and keyboard 13 to set and cancel breakpoint addresses in the break/void determination circuit 17 corresponding to the thread to be set.

次に第1図のデバッグ装置の動作を第2図のフローチャ
ートを参照して説明する。まず、デバッグ装置1におい
てメモリ11に含まれる前記プログラムを起動させる。
Next, the operation of the debugging device shown in FIG. 1 will be explained with reference to the flowchart shown in FIG. First, the program included in the memory 11 in the debugging device 1 is activated.

該プログラムはキーボード13よりブレークすべきスレ
ッド識別子とアドレスを入力させ、スレッド識別子より
ブレークポイント判定回路17を選択し、同回路により
ブレークアドレスを設定する。
The program causes the thread identifier and address to be broken to be input from the keyboard 13, selects the break point determination circuit 17 from the thread identifier, and sets the break address using the same circuit.

次に実機2の実行状態においてスレッド切り替え動作が
発生した時、第2図に示す処理をメモリ21に含まれる
制御プログラムは行なう。即ち、該制御プログラムは前
に実行していたスレッドの実行状態をメモリ21に退避
しくステップ31)、次に実行するスレッドの識別子を
レジスタ18に設定する(ステップ32)。レジスタ1
8に蓄積されたスレッド識別子をデコーダ19はデコー
ドし、プログラム識別子に対応するブレークポイント判
定回路17を選択する(ステップ33.34)。次に該
スレッドに実行が移り該スレッド実行中に、前記選択さ
れたブレークポイント判定回路17に設定されているア
ドレスが命令フェッチ時に現れた時、ブレークポイント
判定回路は1”を出力し、デコーダ19の出力との論理
和がANDゲー1−101でとられてORゲート102
を通じて、実機2のプロセッサ20をブレークさせると
共に、ブレークの発生をデバッグ装置1のプロセッサ1
0に通知して動作を終了する。
Next, when a thread switching operation occurs in the execution state of the actual device 2, the control program included in the memory 21 performs the processing shown in FIG. That is, the control program saves the execution state of the previously executed thread in the memory 21 (step 31), and sets the identifier of the thread to be executed next in the register 18 (step 32). register 1
The decoder 19 decodes the thread identifier stored in 8 and selects the breakpoint determination circuit 17 corresponding to the program identifier (steps 33 and 34). Next, execution moves to the thread, and during execution of the thread, when the address set in the selected breakpoint determination circuit 17 appears at the time of instruction fetch, the breakpoint determination circuit outputs 1'', and the decoder 19 The logical sum with the output of is taken by AND gate 1-101 and OR gate 102
This causes the processor 20 of the actual device 2 to break, and also causes the processor 1 of the debug device 1 to detect the occurrence of the break.
0 and terminates the operation.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、デバッグのために
ブレークするスレッドに対応するブレークポイント判定
回路にブレークポイントアドレスを設定し、スレッドの
実行の切り替え時に次に実行するスレッドの識別子をレ
ジスタに設定し、デコーダを通じて該スレッドに対応す
るブレークポイント判定回路が選択され、該スレッドの
ブレークポイントの判定は前記選択されたブレークポイ
ント判定回路によって行なわれるために、目的とするス
レッドが目的とするブレークアドレスに到達した時のみ
に実機の実行がブレークされる。
As explained above, according to the present invention, a breakpoint address is set in the breakpoint determination circuit corresponding to the thread to be broken for debugging, and the identifier of the thread to be executed next is set in the register when switching thread execution. Then, the breakpoint determination circuit corresponding to the thread is selected through the decoder, and the breakpoint determination circuit for the thread is determined by the selected breakpoint determination circuit, so that the target thread does not reach the target break address. Execution on the actual machine is broken only when it is reached.

従って、従来のようにブレークポイントで実行がブレー
クする度にブレークしたスレッドが目的としたスレッド
か否かを判断する必要がなくなり、デバッグ作業の能率
を向上することができ、従来のデバッグ装置に比してソ
フトウェアの生産性を大幅に向上させることができる効
果がある。
Therefore, it is no longer necessary to judge whether the broken thread is the intended thread every time execution breaks at a breakpoint, as in the past, and debugging efficiency can be improved compared to conventional debugging equipment. This has the effect of significantly improving software productivity.

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

第1図は本発明の一実施例を示すブロック図、第2図は
スレッド識別子の設定処理を示す流れ図である。 1・・・デバッグ装置、2・・・実機、10・・・プロ
セッサ、11・・・メモリ、12・・・デイスプレィ、
13・・・キーボード、17・・・ブレークポイント判
定回路、18・・・レジスタ、19・・・デコーダ。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a flow chart showing thread identifier setting processing. DESCRIPTION OF SYMBOLS 1...Debug device, 2...Actual machine, 10...Processor, 11...Memory, 12...Display,
13...Keyboard, 17...Break point determination circuit, 18...Register, 19...Decoder.

Claims (1)

【特許請求の範囲】[Claims] プロセッサと前記プロセッサの制御プログラムを記憶し
たプログラムメモリを具備する実機のシステムバスもし
くは前記プロセッサのリード端子からアドレス信号、デ
ータ信号およびコントロール信号を取り出してプログラ
ムデバッグを行なうデバッグ装置であって、前記実機で
実行中のスレッドの識別子を蓄積する手段と、前記実機
で実行中のアドレス信号及びコントロール信号からブレ
ークすべきアドレスか否かを判定するブレークポイント
判定回路と、前記ブレークポイント判定回路をスタック
ポインタの値により選択する回路とを具備し、スレッド
に独立したブレーク動作を行なうことを特徴とするデバ
ッグ装置。
A debugging device that performs program debugging by extracting address signals, data signals, and control signals from a system bus of an actual machine or a read terminal of the processor, which is equipped with a processor and a program memory storing a control program for the processor; means for accumulating identifiers of threads being executed; a breakpoint determination circuit for determining whether or not an address should be broken from the address signal and control signal being executed in the actual device; What is claimed is: 1. A debugging device comprising: a circuit for making a selection based on a thread, and performing a thread-independent break operation.
JP2268905A 1990-10-05 1990-10-05 Debugging device Pending JPH04145544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2268905A JPH04145544A (en) 1990-10-05 1990-10-05 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2268905A JPH04145544A (en) 1990-10-05 1990-10-05 Debugging device

Publications (1)

Publication Number Publication Date
JPH04145544A true JPH04145544A (en) 1992-05-19

Family

ID=17464900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2268905A Pending JPH04145544A (en) 1990-10-05 1990-10-05 Debugging device

Country Status (1)

Country Link
JP (1) JPH04145544A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07225693A (en) * 1994-02-07 1995-08-22 Internatl Business Mach Corp <Ibm> Method for processing thread phenomenon over different address space
US7043717B2 (en) 2002-05-27 2006-05-09 Kabushiki Kaisha Toshiba Debugging apparatus and method
JP2010510585A (en) * 2006-11-15 2010-04-02 クゥアルコム・インコーポレイテッド Method and system for instruction stuffing operations during non-intrusive digital signal processor debugging
JP2013528853A (en) * 2010-04-19 2013-07-11 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for debugging multithreaded code

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07225693A (en) * 1994-02-07 1995-08-22 Internatl Business Mach Corp <Ibm> Method for processing thread phenomenon over different address space
US7043717B2 (en) 2002-05-27 2006-05-09 Kabushiki Kaisha Toshiba Debugging apparatus and method
JP2010510585A (en) * 2006-11-15 2010-04-02 クゥアルコム・インコーポレイテッド Method and system for instruction stuffing operations during non-intrusive digital signal processor debugging
JP2012178165A (en) * 2006-11-15 2012-09-13 Qualcomm Inc Method and system for instruction stuffing operations during non-intrusive digital signal processor debugging
JP2013528853A (en) * 2010-04-19 2013-07-11 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for debugging multithreaded code

Similar Documents

Publication Publication Date Title
JP2005317023A (en) Breakpoint logic unit, debug logic, and breakpoint method for data processing apparatus
US4652997A (en) Method and apparatus for minimizing overhead when executing nested do loops
US20010023479A1 (en) Information processing unit, and exception processing method for specific application-purpose operation instruction
EP0530816A2 (en) Microprocessor with cache memory and trace analyzer therefor
JPH04145544A (en) Debugging device
JP2525492B2 (en) Programmable controller
US20080281988A1 (en) Apparatus and method for initating a debug halt for a selected architectural state
JP2653412B2 (en) How to set breakpoints
JP3068578B2 (en) In-circuit emulator and saturation calculation processing method
JP2734382B2 (en) In-circuit emulator and debugging method thereof
JP3011115B2 (en) Debug system
JPS59128652A (en) Program testing method using display device
JPH0283749A (en) Internal interruption control system for microprocessor
JPS59123933A (en) Address comparison system
JPS59183443A (en) Debug device
JPH09319592A (en) Microcomputer
JPH06202907A (en) Debug support device
JPH05224989A (en) Microprocessor containing cache memory and its trace analyzer
JPH10240571A (en) Address tracing circuit
JP2003308226A (en) Test coverage system
JPH0535499A (en) Data processing device and method
JP2001265619A (en) Data tracing system
JPH01246638A (en) Area error decision system for write instruction
JPH0512005A (en) Information processor
JPS61246841A (en) Information processor