JPS59202550A - Debugging device - Google Patents

Debugging device

Info

Publication number
JPS59202550A
JPS59202550A JP58077534A JP7753483A JPS59202550A JP S59202550 A JPS59202550 A JP S59202550A JP 58077534 A JP58077534 A JP 58077534A JP 7753483 A JP7753483 A JP 7753483A JP S59202550 A JPS59202550 A JP S59202550A
Authority
JP
Japan
Prior art keywords
memory
address
program
processor
break
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
JP58077534A
Other languages
Japanese (ja)
Inventor
Haruo Takagi
高木 治夫
Yoshinori Takahashi
義則 高橋
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.)
Omron Corp
Original Assignee
Tateisi Electronics Co
Omron Tateisi Electronics Co
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 Tateisi Electronics Co, Omron Tateisi Electronics Co filed Critical Tateisi Electronics Co
Priority to JP58077534A priority Critical patent/JPS59202550A/en
Publication of JPS59202550A publication Critical patent/JPS59202550A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Abstract

PURPOSE:To improve the debugging efficiency by breaking the processor of an active machine prior to the execution of instruction of an address detected as a break point. CONSTITUTION:A bit map memory 5 is brought into the write state prior to the execution of break to clear this memory 5 into zero. Then, a prescribed value of data (e.g., 1) is written in an address of the memory 5 corresponding to the address desired to be subject to break in a program memory 22 via an address bus 13 and a data bus 14 of a processor 2 according to the command of the debugging operator. Then, when an active machine 20 runs, the memory 5 is addressed by a value on the address bus 24 and its read output is applied to one terminal of an AND gate 11. Since a fetch timing signal is applied from a circuit 9 to the other terminal of the AND gate 11, a processor 21 is subject to break only when an output of the memory 5 is at level ''1''.

Description

【発明の詳細な説明】 (発明の分野) 本発明は、プロセッサを備えた機器づ−なわち実機に接
続されてこの実機のプログラムデバッグを行なうデバッ
グ装置に関し、特にブレークポイント検出時はこのブレ
ークポ゛インドの命令アドレスにおける命令を実行する
前にプロレツサの動作停止すなわちブレークを行なうよ
うにし、たデバッグ装置に関す゛る。
DETAILED DESCRIPTION OF THE INVENTION (Field of the Invention) The present invention relates to a debugging device that is connected to a device equipped with a processor, that is, an actual device, and debugs the program of this actual device. This invention relates to a debugging device which stops the operation of a processor, ie breaks, before executing an instruction at an Indian instruction address.

(発明の背景) デバッグは被デバツグプログラムの実行、停車を繰り返
えしながら停止時点でメモリやレジスタの内容を参照し
たり、それらの内容を変更しながらプログラムのバグを
取りのぞく作業である。この間にはパッチと呼ばれるプ
ログラムそのものの変更作業も伴なうものである。デバ
ッグは、一般的にはこのような作業であるので、デバッ
グ装置にはプログラムの実行をブレークきせる機能が必
要である。ブレークはある事象が生じたときに発4Lり
る付様Cあり、事象は大きく分けて(1)あるプログラ
ムを実行した場合、(2)あるデータを参照した場合、 がある。本発明のデバッグ装置はこの(2)の場合に用
いられるブレークを実行するものである。
(Background of the invention) Debugging is the process of repeatedly running and stopping the program being debugged, and removing bugs in the program by referring to the contents of memory and registers at the point of stop, and by changing these contents. . During this time, changes to the program itself called patches are also involved. Since debugging is generally a task like this, the debugging device must have a function to break the execution of the program. A break occurs when a certain event occurs, and events can be broadly divided into (1) when a certain program is executed, and (2) when certain data is referenced. The debugging device of the present invention executes the break used in this case (2).

さらに、ブレークにおいて問題となるのは、実際に停止
するタイミングである。タイミングとしては次の3つの
ケースがある。
Furthermore, a problem with breaks is the timing at which they actually stop. There are three timing cases:

八 指定命令の実行直前の停止 B 指定命令の実行直後の停止 Cその他、不定期 A−Cの各停止ケースは、デバッグオペレータが直接に
認知しながら使用覆る場合においては特に問題はない。
8. Stop B immediately before execution of a designated instruction, C stop immediately after execution of a designated instruction, and other stop cases A to C that do not occur at regular intervals pose no particular problem if the debug operator directly recognizes them and uses them over and over again.

