JPH02110637A - Program debugging supporting device - Google Patents

Program debugging supporting device

Info

Publication number
JPH02110637A
JPH02110637A JP63263485A JP26348588A JPH02110637A JP H02110637 A JPH02110637 A JP H02110637A JP 63263485 A JP63263485 A JP 63263485A JP 26348588 A JP26348588 A JP 26348588A JP H02110637 A JPH02110637 A JP H02110637A
Authority
JP
Japan
Prior art keywords
program
address
instruction
memory
conditional branch
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
JP63263485A
Other languages
Japanese (ja)
Inventor
Toshio Suzuki
敏夫 鈴木
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 JP63263485A priority Critical patent/JPH02110637A/en
Publication of JPH02110637A publication Critical patent/JPH02110637A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To recognize the contents of a program immediately after executing the program and to improve debugging efficiency by previously storing next instructions accordant with the existence of a branch in addresses corresponding to a conditional branch instruction and detecting, recording, and displaying the addresses in debugging time. CONSTITUTION:The address of one next instruction to be executed when the conditional branch instruction branches and the address of the other next instruction to be executed when the conditional branch instruction does not branch are previously written to the addresses of a memory 10 of a recording part 6 corresponding to the addresses on the program of the conditional branch instruction. When the program to be debugged is to be executed, branch information read out from the memory 10 is compared with an instruction fetch address signal to be executed next by an instruction fetch address signal in comparators 11 and 12. Further, it is decided whether the conditional branch instruction branches or not, the execution record is stored in memories 15 and 16 according to the decided result, and the record is displayed on a data display part. Thus, the contents of the program can be recognized immediately after the program is executed.

Description

【発明の詳細な説明】 玖歪豆ヱ 本発明はプログラムデバッグ支援装置に関し、特にプロ
グラムの実行を記録することでプログラムデバッグの支
援を行うことにより、マイクロプロセッサのソフトウェ
ア開発支援を行うプログラムデバッグ支援装置に関する
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a program debugging support device, and more particularly to a program debugging support device that supports software development of a microprocessor by supporting program debugging by recording program execution. Regarding.

良氷韮韮 従来、この種のプログラムデバッグ支援装置においては
、マイクロプロセッサが命令をフェッチする際のアドレ
ス情報や、フェッチした命令コードを発生順に記録し、
マイクロプロセッサの実行後に記録した内容を表示する
ようになっていた。
Conventionally, in this type of program debugging support device, address information when a microprocessor fetches an instruction and the fetched instruction code are recorded in the order in which they occur.
The recorded contents were displayed after the microprocessor executed.

プログラムのデバッグにおいて、どのステップが未実行
であるか、あるいはプログラムに含まれる条件付きブラ
ンチ命令がブランチしたかどうかを知ることはデバッグ
を効果的に行う上で重要なことである。
In debugging a program, it is important to know which steps have not yet been executed or whether a conditional branch instruction included in the program has branched.

このような従来のプログラムデバッグ支援装置では、マ
イクロプロセッサが実行する命令コードやアドレスを発
生順に記録しているので、発生した全てのアドレスやブ
ランチ命令が実際に実行されたかどうかを知るには、記
録された内容を操作者自身がチエツクするか、あるいは
記録された内容をコンピュータなどの他の装置によって
編集処理を行う必要があり、プログラムの実行を記録し
た直後に直ちにその内容を知ることができないという欠
点がある。
Conventional program debugging support devices like this record the instruction codes and addresses that the microprocessor executes in the order in which they occur, so in order to know whether all the addresses and branch instructions that occurred were actually executed, The recorded contents must be checked by the operator himself, or the recorded contents must be edited by another device such as a computer, and the contents cannot be known immediately after recording the execution of the program. There are drawbacks.

凡肌ム旦」 本発明は上記のような従来のものの欠点を除去すべくな
されたもので、プログラムの実行を記録した直後に直ち
にその内容を知ることができ、プログラムのデバッグを
効率よく行うことができるプログラムデバッグ支援装置
の提供を目的とする。
The present invention was made in order to eliminate the drawbacks of the conventional ones as described above, and it is possible to know the contents immediately after recording the execution of a program, and debug the program efficiently. The purpose is to provide a program debugging support device that can.

