JPS6222154A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPS6222154A
JPS6222154A JP60161171A JP16117185A JPS6222154A JP S6222154 A JPS6222154 A JP S6222154A JP 60161171 A JP60161171 A JP 60161171A JP 16117185 A JP16117185 A JP 16117185A JP S6222154 A JPS6222154 A JP S6222154A
Authority
JP
Japan
Prior art keywords
processor
program
debugging
debugging device
actual machine
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
JP60161171A
Other languages
Japanese (ja)
Inventor
Koichi Matsumoto
松本 孝一
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP60161171A priority Critical patent/JPS6222154A/en
Publication of JPS6222154A publication Critical patent/JPS6222154A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To apply program debugging efficiently for an actual machine by providing an operating mode accessing a special application register to a processor in a debugging device. CONSTITUTION:The debugging device 1 receives a command and when a control program of an actual machine 10 is executed, a control circuit 3 changes the level of a signal alpha from logical 0 to logical 1 to form a state B. Then the control circuit 3 changes the level of the signal alpha from logical 1 to logical 0 to restore the state to a state A at generation of brake or stop condition. The special application register in a processor 2 is accessed while a control program in the debugging device 1 is in operation in this way. Since the program of the actual machine 10 is executed and the content of the special application register is referenced after the execution of program of the actual machine 10 after the content of the special application register is set, the efficient program debug is attained.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はプロセッサを備えた機器に接続し、この機器内
のプログラムをデバッグするためのデバッグ装置に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a debug device that is connected to a device equipped with a processor and is used to debug a program in the device.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