しかし、高級言語のデバッグにおけるブレークやプログ
ラム実行順序の変更やメモリの表示などの場合における
ブレークでオペレータを介さずに実行する場合には、B
の様式のブレーク機構が必要となる。
However, when executing a break in high-level language debugging, a break in changing the program execution order, displaying memory, etc. without using an operator, B
A break mechanism of this type is required.

ところで、従来のハードウェアによるブレーク方式にお
いては、ブレークポイン1〜を検出した場合にNMi割
込−ウl−1altなとのように」ントf−]−ル信号
を用いてブレークを行なわせCいた。この場合における
停止は、一般に指定した命令アドレスの命令実行後に発
生していた。この実行後の停止であると、プログラムの
実行順序の変更や高級言語のデバッガで用いられるブレ
ーク方式としでは使用しにくいものであった。
By the way, in the conventional hardware-based break method, when breakpoints 1 to 1 are detected, a break is performed using a ``ntf-]-alt'' signal such as NMi interrupt-ul-1alt. there was. In this case, the halt generally occurs after the instruction at the specified instruction address is executed. This suspension after execution is difficult to use when changing the program execution order or as a break method used in high-level language debuggers.

(発明の目的) 本発明は、上述の従来形にJ5Iブる間1題点に鑑み、
デバッグ装置において、ブレークポイン1〜とし−C検
出されたアドレスの命令実行前に実(幾10レッザをブ
レークさせることを目的とする。
(Object of the Invention) The present invention has been made in view of the above-mentioned problem in the conventional form,
In a debugging device, the purpose is to set breakpoints 1 to 1 and cause an actual break to occur before execution of the instruction at the detected address.

(発明の構成および効果) 本発明は、プロセッサと該プロセッサの制御プログラム
を記憶したプログラムメモリどをイ]りる実機に接続さ
れてプログラムデバッグを行なうデバッグ装置において
1、実機のプログラムメモリのアドレス空間に対応しか
つブレークすべきアドレスに対応するビットに所定値の
データを記憶したヒツトマツプメモリと、トラップ命令
コード設定器とを用い、該ピッ1〜マツプメモリから該
所定(1nのデータが読出されたとき該プロセッサの命
令ノコッチタイミングと同期して該プログラムメモリの
出力を禁止するとともに該トラップ命令コー1〜設定器
から実機のデータバスにトラップ命令コートを送出する
ことによってブレークアドレスの命令を実行する前にブ
レークを実行するという構想に基づくもので、本発明に
よると、指定ししプログラムの実行直前に正確にプログ
ラム実行を停止するので、実行シーケンスを変える場合
に有効に用いることができ、また、高級言語のように機
械語の集合を1つの文とするような場合にも、文の切れ
目で正確に停止させることができる。さらに、実行前の
状態が明らかになるので、デバッグを効率的に行なうこ
とができる。
(Structure and Effects of the Invention) The present invention provides a debugging device that is connected to an actual machine and performs program debugging, which includes a processor and a program memory storing a control program for the processor.1. When the data of the predetermined value (1n) is read out from the map memory from the pin 1 to the map memory using a hit map memory which stores data of a predetermined value in a bit corresponding to the address to be broken and a trap instruction code setter, a trap instruction code setter is used. Before executing the instruction at the break address, the output of the program memory is prohibited in synchronization with the instruction timing of the processor, and the trap instruction code 1 to the setter is sent to the data bus of the actual machine. This invention is based on the concept of executing a break when the specified program is executed.According to the present invention, program execution is stopped exactly before the specified program is executed, so it can be effectively used when changing the execution sequence. Even in cases where a set of machine words is made into a single sentence, such as in a language, it is possible to accurately stop at a sentence break.Furthermore, since the state before execution is clear, debugging can be performed efficiently. be able to.

(実施例の説明) 以下、図面により本発明の詳細な説明する。(Explanation of Examples) Hereinafter, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明の1実施例に係わるデバッグ装置の概
略を示づ。同図のデバッグ装置1はプロセッサ(CPU
2>2、マルチプレクサ4、ピッl−マツプメモリ5、
トラップ命令コー1〜設定器6、グー1−回路7、イン
バータ8、タイミングコントロール回路9、コントロー
ル回路10、アンドゲート11等を具備する。デバッグ
の対象となるプログラムを実行する実機20は、プロセ
ッサ(CPUI)21および該プロセッサ21の制御プ
ログラムが格納されたプログラムメモリ22を具備する
。プロセッサ21とメモリ22とはコントロールバス2
3、アドレスバス24およ、びデータバス25を含むシ
ステムバスによって接続されている。実1fi20のア
ドレスバス24はデバッグ装置1のマルチプレクサ4に
接続されでいる。また、実機20のコントロールバス2
3はデバッグ装置1のタイミングコントロール回路9と
、さらに、デバッグ装置1のゲート回路7の出力は実1
20のデータバス25と接続されている。
FIG. 1 schematically shows a debugging device according to an embodiment of the present invention. The debug device 1 in the figure is a processor (CPU)
2>2, multiplexer 4, pin-map memory 5,
It is provided with a trap instruction code 1 to a setter 6, a group 1 circuit 7, an inverter 8, a timing control circuit 9, a control circuit 10, an AND gate 11, and the like. A real device 20 that executes a program to be debugged includes a processor (CPUI) 21 and a program memory 22 in which a control program for the processor 21 is stored. Processor 21 and memory 22 are connected to control bus 2
3, a system bus including an address bus 24 and a data bus 25. The address bus 24 of the real 1fi 20 is connected to the multiplexer 4 of the debug device 1. In addition, the control bus 2 of the actual machine 20
3 is the output of the timing control circuit 9 of the debugging device 1, and the output of the gate circuit 7 of the debugging device 1 is actually 1.
20 data buses 25.

ビットマツプメモリ5は、実+fi 20のプログラム
メモリ22のアドレス空間に対応したビット数を右する
メモリであり、例えばプログラムメモリ22が64にバ
イトの容量を有する場合にはビットマツプメモリは64
にビットの容量を有する。
The bitmap memory 5 is a memory that stores the number of bits corresponding to the address space of the program memory 22 of 20. For example, if the program memory 22 has a capacity of 64 bytes, the bitmap memory 5 has a capacity of 64 bytes.
has a capacity of .

マルチプレクサ4は、実機20のアドレスバス24とデ
バッグ装置1のアドレスバス13の内いずれかをビット
マツプメモリ5のアドレス入力に切換接続づるためのも
のである。タイミングコントロール回路9は実機コン1
〜〇−ルバス23上の命令フェッチ信号と同期したフェ
ッチタイミング信号を発生ずる。
The multiplexer 4 is used to switch and connect either the address bus 24 of the actual device 20 or the address bus 13 of the debugging device 1 to the address input of the bitmap memory 5. Timing control circuit 9 is the actual controller 1
~〇- Generates a fetch timing signal synchronized with the instruction fetch signal on the bus 23.

次に第1図のデバッグ装置の動作を第2図のフローチャ
ートを参照して説明する。
Next, the operation of the debugging device shown in FIG. 1 will be explained with reference to the flowchart shown in FIG.

第1図の回路に、lI5いては、ブレーク実行に先立っ
て、デバッグ装置1のマルチプレクサ4がプロセッサ2
のアドレスバス13とビットマツプメモリ5のアドレス
入力とを接続するように切り換えるとともにコントロー
ル回路10からヒツトマツプメモリ5に書込信号Wを印
加してビットマツプメモリ5を書込状態にする。そして
、ビットマツプメモリ5の全アドレスをプロセッサ2の
アドレスによりアドレッシングしながらデータパスコ1
から入力信号I N = ” O”を印加し′C該メモ
リ5をOクリアしく1)、次にデバッグオペレータの指
示に従って(2)、プロセッサ2のアドレスバス13お
よびデータバス14がらプログラムメモり22のブレー
クさせたいアドレスに対応するビットマツプメモリ5の
アドレスに所定値のf−夕を書込む(3)。所定値のデ
ータとしては、例えば、前記ブレークさせたいアドレス
に対応するアドレスに1″が書込まれる。
In the circuit of FIG. 1, the multiplexer 4 of the debugging device 1 is connected to the processor
The address bus 13 of the bitmap memory 5 is switched to be connected to the address input of the bitmap memory 5, and a write signal W is applied from the control circuit 10 to the bitmap memory 5 to put the bitmap memory 5 into a write state. Then, while addressing all the addresses of the bitmap memory 5 by the address of the processor 2, the data path controller 1
Apply the input signal I N = ``O'' from 1) to clear the memory 5, and then (2) follow the instructions of the debug operator to clear the program memory 22 from the address bus 13 and data bus 14 of the processor 2. A predetermined value of f is written to the address of the bitmap memory 5 corresponding to the address at which the break is desired (3). As the predetermined value data, for example, 1'' is written to the address corresponding to the address where the break is desired.