1咀五旦羞 本発明によるプログラムデバッグ支援装置は、条件付き
ブランチ命令を含むプログラムのデバッグ時に該プログ
ラムの実行を記録するプログラムデバッグ支援装置であ
って、前記条件付きブランチ命令のアドレスに対応する
対応アドレスに、前記条件付きブランチ命令においてブ
ランチしたときに実行される次命令のアドレスを示す第
1のアドレスと、前記条件付きブランチ命令においてブ
ランチしなかったときに実行される次命令のアドレスを
示す第2のアドレスとを予め格納する格納手段と、前記
プログラムのデバッグ時に供給されるアドレスにより前
記格納手段の前記対応アドレスから読出される前記第1
および前記第2のアドレスにより前記条件付きブランチ
命令がブランチしたか否かを検出する検出手段と、前記
検出手段の検出結果に応じて前記条件付きブランチ命令
の実行情報を記録する記録手段と、前記記録手段に記録
された前記実行情報を表示する表示手段とを設けたこと
を特徴とする。
A program debugging support device according to the present invention is a program debugging support device that records the execution of a program including a conditional branch instruction when the program is debugged, and the program debugging support device records the execution of a program including a conditional branch instruction. The addresses include a first address indicating the address of the next instruction to be executed when the conditional branch instruction branches, and a second address indicating the address of the next instruction to be executed when the conditional branch instruction does not branch. a storage means for pre-storing a second address; and a storage means for storing the first address in advance from the corresponding address of the storage means according to the address supplied when debugging the program.
and a detection means for detecting whether or not the conditional branch instruction has branched based on the second address; and a recording means for recording execution information of the conditional branch instruction according to a detection result of the detection means; The present invention is characterized by further comprising a display means for displaying the execution information recorded in the recording means.

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

第1図は本発明の一実施例の構成を示すブロック図であ
る0図において、制御部1にはバス信号線100を介し
てプログラムメモリ部2と、操作パネル3と、データ入
力部4と、データ表示部5と、記録部6とが接続されて
おり、制御部1はバス信号線100を介してこれら各部
を制御する。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In FIG. , a data display section 5, and a recording section 6 are connected, and the control section 1 controls these sections via a bus signal line 100.

すなわち、制御部1内のマイクロプロセッサから送出さ
れるアドレス情報およびデータと、マイクロプロセッサ
に入力されるデータとがバス信号線100を介して転送
され、各部の制御が行われる。
That is, address information and data sent from the microprocessor in the control section 1 and data input to the microprocessor are transferred via the bus signal line 100 to control each section.

プログラムメモリ部2には制御プログラムが格納されて
おり、制御1部1内のマイクロプロセッサがバス信号線
100を介してプログラムメモリ部2からこの制御プロ
グラムを読出すことにより、該制御プログラムが実行さ
れる。
A control program is stored in the program memory section 2, and when the microprocessor in the control section 1 reads the control program from the program memory section 2 via the bus signal line 100, the control program is executed. Ru.

操作パネル3には記録動作および制御部1内のマイクロ
プロセッサによる制御動作を指示するための複数のスイ
ッチが設けられている。これらスイッチにより入力され
た指示情報はバス信号線100を介してマイクロプロセ
ッサに転送される。また、記録動作の指示は記録制御信
号線102を介して記録制御信号として記録部6に送出
される4デ一タ入力部4はデバッグ支援の対象となる被
デバツグプログラムに関するブランチアドレス情報を外
部の入力機器、たとえばフロッピディスク装置から入力
する。データ入力部4によって入力されたブランチアド
レス情報はバス信号線100を介して制御部1内のマイ
クロプロセッサに転送される。
The operation panel 3 is provided with a plurality of switches for instructing recording operations and control operations by the microprocessor in the control section 1. The instruction information input by these switches is transferred to the microprocessor via the bus signal line 100. Further, a recording operation instruction is sent to the recording unit 6 as a recording control signal via a recording control signal line 102.The four-data input unit 4 externally receives branch address information regarding the debugged program that is the target of debugging support. input from an input device such as a floppy disk device. The branch address information input by the data input section 4 is transferred to the microprocessor in the control section 1 via the bus signal line 100.

データ表示部5はバス信号線100を介して制御部1内
のマイクロプロセッサから転送されてきたデータを表示
する。すなわち、マイクロプロセッサが記録部6に記録
されたデータをバス信号線100を介して読取ることに
より、該データをデータ表示部5に表示することができ
る。
The data display section 5 displays data transferred from the microprocessor in the control section 1 via the bus signal line 100. That is, by the microprocessor reading the data recorded in the recording section 6 via the bus signal line 100, the data can be displayed on the data display section 5.