第3図により従来のデバッグ装置の機能を説明する。デ
バッグ装置1はプロセッサを備えた機器10(以下実機
10という)のデバッグを行うものであり、第1のプロ
セッサ2と入出力装置インタフェース回路6等を具備す
る。実機lOは第2のプロセッサ1と実機10の制御プ
ログラムを実行するための第2のメモリ12等を具備す
る。デバッグ用の第1のプロセッサ2は実機1oの第2
のプロセッサ11と同じものである。デバッグ装[1は
実機1o内の第2のプロセッサ11のリード端子から入
出力信号を取り出して、第2のプロセッサ11の代わり
に第1のプロセッサ2にて実機1oの制御プログラムを
実行する。すなわち、実機10の制御プログラムを記憶
したメモ1月2を第1のプロセッサ2に接続し、CRT
やキーボード等を接続した入出力装置インタフェース回
路6を介して、第1のプロセッサ2内の各レジスタの表
示・変更、制御プログラムの実行・停止・トレース表示
等を行ない、メモリ12内の制御プログラムをデバッグ
する。
The functions of the conventional debugging device will be explained with reference to FIG. The debug device 1 debugs a device 10 (hereinafter referred to as the actual device 10) equipped with a processor, and includes a first processor 2, an input/output device interface circuit 6, and the like. The real machine 10 includes a second processor 1, a second memory 12 for executing a control program for the real machine 10, and the like. The first processor 2 for debugging is the second processor of the actual machine 1o.
It is the same as the processor 11 of . The debugging device [1] extracts input/output signals from the lead terminals of the second processor 11 in the actual device 1o, and executes the control program of the actual device 1o in the first processor 2 instead of the second processor 11. That is, the memo 2 which stores the control program of the actual machine 10 is connected to the first processor 2, and the CRT
The control program in the memory 12 is displayed and changed through the input/output device interface circuit 6 to which a keyboard, etc. Debug.

一方、近年プロセッサの処理スピード向上やメモリ保護
機能の追加等によりプロセッサ自身の機能増強が図られ
ており、このために第4図に示すようにプロセッサ内部
にキューレジスタ20やキャッシュレジスタ21等を実
装するものが実現されている。これらレジスタは命令の
先取りを行なったり、物理アドレスの算出に使われたり
するものである。そして従来のプロセッサとのソフトウ
ェア互換性を重視するものは、これらレジスタはプログ
ラムでは直接アクセスできない構成となっている。
On the other hand, in recent years, the functions of processors themselves have been enhanced by improving processing speed and adding memory protection functions, etc. For this purpose, queue registers 20, cache registers 21, etc. are implemented inside the processor as shown in Figure 4. What you want is being realized. These registers are used to prefetch instructions and calculate physical addresses. For those that place emphasis on software compatibility with conventional processors, these registers are configured so that they cannot be directly accessed by programs.

このようなプロセッサを備えた機器(実機)に対するデ
バッグ装置は、第1のプロセッサ2として、つまりデバ
ッグ用のプロセッサとしてプログラムでは直接アクセス
できない特殊レジスタをもつプロセッサを使用すること
になるので、上記キューレジスタやキャッシュレジスタ
等の特殊用途レジスタの動作に関し1人出力装置インタ
フェース回路6を介しての表示又は変更ができない。
A debugging device for a device (actual device) equipped with such a processor uses a processor with special registers that cannot be directly accessed by a program as the first processor 2, that is, as a debugging processor. The operation of special-purpose registers such as cash registers cannot be displayed or changed via the single-person output device interface circuit 6.

このため第1のプロセッサ2内部のキューイングされた
命令が実際にどこまで実行されたか、どのエリアが物理
アドレスに設定されているか等の詳細な動作を知ること
ができないため、実機10の制御プログラムを正確にモ
ニタ又は制御(実行)を行なうことができず、プログラ
ムのデバッグに多大な時間を費やしていた。
For this reason, it is not possible to know detailed operations such as how far the queued instructions inside the first processor 2 have actually been executed or which area is set as a physical address, so the control program of the actual machine 10 cannot be known. It was not possible to accurately monitor or control (execute) the program, and a large amount of time was wasted debugging the program.

〔発明の目的〕[Purpose of the invention]

本発明はデバッグ装置内に実装されるプロセッサに上記
特殊用途レジスタをアクセスできる動作モードを設けこ
れを制御することにより実機のプログラムデバッグを効
率よく行なえるデバッグ装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a debugging device that can efficiently debug programs on an actual device by providing an operating mode in which the processor installed in the debugging device can access the special-purpose registers and controlling the operating mode.

〔発明の概要〕[Summary of the invention]

上記目的を達成するために、本発明はプロセッサ内部の
特殊用途レジスタへのアクセスを可能とする動作モード
を備えたデバッグ装置内のプロセッサと、この動作モー
ドを制御するための制御回路を具備し特殊用途レジスタ
を直接アクセスできることを特徴とする。
In order to achieve the above object, the present invention includes a processor in a debug device that is equipped with an operation mode that allows access to special-purpose registers inside the processor, and a control circuit for controlling this operation mode. The feature is that the application register can be accessed directly.

〔発明の実施例〕[Embodiments of the invention]

以下本発明の詳細な説明する。第1図は本発明の一実施
例に係わるデバッグ装置の概略を示す。
The present invention will be explained in detail below. FIG. 1 schematically shows a debugging device according to an embodiment of the present invention.

第1図のデバッグ装[1は、第1のプロセッサ2゜制御
回路3、プロセッサ2の入出力信号aを入出力信号す又
は入出力信号Cに切換えるための切換回路4、デバッグ
装[1の制御プログラムを実行するための第1のメモリ
5、CRT、キーボード等を接続するための入出力装置
インタフェース回路6等を具備する。
The debugging device [1 in FIG. It is equipped with a first memory 5 for executing a control program, an input/output device interface circuit 6 for connecting a CRT, a keyboard, etc., and the like.

デバッグ対象のプログラムを実行する実機10は。The actual machine 10 executes the program to be debugged.

第2のプロセッサ11と、実機1oの制御プログラムを
実行するための第2のメモリ12を具備する。
It includes a second processor 11 and a second memory 12 for executing a control program for the actual machine 1o.

デバッグ装置1は実機1o内の第2のプロセッサ11の
代わりに第1のプロセッサ2を用いて、メモリ12内の
制御プログラムを実行し、命令の1ステツプづつの実行
、指定アドレスからの実行開始、指定アドレスでの実行
停止等を行なって実機1o内のプログラムをデバッグす
るものである。
The debugging device 1 uses the first processor 2 instead of the second processor 11 in the actual device 1o to execute the control program in the memory 12, execute instructions one step at a time, start execution from a specified address, The program in the actual device 1o is debugged by stopping execution at a specified address.

このため、切換回路4は制御回路3の出方信号dにより
、第2図に示すように信号dが10′の時はデバッグ装
置i1内の制御プログラムを実行するためにプロセッサ
2の入出力信号aをデバッグ装置1内の入出力信号すに
接続し、信号dが″1′の時は実機10内の制御プログ
ラムを実行するためにプロセッサ2の入出力信号aを実
機10内の入出力信号Cに接続する。
Therefore, as shown in FIG. 2, when the signal d is 10', the switching circuit 4 uses the output signal d of the control circuit 3 to signal the input/output signal of the processor 2 in order to execute the control program in the debug device i1. When the signal d is "1", the input/output signal a of the processor 2 is connected to the input/output signal a in the debugging device 1, and the input/output signal a of the processor 2 is connected to the input/output signal in the actual device 10 in order to execute the control program in the actual device 10. Connect to C.

この際、プロセッサ2は、制御回路3の出力信号dを切
換回路4と同時に入力し、プロセッサ2はこの入力信号
でプロセッサ内部のマイクロプログラム又はハードウェ
アを切換えることにより、信号dが% 071のときは
プロセッサ2内の特殊用途レジスタをアクセスできる特
殊モード、信号dが11′のときはアクセスできない通
常モードとなる。
At this time, the processor 2 inputs the output signal d of the control circuit 3 at the same time to the switching circuit 4, and the processor 2 uses this input signal to switch the microprogram or hardware inside the processor, so that when the signal d is % 071 is a special mode in which special purpose registers in the processor 2 can be accessed, and when signal d is 11', it is a normal mode in which access is not possible.

デバッグ装置1は第2図のAの状態でキーボード等によ
り、入出力装置インタフェース回路6を介してコマンド
を受付け、実機10の制御プログラムを実行する時に制
御回路3により信号dを′″0′→″1′に変化させB
の状態とする。
The debugging device 1 receives a command from a keyboard or the like via the input/output device interface circuit 6 in the state of A in FIG. Change to ``1'' B
state.

第2図のBの状態であらかじめ設定したアドレスでのブ
レーク条件発生時や、スイッチ等を介してのストップ条
件発生時に、制御回路3により信号dを11“→1o′
に変化させAの状態に戻す。
When a break condition occurs at a preset address in state B in Figure 2, or when a stop condition occurs via a switch, etc., the control circuit 3 changes the signal d from 11" to
and return to state A.

これらの動作によりデバッグ装置1内の制御プログラム
が動作中はプロセッサ2内の特殊用途レジスタをアクセ
スできるため、特殊用途レジスタの内容を設定してから
の実機10のプログラム実行や、実機10のプログラム
実行後に特殊用途レジスタの内容を参照できるので効率
のよいプログラムデバッグが可能となあ。
Due to these operations, the special-purpose registers in the processor 2 can be accessed while the control program in the debugging device 1 is running, so the program execution on the actual device 10 after setting the contents of the special-purpose registers or the execution of the program on the actual device 10 is possible. Since you can refer to the contents of special-purpose registers later, you can debug programs more efficiently.

又、実機10内の制御プログラムが動作中はプロセッサ
2がプロセッサ11と同様の動作モードとなるため特殊
用途レジスタの存在を意識させることなしに実機10内
のプログラムの模擬が可能となる。
Furthermore, while the control program in the actual device 10 is operating, the processor 2 is in the same operating mode as the processor 11, so it is possible to simulate the program in the actual device 10 without being aware of the existence of special purpose registers.

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

以上詳述したように本発明によれば従来とのソフトウェ
ア互換性を保つためにプログラムで直接アクセスできな
いレジスタをもち、機能を向上させたプロセッサを用い
た機器に対し効率よくプログラムデバッグを行なえるデ
バッグ装置を提供することかできる。
As detailed above, according to the present invention, in order to maintain software compatibility with conventional software, the debugging device can efficiently debug programs for devices that use processors with improved functions and which have registers that cannot be directly accessed by programs. can be provided.

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

第1図は本発明の一実施例を示すブロック図。 第2図は第1図を説明するためのタイミング図、第3図
は従来のデバッグ装置のブロック図、第4図はプロセッ
サの機能説明図である。 1・・・デバッグ装置   2・・・プロセッサ3・・
・制御回路     4・・・切換回路5・・・メモリ 6・・・入出力装置インタフェース回路10・・・実機
       11・・・プロセッサ12・・・メモリ
      20・・・キューレジスタ21・・・キャ
ッシュレジスタ 代理人 弁理士 則 近 憲 佑 同  三俣弘文 第1図 l゛′ 第2図 第3図 第4図
FIG. 1 is a block diagram showing one embodiment of the present invention. FIG. 2 is a timing diagram for explaining FIG. 1, FIG. 3 is a block diagram of a conventional debugging device, and FIG. 4 is a functional explanatory diagram of a processor. 1...Debug device 2...Processor 3...
- Control circuit 4... Switching circuit 5... Memory 6... Input/output device interface circuit 10... Actual machine 11... Processor 12... Memory 20... Queue register 21... Cache register Agent Patent Attorney Nori Ken Yudo Hirofumi Mitsumata Figure 1 l゛' Figure 2 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】[Claims] プロセッサと、該プロセッサの制御プログラムを記憶し
たプログラムメモリを具備する実機の該プロセッサのリ
ード端子から入出力信号を取出してプログラムデバッグ
を行なうデバッグ装置において、該デバッグ装置内に具
備する該プロセッサと同一の動作を行なうデバッグ用プ
ロセッサに該プロセッサ内部にあるプログラムでアクセ
ス不可能な特殊用途レジスタへのアクセスを可能とする
動作モードを設け、該動作モードを選択するための制御
回路を具備したことを特徴とするデバッグ装置。
In a debugging device that performs program debugging by extracting input/output signals from the lead terminals of the processor of an actual machine, which is equipped with a processor and a program memory that stores a control program for the processor, a processor that is the same as the processor included in the debugging device is provided. A debug processor that operates is provided with an operation mode that allows access to special purpose registers that cannot be accessed by a program inside the processor, and a control circuit is provided for selecting the operation mode. debug equipment.
JP60161171A 1985-07-23 1985-07-23 Debugging device Pending JPS6222154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60161171A JPS6222154A (en) 1985-07-23 1985-07-23 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60161171A JPS6222154A (en) 1985-07-23 1985-07-23 Debugging device

Publications (1)

Publication Number Publication Date
JPS6222154A true JPS6222154A (en) 1987-01-30

Family

ID=15729937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60161171A Pending JPS6222154A (en) 1985-07-23 1985-07-23 Debugging device

Country Status (1)

Country Link
JP (1) JPS6222154A (en)

Similar Documents

Publication Publication Date Title
US6988264B2 (en) Debugging multiple threads or processes
JP3105223B2 (en) Debug peripherals for microcomputers, microprocessors and core processor integrated circuits
JPH011039A (en) In-circuit emulator
JPH06242987A (en) Method and equipment for making host computer execute succession of normal processing of microprocessor in computer unit
JP2003015906A (en) Remote debugging method and device
JPS6222154A (en) Debugging device
JP2808757B2 (en) Microprocessor for debugging
JPS59202547A (en) Debugging device
JPS59202546A (en) Debugging device
JPS6382525A (en) Microprocessor with tracing function
JPS59202548A (en) Debugging device
JP3159155B2 (en) Method and apparatus for debugging program
JPH0373011B2 (en)
JPS6116338A (en) Interrupt processing system of virtual computer system
JPH04123235A (en) Debugging method and system for microprogram
JPH04199336A (en) Microcomputer
JPS59202550A (en) Debugging device
JPS61131130A (en) Register saving method
JPH05204710A (en) Event tracer
JPH03157732A (en) Processor operating state adjusting system
JPH04264932A (en) In-circuit emulator
JPS6177933A (en) Data processing system
JPH0285935A (en) Data processor and its debugging device
JPH1083316A (en) Multi cpu system
JPH04259043A (en) In-circuit emulator