このようにして、ビットマツプメモ、す5にブレークさ
せたい命令のすべてのアドレスに対しC所定値のデータ
が書込まれると、プロセラ勺2はコントロール回路10
を介して書込信号の代りに読出信号を印加してビットマ
ツプメモリ5を読出状態にし、マルチプレクサ4を実態
20のアドレスバス24とビットマツプメモリ5のアド
レス入力とを接続する状態に設定した後、実1m20の
プロセッサ21にラン信号を与え、実(幾20にプログ
ラムを実行させる(4)。
In this way, when the data of the predetermined value of C is written to all the addresses of the instruction to cause a break in the bitmap memory 5, the processor
After applying a read signal instead of a write signal via the bitmap memory 5 to the read state, and setting the multiplexer 4 to connect the address bus 24 of the entity 20 and the address input of the bitmap memory 5. , gives a run signal to the processor 21 of the real 1m20, and causes the real 1m20 to execute the program (4).

この時、実(幾20のプロセッサ21がらコントロール
ハス23、アドレスバス24およびデータバス25上に
プログラムに従ったデータが表われる(5)。アドレス
バス24上のメモリ22に入力Δれるアドレスデータは
マルチプレクサ4を介し−Cビットマツプメモリ5のア
ドレス入力に印加され、このため、ビットマツプメモリ
5は、このアドレスデータによってアドレッシングされ
その続出出力が出ノ〕端子OUTを介してアンドゲート
11の一方の入力に印加される(6)。アンドグー1〜
11の他方の入力にはタイミングコントロール回路9か
らのフェッチタイミング信号が印加されているから、ビ
ットマツプメモリ5の出力がブレークポイントを示す位
置すなわちレベル゛1″のとき(7)、上記フェッチタ
イミング信号のタイミングでアンドゲート11の出力が
レベル゛′1″になる。これにより、インバータ8を介
してプログラムメモリ22の使用が禁止されるとともに
ゲート回路7が導通してトラップ命令設定器6に設定さ
れているトラップ命令コードが実f!20のデータバス
25に送出され(8)、ブ[II?ッ]ノ21は、この
トラップ命令を実行してブレークづる(9)。
At this time, data according to the program appears on the control bus 23, address bus 24, and data bus 25 from the 20 processors 21 (5).The address data input to the memory 22 on the address bus 24 is It is applied via the multiplexer 4 to the address input of the C bitmap memory 5, so that the bitmap memory 5 is addressed by this address data and its successive outputs are applied to one of the AND gates 11 via the terminal OUT. Applied to the input (6).Andoo 1~
Since the fetch timing signal from the timing control circuit 9 is applied to the other input of 11, when the output of the bitmap memory 5 is at a position indicating a break point, that is, at level "1" (7), the above fetch timing signal is applied. At the timing of , the output of the AND gate 11 becomes level "1". As a result, the use of the program memory 22 is prohibited via the inverter 8, the gate circuit 7 is turned on, and the trap instruction code set in the trap instruction setter 6 is changed to the actual f! 20 data bus 25 (8), ] No. 21 executes this trap instruction and breaks (9).

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

第1図は本発明の1実施例に係るデバッグ装置の概略の
構成を示すブロック図、第2図は第1図のデバッグ装置
の動作説明のための70−112−トである。 1・・・デバッグ装置、2・・・プロセッサ、訃・・ピ
ッ1〜マツプメモリ、6・・・トラップ命令ゴー1:設
定器、20・・・実機、21・・・プロセッサ、22・
・・プログラムメモ1ハ23−・・コントロールバス、
24・・・アドレスバス、25・・・データバス。 特許出願人 立石電機株式会社 代理人 弁理士 伊東辰雄 代理人 弁理士 伊東哲也
FIG. 1 is a block diagram showing a general configuration of a debugging device according to an embodiment of the present invention, and FIG. 2 is a diagram 70-112 for explaining the operation of the debugging device shown in FIG. DESCRIPTION OF SYMBOLS 1...Debug device, 2...Processor,...Pi 1~Map memory, 6...Trap instruction go 1: Setting device, 20...Actual machine, 21...Processor, 22...
...Program memo 1c23-...Control bus,
24...address bus, 25...data bus. Patent applicant Tateishi Electric Co., Ltd. Agent Patent attorney Tatsuo Ito Agent Patent attorney Tetsuya Ito

Claims (1)

【特許請求の範囲】[Claims] 1.10セツザと該ブロレッザの制御プログラムを記憶
したブし1グラムメモリとを具備する実機の、システム
バスもしくは該プロセッサのリード端子からアドレス信
号、データ信号およびコン1〜ロール信号を取出してプ
ログラムデバッグを行なうデバッグ装置であ、って、該
デバッグ装置は、該プログラムメモリのアドレス空間に
対応しかつブレークすべきアドレスに対応するビットに
所定値のデータを記憶したピッ1〜マツプメモリと、ト
ラップ命令コードを発生するトラップ命令コード設定器
とを具備し、該実機を動作させることにより該プログラ
ムメモリをアクセスするアドレス信号にJ、って該ビッ
トマツプメモリをアクセスし、該ピッ1〜マツプメモリ
から該所定値のデータが読出されたどき該プロセッサの
命令フェッチタイミングと同+1JI (、で該プログ
ラムメモリの出力を禁止するとともに該実機のデータバ
スに1〜ラツプ命令コードを送出することによりブレー
ク動作を行゛なうことを特徴とするデバッグ装置。
1.10 Program debugging by extracting address signals, data signals, and controller 1 to roll signals from the system bus or read terminal of the processor of the actual machine equipped with a 1-gram memory that stores the control program of the controller. The debugging device is a debugging device that stores data of predetermined values in bits corresponding to the address space of the program memory and corresponding to addresses to be broken, and a trap instruction code. and a trap instruction code setter that generates a trap instruction code setter, and by operating the actual machine, the bitmap memory is accessed in response to an address signal that accesses the program memory, and the predetermined value is read from the pin 1 to map memory. When the data is read, the output of the program memory is prohibited at +1JI (, which is the same as the instruction fetch timing of the processor), and a break operation is performed by sending a 1~lap instruction code to the data bus of the actual machine. A debug device characterized by:
JP58077534A 1983-05-04 1983-05-04 Debugging device Pending JPS59202550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58077534A JPS59202550A (en) 1983-05-04 1983-05-04 Debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58077534A JPS59202550A (en) 1983-05-04 1983-05-04 Debugging device

Publications (1)

Publication Number Publication Date
JPS59202550A true JPS59202550A (en) 1984-11-16

Family

ID=13636645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58077534A Pending JPS59202550A (en) 1983-05-04 1983-05-04 Debugging device

Country Status (1)

Country Link
JP (1) JPS59202550A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04111631U (en) * 1991-03-13 1992-09-29 三洋電機株式会社 Microcomputer program evaluation device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04111631U (en) * 1991-03-13 1992-09-29 三洋電機株式会社 Microcomputer program evaluation device

Similar Documents

Publication Publication Date Title
US5132971A (en) In-circuit emulator
JPS63111545A (en) Microprocessor for debug
KR940003318B1 (en) Processor having cache memory
KR920003044B1 (en) Control system for guest execution of virtual computer system
JPS59202550A (en) Debugging device
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JPH04123235A (en) Debugging method and system for microprogram
JPS59202546A (en) Debugging device
JPH02135545A (en) Execution control processing system for debugger
JPS59202548A (en) Debugging device
JPH04167146A (en) Address tracing system for information processor
JPH0830485A (en) Debugging device
JPS59202547A (en) Debugging device
JP2954006B2 (en) Emulation device and emulation method
JPH0581068A (en) Debugging support device
JPS63159905A (en) Forcible on/off system for input/output of programmable controller
JPH05204710A (en) Event tracer
JPS59151250A (en) Debugging device
JPS59163653A (en) Debug device
JPH07281924A (en) Trace device and emulator using the trace device
JP2001034498A (en) Debug method and device
JPH02120937A (en) Information processor
JPH0724033B2 (en) Development support device
JPS59165158A (en) Debugging device
JPS5968066A (en) Debugger starting system