記録部6にはディジタル信号人力t1ioiを介して外
部から入力された記録すべきデータ、たとえば被デバツ
グプログラムが実行される際の命令フェッチアドレス信
号が記録される。この命令フェッチアドレス信号の記録
に際しては、制御部1内のマイクロプロセッサにデータ
入力部4から転送されたブランチアドレス情報が参照さ
れる。
The recording unit 6 records data to be recorded that is input from the outside via a digital signal t1ioi, such as an instruction fetch address signal when the program to be debugged is executed. When recording this instruction fetch address signal, the branch address information transferred from the data input section 4 to the microprocessor in the control section 1 is referred to.

第2図は第1図の記録部6の構成を示すブロック図であ
る0図において、メモリ10においてはセレクタ回路1
7からアドレス信号線112を介して送られてくるアド
レス情報によって指示された番地にデータ信号線113
を介して入力されたバス信号線100上のデータが書込
まれ、あるいは該番地からデータが読出される。
FIG. 2 is a block diagram showing the configuration of the recording section 6 of FIG. 1. In FIG.
7 via the address signal line 112 to the address specified by the data signal line 113.
Data on the bus signal line 100 input via the address is written, or data is read from the address.

ここで、メモリ10の各番地にはフィールドa。Here, each address of the memory 10 has a field a.

b、cの3つに分けられたデータが格納されており、フ
ィールドaのデータは信号線114を介して比較器11
.12に送出され、フィールドbのデータは信号線11
5を介して比較器11に送出され、フィールドCのデー
タは信号線116を介して比較器12に送出される。
Data divided into three parts b and c are stored, and the data of field a is sent to the comparator 11 via the signal line 114.
.. 12, and the data in field b is sent to the signal line 11.
The field C data is sent to the comparator 11 via the signal line 116.

比較器11はフィールドaのデータによってフィールド
b、cのデータが有効であることが示されているときに
、ディジタル信号入力線101を介して入力される外部
からの命令フェッチアドレス信号と、信号線115を介
して入力されるメモリ10からのフィールドbのデータ
との比較゛を行い、その比較結果が一致を示すときには
一致信号線117を介して一致信号をメモリ制御回路1
3に出力する。
When the data in field a indicates that the data in fields b and c are valid, the comparator 11 receives an external instruction fetch address signal input via the digital signal input line 101 and the signal line. 115, and when the comparison result indicates a match, a match signal is sent to the memory control circuit 1 via a match signal line 117.
Output to 3.

比較器12はフィールドaのデータによってフィールド
b、cのデータが有効であることが示されているときに
、ディジタル信号入力線101を介して入力される外部
からの命令フェッチアドレス信号と、信号線116を介
して入力されるメモリ10からのフィールドCのデータ
との比較を行い、その比較結果が一致を示すときには一
致信号線118を介して一致信号をメモリ制御回路14
に出力する。
When the data in field a indicates that the data in fields b and c are valid, the comparator 12 receives an external instruction fetch address signal input via the digital signal input line 101 and the signal line. 116, and when the comparison result indicates a match, a match signal is sent to the memory control circuit 14 via a match signal line 118.
Output to.

メモリ制御回路13は記録制御信号線102を介して入
力される記録制御信号が記録動作不可を示す場合には、
リードライト制御信号線119を介して入力されるバス
信号線100上のリードライト制御信号、すなわち制御
部1内のマイクロプロセッサからのリードライト制御信
号に応じてメモリ15に対する読出し書込み動作を制御
する。
When the recording control signal inputted via the recording control signal line 102 indicates that the recording operation is disabled, the memory control circuit 13
The read/write operation for the memory 15 is controlled in accordance with the read/write control signal on the bus signal line 100 input via the read/write control signal line 119, that is, the read/write control signal from the microprocessor in the control unit 1.

したがって、マイクロプロセッサがメモリ15に対して
リードを指示しているときには、メモリ制御回路13は
制御信号線121を介してメモリ15に対して読出し動
作を指示する。
Therefore, when the microprocessor instructs the memory 15 to read, the memory control circuit 13 instructs the memory 15 to perform a read operation via the control signal line 121.

マイクロプロセッサがメモリ15に対してライトを指示
しているときには、メモリ制御回路13は書込みデータ
線120を介してメモリ15へ初期値を送出するととも
に、制御信号線121を介してメモリ15に対して書込
み動作を指示する。
When the microprocessor instructs the memory 15 to write, the memory control circuit 13 sends an initial value to the memory 15 via the write data line 120 and also sends an initial value to the memory 15 via the control signal line 121. Instructs write operation.

また、メモリ制御回路13は記録制御信号線102を介
して入力された記録制御信号が記録動作可を示す場合に
は、一致信号線117を介して入力される比較器11か
らの一致信号に応じてメモリ15に対する読出し書込み
動作を制御する。
Furthermore, when the recording control signal inputted through the recording control signal line 102 indicates that recording is possible, the memory control circuit 13 responds to the coincidence signal from the comparator 11 inputted through the coincidence signal line 117. read/write operations to the memory 15 are controlled.

すなわち、比較器11が外部からの命令フェッチアドレ
ス信号とメモリ10からのフィールドbのデータとの一
致を検出したときには、メモリ制御回路13は書込みデ
ータ線120を介してメモリ15へ初期値とは異なる値
を送出するとともに、制御信号a121を介してメモリ
15に対して書込み動作を指示する。
That is, when the comparator 11 detects a match between the instruction fetch address signal from the outside and the data in field b from the memory 10, the memory control circuit 13 sends a value different from the initial value to the memory 15 via the write data line 120. In addition to sending out the value, it also instructs the memory 15 to perform a write operation via the control signal a121.

比較器11が外部からの命令フェッチアドレス信号とメ
モリ10からのフィールドbのデータとの一致を検出し
なかったときには、メモリ制御回路13はメモリ15に
対して読出し動作および書込み動作を指示しない。
When comparator 11 does not detect a match between the external instruction fetch address signal and the data in field b from memory 10, memory control circuit 13 does not instruct memory 15 to perform read or write operations.

メモリ制御回路14は記録制御信号線102を介して入
力された記録制御信号が記録動作不可を示す場合には、
リードライト制御信号線119を介して入力されるバス
信号線100上のリードライト制御信号、すなわち制御
部1内のマイクロプロセッサからのリードライト制御信
号に応じてメモリ16に対する読出し書込み動作を制御
する。
When the recording control signal inputted through the recording control signal line 102 indicates that the recording operation is disabled, the memory control circuit 14 performs the following operations.
The read/write operation for the memory 16 is controlled in accordance with the read/write control signal on the bus signal line 100 inputted via the read/write control signal line 119, that is, the read/write control signal from the microprocessor in the control unit 1.

したがって、マイクロプロセッサがメモリ16に対して
リードを指示しているときには、メモリ制御回路14は
制御信号線123を介してメモリ16に対して読出し動
作を指示し、マイクロプロセッサがメモリ16に対して
ライトを指示しているときには、メモリ制御回路14は
書込みデータ線122を介してメモリ16へ初期値を送
出するとともに、制御信号線123を介してメモリ16
に対して書込み動作を指示する。
Therefore, when the microprocessor instructs the memory 16 to read, the memory control circuit 14 instructs the memory 16 to read through the control signal line 123, and the microprocessor instructs the memory 16 to write. , the memory control circuit 14 sends the initial value to the memory 16 via the write data line 122 and also sends the initial value to the memory 16 via the control signal line 123.
Instructs write operation to.

また、メモリ制御回路14は記録制御信号線102を介
して入力された記録制御信号が記録動作可を示す場合に
は、一致信号線118を介して入力される比較器12か
らの一致信号に応じてメモリ16に対する読出し書込み
動作を制御する。
Furthermore, when the recording control signal inputted through the recording control signal line 102 indicates that recording is possible, the memory control circuit 14 responds to the coincidence signal from the comparator 12 inputted through the coincidence signal line 118. read/write operations to the memory 16 are controlled.

すなわち、比較器12が外部からの命令フェッチアドレ
ス信号とメモリ10からのフィールドCのデータとの一
致を検出したときには、メモリ制御回路14は書込みデ
ータ線122を介してメモリ16へ初期値とは異なる値
を送出するとともに、制御信号線123を介してメモリ
16に対して書込み動作を指示する。
That is, when the comparator 12 detects a match between the instruction fetch address signal from the outside and the data in field C from the memory 10, the memory control circuit 14 sends a value different from the initial value to the memory 16 via the write data line 122. It sends the value and also instructs the memory 16 to perform a write operation via the control signal line 123.

比較器12が外部からの命令フェッチアドレス信号とメ
モリ10からのフィールドCのデータとの一致を検出し
なかったときには、メモリ制御回路14はメモリ16に
対して読出し動作および書込み動作を指示しない。
When comparator 12 does not detect a match between the external instruction fetch address signal and the data in field C from memory 10, memory control circuit 14 does not instruct memory 16 to perform read or write operations.

メモリ15.16はアドレス信号線112を介して入力
されるセレクタ回路17からのアドレス情報によって指
示される番地においてメモリ制御回路13.14からの
指示により書込み動作または読出し動作を行う、メモリ
15.16から読出されたデータはデータ信号線124
を介してバス信号線100上に送出される。
The memory 15.16 performs a write operation or a read operation in response to an instruction from the memory control circuit 13.14 at an address specified by address information from the selector circuit 17 input via the address signal line 112. The data read from the data signal line 124
The signal is sent onto the bus signal line 100 via the bus signal line 100.

セレクタ回路17は記録制御信号線102を介して入力
された記録制御信号が記録動作不可を示す場合には、ア
ドレス信号線111を介して入力されるバス信号線10
0上のアドレス情報、すなわち制御部1内のマイクロプ
ロセッサからのアドレス情報を選択してアドレス信号線
112上に送出する。
When the recording control signal inputted via the recording control signal line 102 indicates that the recording operation is disabled, the selector circuit 17 selects the bus signal line 10 inputted via the address signal line 111.
0, that is, the address information from the microprocessor in the control section 1, is selected and sent onto the address signal line 112.

また、記録制御信号線102を介して入力された記録制
御信号が記録動作可を示す場合には、ラッチ18に保持
された外部からの命令フェッチアドレス信号を選択して
アドレス信号線112上に送出する。
Further, when the recording control signal inputted through the recording control signal line 102 indicates that recording is possible, the command fetch address signal from the outside held in the latch 18 is selected and sent onto the address signal line 112. do.

ラッチ18はディジタル信号入力線101を介して入力
された外部からの命令フェッチアドレス信号を受取り、
この命令フェッチアドレス信号を一時的に保持する。
The latch 18 receives an external instruction fetch address signal input via the digital signal input line 101,
This instruction fetch address signal is temporarily held.

第3図は第2図のメモリ10に予め格納されるデータを
示す図である0図において、フィールドaのデータはフ
ィールドb、cのデータが有効か否かを示す有効フラグ
であり、フィールドbのデータは条件付きブランチ命令
においてブランチしない場合に次に実行される命令のア
ドレス値であり、フィールドCのデータは条件付きブラ
ンチ命令においてブランチした場合に次に実行される命
令のアドレス値である。
FIG. 3 is a diagram showing data stored in advance in the memory 10 of FIG. 2. In FIG. The data in field C is the address value of the next instruction to be executed if the conditional branch instruction does not branch, and the data in field C is the address value of the next instruction to be executed if the conditional branch instruction branches.

これら第1図〜第3図を用いて本発明の一実施例の動作
について説明する。
The operation of one embodiment of the present invention will be explained using these FIGS. 1 to 3.

プログラムのデバッグ方法においては、プログラムのデ
バッグに使用するテストデータを多種、多量とすること
によって評価の度合いを高めることが一般的に行われて
いる。
In a program debugging method, it is common practice to increase the degree of evaluation by using a wide variety and large amount of test data to be used for program debugging.

しかしながら、このような方法ではプログラムの各部に
わたってデバッグされたかどうかを容易に判別すること
ができない。
However, with this method, it is not possible to easily determine whether each part of the program has been debugged.

プログラムは各種の条件付きブランチ命令を多数使用し
て作成されるのが一般的であるが、これらの条件付きブ
ランチ命令はプログラム実行時に外部から与えられるデ
ータおよびその処理結果をチエツクするものであり、こ
れらの条件付きブランチ命令がブランチする場合および
ブランチしない場合の全てにおいてプログラムの実行を
確認することがプログラムのデバッグを行う上で必要と
なる。
Programs are generally created using a large number of various conditional branch instructions, and these conditional branch instructions check the data and processing results provided from outside when the program is executed. In debugging a program, it is necessary to confirm program execution both when these conditional branch instructions branch and when they do not branch.

条件付きブランチ命令がブランチしたがどうかは、プロ
グラム実行時の命令フェッチアドレスをトレースし、条
件付きブランチ命令のプログラム上のアドレスとこの命
令の次に実行される2つの命令、すなわちブランチしな
い場合に次に実行される命令およびブランチした場合に
次に実行される命令のアドレスをチエツクすることによ
り判別することができる。
To determine whether a conditional branch instruction has branched, trace the instruction fetch address during program execution, and compare the program address of the conditional branch instruction and the two instructions to be executed next to this instruction, that is, the next instruction if no branch is taken. This can be determined by checking the address of the instruction that will be executed next and the address of the instruction that will be executed next when branching.

そこで、デバッグを行う被デバツグプログラムに関する
全ての条件付きブランチ命令各々に関して、プログラム
上のアドレス値と、ブランチしない場合に次に実行され
る命令のアドレス値と、ブランチした場合に次に実行さ
れる命令のアドレス値とを前もって準備し、これらのア
ドレス値をデータ入力部4から入力する。
Therefore, for each conditional branch instruction related to the debugged program to be debugged, the address value on the program, the address value of the next instruction to be executed if no branch is taken, and the next instruction to be executed if a branch is taken. The address values of the instructions are prepared in advance, and these address values are inputted from the data input section 4.

制御部1内のマイクロプロセッサはデータ入力部4から
転送されてきたこれらのアドレス値により、ブランチし
ない場合に次に実行される命令のアドレス値と、ブラン
チした場合に次に実行される命令のアドレス値と、それ
らのアドレス値が有効であることを示す有効フラグとを
1語のデータ(以下ブランチ情報とする)にまとめ上げ
る(第3図参照)。
The microprocessor in the control unit 1 uses these address values transferred from the data input unit 4 to determine the address value of the next instruction to be executed if no branch is taken, and the address of the next instruction to be executed if the branch is made. The values and a valid flag indicating that these address values are valid are compiled into one word of data (hereinafter referred to as branch information) (see FIG. 3).

次に、マイクロプロセッサはこのブランチ情報をバス信
号線100を介してメモリ10上に書込む。
The microprocessor then writes this branch information onto memory 10 via bus signal line 100.

このとき、このブランチ情報に対応する条件付きブラン
チ命令のプログラム上のアドレスと同一アドレスをメモ
リ10の書込みアドレスとする。
At this time, the same address as the program address of the conditional branch instruction corresponding to this branch information is set as the write address of the memory 10.

マイクロプロセッサは全ての条件付き゛ブランチ命令の
アドレス情報から夫々のブランチ情報をまとめ上げてメ
モリ10上に書込むと、メモリ制御回路13.14にメ
モリ15.16に対するライトを指示してメモリ15.
16を初期化する4実際のデバッグを実行するときには
、被デバツグプログラムを実行する装置(図示せず)の
命令フェッチアドレス信号をディジタル信号入力線10
1に接続し、操作パネル3のスイッチを操作して記録制
御信号線102を介して記録動作可の記録制御信号を記
録部6に出力する。
The microprocessor compiles each branch information from the address information of all the conditional branch instructions and writes it into the memory 10, and then instructs the memory control circuits 13.14 to write to the memory 15.16, and writes the information to the memory 15.16.
4. When performing actual debugging, the instruction fetch address signal of a device (not shown) that executes the program to be debugged is input to the digital signal input line 10.
1 and operates a switch on the operation panel 3 to output a recording control signal enabling recording operation to the recording section 6 via the recording control signal line 102.

これ以後、被デバツグプログラムの各命令がフェッチさ
れる毎に、命令フェッチアドレス信号がディジタル信号
入力線101を介してラッチ18に入力されて保持され
るとともに、ラッチ18に保持された命令フェッチアド
レス信号をアドレスとするメモリ10の内容が読出され
る。
From now on, each time each instruction of the program to be debugged is fetched, the instruction fetch address signal is input to the latch 18 via the digital signal input line 101 and held, and the instruction fetch address held in the latch 18 is The contents of the memory 10 using the signal as an address are read out.

このフェッチされた命令が条件付きブランチ命令のとき
には、メモリ10からブランチ情報が読出される。
When the fetched instruction is a conditional branch instruction, branch information is read from memory 10.

このとき、記録部6にはディジタル信号入力線101を
介して条件付きブランチ命令の次に実行される命令の命
令フェッチアドレス信号が入力されるので、この命令フ
ェッチアドレス信号とメモリ10から読出されたブラン
チ情報とが比較器1112で比較される。
At this time, since the instruction fetch address signal of the instruction to be executed next to the conditional branch instruction is input to the recording unit 6 via the digital signal input line 101, this instruction fetch address signal and the instruction fetch address signal read from the memory 10 A comparator 1112 compares the branch information with the branch information.

比較器11において一致が検出されたとき、すなわちブ
ランチしなかった場合には、メモリ制御回路13がメモ
リ15に対して書込み動作を指示し、メモリ15への書
込みが行われる。
When the comparator 11 detects a match, that is, when there is no branch, the memory control circuit 13 instructs the memory 15 to perform a write operation, and the memory 15 is written.

比較器12において一致が検出されたとき、すなわちブ
ランチした場合には、メモリ制御回路14がメモリ16
に対して書込み動作を指示し、メモリ16への書込みが
行われる。
When a match is detected in the comparator 12, that is, when a branch is detected, the memory control circuit 14 controls the memory 16.
A write operation is instructed to the memory 16, and writing to the memory 16 is performed.

したがって、メモリ15には条件付きブランチ命令がブ
ランチしなかったときの実行記録が残ることとなり、メ
モリ16にはブランチしたときの実行記録が残ることと
なる。
Therefore, an execution record when the conditional branch instruction did not branch remains in the memory 15, and an execution record when the conditional branch instruction branched remains in the memory 16.

メモリ15.16の内容表示を行うには、制御部1内の
マイクロプロセッサによってメモリ15゜16の内容が
読取られ、その内容がマイクロプロセッサからデータ表
示部5に送られて表示される。
To display the contents of the memories 15, 16, the contents of the memories 15, 16 are read by the microprocessor in the control section 1, and the contents are sent from the microprocessor to the data display section 5 for display.

これにより、被デバツグプログラムのデバッグが終了し
た時点で、条件付きブランチ命令の実行記録をデータ表
示部5に表示させて、デバッグの進行度を直ちに判別す
ることができる。
Thereby, when the debugging of the program to be debugged is completed, the execution record of the conditional branch instruction is displayed on the data display section 5, and the progress of debugging can be immediately determined.

このように、条件付きブランチ命令のプログラム上のア
ドレスに対応する記録部6のメモリ10の番地に、条件
付きブランチ命令がブランチしたときに次に実行される
命令のアドレスと、条件付きブランチ命令がブランチし
なかったときに次に実行される命令のアドレスとからな
るブランチ情報を予め書込んでおき、被デバツグプログ
ラムが実行される際の命令フェッチアドレス信号によっ
てメモリ10から読出されたブランチ情報と、次に実行
される命令フェッチアドレス信号とを比較器11.12
で比較して該条件付きブランチ命令がブランチしたか否
かを判定し、その判定結果に応じてその実行記録をメモ
リ15.16に記録し、メモリ15.16に記録された
内容をデータ表示部5に表示させるようにすることによ
って、プログラムの実行を記録した直後に直ちにその内
容を知ることができる。これにより、プログラムのデバ
ッグを効率よく行うことができる。
In this way, the address of the next instruction to be executed when the conditional branch instruction branches and the conditional branch instruction Branch information consisting of the address of the next instruction to be executed when the branch is not executed is written in advance, and the branch information is read from the memory 10 by the instruction fetch address signal when the program to be debugged is executed. , and the instruction fetch address signal to be executed next. Comparators 11.12
to determine whether the conditional branch instruction has branched or not, record the execution record in the memory 15.16 according to the determination result, and display the contents recorded in the memory 15.16 in the data display section. 5, the contents of the program can be immediately known immediately after the execution of the program is recorded. This allows programs to be debugged efficiently.

i肌Ω羞1 以上説明したように本発明によれば、プログラムに含ま
れる条件付きブランチ命令のアドレスに対応する対応ア
ドレスに、該条件付きブランチ命令においてブランチし
たときに実行される次命令のアドレスを示す第1のアド
レスと、該条件付きブランチ命令においてブランチしな
かったときに実行される次命令のアドレスを示す第2の
アドレスとを予め格納しておき、プログラムのデバッグ
時に供給されるアドレスにより予め格納しておいた第1
および第2のアドレスを読出して、これら第1および第
2のアドレスによって該条件付きブランチ命令がブラン
チしたか否かを検出し、その検出結果に応じて該条件付
きブランチ命令の実行情報を記録手段に記録し、この記
録手段に記録された実行情報を表示手段に表示するよう
にすることによって、プログラムの実行を記録した直後
に直ちにその内容を知ることができ、プログラムのデバ
ッグを効率よく行うことができるという効果がある。
As explained above, according to the present invention, the address of the next instruction to be executed when branching in the conditional branch instruction is set to the corresponding address corresponding to the address of the conditional branch instruction included in the program. A first address indicating the conditional branch instruction and a second address indicating the address of the next instruction to be executed when the conditional branch instruction does not branch are stored in advance. The first file stored in advance
and a second address, detects whether or not the conditional branch instruction branches based on the first and second addresses, and records execution information of the conditional branch instruction according to the detection result. By displaying the execution information recorded in the recording means on the display means, the contents of the program can be immediately known immediately after recording the execution of the program, and the program can be debugged efficiently. It has the effect of being able to.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は第1図の記録部の構成を示すブロック図、第3図
は第2図のメモリに予め格納されるデータを示す図であ
る。 主要部分の符号の説明 1・・・・・・制御部 4・・・・・・データ入力部 5・・・・・・データ表示部 6・・・・・・記録部 10.15.16・・・・・・メモリ 11.12・・・・・・比較器 13.14・・・・・・メモリ制御回路17・・・・・
・セレクタ回路 18・・・・・・ラッチ
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a block diagram showing the configuration of the recording section in FIG. 1, and FIG. 3 shows the data stored in advance in the memory in FIG. FIG. Explanation of symbols of main parts 1... Control section 4... Data input section 5... Data display section 6... Recording section 10.15.16. ...Memory 11.12...Comparator 13.14...Memory control circuit 17...
・Selector circuit 18...Latch

Claims (1)

【特許請求の範囲】[Claims] (1)条件付きブランチ命令を含むプログラムのデバッ
グ時に該プログラムの実行を記録するプログラムデバッ
グ支援装置であって、前記条件付きブランチ命令のアド
レスに対応する対応アドレスに、前記条件付きブランチ
命令においてブランチしたときに実行される次命令のア
ドレスを示す第1のアドレスと、前記条件付きブランチ
命令においてブランチしなかったときに実行される次命
令のアドレスを示す第2のアドレスとを予め格納する格
納手段と、前記プログラムのデバッグ時に供給されるア
ドレスにより前記格納手段の前記対応アドレスから読出
される前記第1および前記第2のアドレスにより前記条
件付きブランチ命令がブランチしたか否かを検出する検
出手段と、前記検出手段の検出結果に応じて前記条件付
きブランチ命令の実行情報を記録する記録手段と、前記
記録手段に記録された前記実行情報を表示する表示手段
とを設けたことを特徴とするプログラムデバッグ支援装
置。
(1) A program debugging support device that records the execution of a program that includes a conditional branch instruction when debugging the program, wherein the program debugging support device records the execution of the program when the program includes a conditional branch instruction, and the conditional branch instruction branches to a corresponding address corresponding to the address of the conditional branch instruction. storage means for storing in advance a first address indicating the address of the next instruction to be executed when the conditional branch instruction is executed; and a second address indicating the address of the next instruction to be executed when the conditional branch instruction does not branch; , detection means for detecting whether or not the conditional branch instruction branches based on the first and second addresses read from the corresponding address of the storage means according to the address supplied when debugging the program; Program debugging characterized by comprising: a recording means for recording execution information of the conditional branch instruction according to a detection result of the detection means; and a display means for displaying the execution information recorded in the recording means. Support equipment.
JP63263485A 1988-10-19 1988-10-19 Program debugging supporting device Pending JPH02110637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63263485A JPH02110637A (en) 1988-10-19 1988-10-19 Program debugging supporting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63263485A JPH02110637A (en) 1988-10-19 1988-10-19 Program debugging supporting device

Publications (1)

Publication Number Publication Date
JPH02110637A true JPH02110637A (en) 1990-04-23

Family

ID=17390168

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63263485A Pending JPH02110637A (en) 1988-10-19 1988-10-19 Program debugging supporting device

Country Status (1)

Country Link
JP (1) JPH02110637A (en)

Similar Documents

Publication Publication Date Title
JPH11110255A (en) Software debugging device and method
JPS60159951A (en) Tracing system in information processing device
JPH02110637A (en) Program debugging supporting device
US5901300A (en) Control store address stop
JPS59183443A (en) Debug device
JP2684966B2 (en) I / O processor debug device
JPS5829056A (en) Control storage device
JPH0588946A (en) History memory write system
JP2000222243A (en) Device and method for debugging
JPS5856159A (en) Firmware tester
JPS59158449A (en) Debugging device
JPS5822765B2 (en) Program loading method in electronic computer system
JPS6238746B2 (en)
JP2000057012A (en) Trace device
JPS5995658A (en) Program development assisting device
JPS6170644A (en) Program debugging system
JPH02166531A (en) Microprogram verifying system
JPH04268640A (en) Program loading system
JPH02155052A (en) Tracing device
JPH0325631A (en) Microprogram controller
JPS6375848A (en) Debugging log recording system
JPS61231633A (en) Microprocessor
JPS62111336A (en) Debugging system
JPH0373035A (en) Debugging device
JPH10177505A (en) Emulator device