JPH01144135A - System for observing program executing process - Google Patents

System for observing program executing process

Info

Publication number
JPH01144135A
JPH01144135A JP62303540A JP30354087A JPH01144135A JP H01144135 A JPH01144135 A JP H01144135A JP 62303540 A JP62303540 A JP 62303540A JP 30354087 A JP30354087 A JP 30354087A JP H01144135 A JPH01144135 A JP H01144135A
Authority
JP
Japan
Prior art keywords
program
address
memory
data
register
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
JP62303540A
Other languages
Japanese (ja)
Inventor
Kiyoshi Yoneda
潔 米田
Norio Ohashi
大橋 範夫
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 JP62303540A priority Critical patent/JPH01144135A/en
Publication of JPH01144135A publication Critical patent/JPH01144135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To omit an external memory which stores the program observing results by reading freely reading the address and the data which are used by the instruction carried out immediately before a single step interruption within an interruption processing program. CONSTITUTION:A CPU1 contains register groups 3-6 which hold the address and data carried out right before a single step interruption. In this case, the addresses fetched by an input origin address latch register group 3 and an output destination address latch register group 5 include the memory address, the register number address, the input/output device address, and the information which discriminates these three types of addresses. Then an interruption processing program 12 of an internal memory 10 prepares the instructions which refer to those register groups 3-6 and carries out these instructions for observation of the executing process of a program to be debugged. Thus an external memory which stores the program observing results is eliminated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプログラム実行過程観測方式に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program execution process observation method.

〔従来の技術〕[Conventional technology]

従来、プログラムの実行過程を観測するためには、中央
処理装置とメモリおよび周辺装置間で授受されるアドレ
スやデータや各種の制御信号を観測する装置と、その観
測結果を蓄積するための外部メモリを使用している。外
部メモリに蓄積されるこれらの情報は、その順序に大き
な自由度が与えられているため、後で解析することによ
りプログラムの実行過程を再構成している。
Conventionally, in order to observe the execution process of a program, it is necessary to have a device that monitors addresses, data, and various control signals exchanged between the central processing unit, memory, and peripheral devices, and an external memory that stores the observation results. are using. Since this information stored in the external memory has a large degree of freedom in its order, the program execution process can be reconstructed by analyzing it later.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来方式は、制御信号を観測する装置と観測結
果を蓄積するための外部メモリが必要であるという欠点
があり、プログラムの実行過程を再構成するのに手間が
かかるという欠点がある。
The conventional method described above has the disadvantage that it requires a device for observing control signals and an external memory for storing observation results, and it takes time and effort to reconstruct the program execution process.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のプログラム実行過程観測方式は、シングルステ
ップ割込の直前にデバッグ対象プログラムが実行した命
令で使用したアドレスとデータを区別して格納する記憶
手段を内部メモリまたは中央処理装置内に設け、シング
ルステップ割込をされたデバッグプログラムに対して記
憶手段を参照できる命令を用意し、デバッグプログラム
がこの命令を実行することにより、デバッグ対象プログ
ラムの実行過程を観測するようにしたことを特徴とする
The program execution process observation method of the present invention provides storage means in an internal memory or central processing unit to distinguish and store addresses and data used in instructions executed by the program to be debugged immediately before a single-step interrupt. The present invention is characterized in that an instruction that can refer to a storage means is prepared for the interrupted debug program, and the debug program executes this instruction to observe the execution process of the program to be debugged.

〔実施例〕〔Example〕

次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例を示すブロック図であり、中
央処理装置1の中に、汎用レジスタ2゜状態レジスタ8
.プログラムカウンタ9の他に、入力元アドレスラッチ
レジスタ群3.入力データラッチレジスタ群4.出刃先
アドレスラッチレジスタ群5および出力データラッチレ
ジスタ群6を用意する。
FIG. 1 is a block diagram showing an embodiment of the present invention, in which a central processing unit 1 includes a general-purpose register 2, a status register 8, and a state register 8.
.. In addition to the program counter 9, the input source address latch register group 3. Input data latch register group 4. A cutting edge address latch register group 5 and an output data latch register group 6 are prepared.

これらのレジスタ群3〜6は、シングルステップ割込の
直前に実行した命令で使用したアドレスおよびデータを
保持するレジスタ群である。ここで、入力元アドレスラ
ッチレジスタ群3と出刃先アドレスラッチレジスタ群5
に取り込まれるアドレスには、メモリアドレス、レジス
タ番号、入出力装置アドレスおよびこれら3種類のアド
レスを区別する情報を含む。
These register groups 3 to 6 are a register group that holds addresses and data used in the instruction executed immediately before the single step interrupt. Here, input source address latch register group 3 and cutting edge address latch register group 5
The addresses taken in include memory addresses, register numbers, input/output device addresses, and information that distinguishes these three types of addresses.

メモリ10は内部メモリであり、デバッグの対象となる
プログラム7と、デバッガとなる割込処理プログラム1
2とスタック11を含み、割込処理プログラム12には
レジスタ群3〜6のそれぞれを参照する命令を用意する
The memory 10 is an internal memory, and stores a program 7 to be debugged and an interrupt processing program 1 serving as a debugger.
2 and a stack 11, and the interrupt processing program 12 is provided with instructions that refer to each of the register groups 3 to 6.

次に本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

プログラム7においては、1つの命令を実行すると、必
ずその直後に割込処理プログラム12に割込(以下シン
グルステップ割込と記す)を起すことを保証する状態(
以下トレース状態と記す)になる。そして実際にシング
ルステップ割込が起きると、中央処理装置1は、シング
ルステップ割込の直前に実行した命令のアドレス、トレ
ース状態であることを示すフラグ(以下トレースフラグ
と記す)を持つ状態レジスタ8の値およびその時のプロ
グラムカウンタ9の値をメモリ10内のスタック11に
退避させ、状態レジスタ8内のトレースフラグの値を非
トレース状態にし、割込処理プログラム12を実行する
In program 7, when one instruction is executed, a state (
(hereinafter referred to as trace state). When a single-step interrupt actually occurs, the central processing unit 1 stores the address of the instruction executed immediately before the single-step interrupt, and a status register 8 containing a flag indicating that the trace status is in progress (hereinafter referred to as a trace flag). and the value of the program counter 9 at that time are saved in the stack 11 in the memory 10, the value of the trace flag in the status register 8 is set to the non-trace state, and the interrupt processing program 12 is executed.

また、このとき、シングルステップ割込の直前に実行し
た命令で読み込んだデータのアドレスを入力元アドレス
ラッチレジスタ群3に、読み込んだデータの内容を入力
デークラッチレジスタ群4に、書き込みを行ったアドレ
スを出刃先アドレスラッチレジスタ群5に、書き込んだ
データの内容を出力データラッチレジスタ群6にそれぞ
れ格納する。
Also, at this time, the address of the data read by the instruction executed immediately before the single step interrupt is stored in the input source address latch register group 3, and the content of the read data is stored in the input data latch register group 4, at the writing address. The contents of the written data are stored in the cutting edge address latch register group 5 and the output data latch register group 6, respectively.

書き込みを行ったアドレスと書き込んだデータは、書き
込みがプログラムの転機となるため、特に重要であるの
で、これのみの格納だけでもデバッグ上有意義であるこ
とが多い。
The written address and the written data are particularly important because writing is a turning point in the program, so storing only these is often meaningful for debugging.

割込処理プログラム12内では、前述の命令によりレジ
スタ群3〜6およびスタック11を参照することは自由
であり、このような動作により、例えば出刃先アドレス
ラッチレジスタ群5の内容をデイスプレィ表示したりし
てプログラム7のデバッグを行なう。
Within the interrupt processing program 12, register groups 3 to 6 and the stack 11 can be freely referenced by the above-mentioned commands, and by such operations, for example, the contents of the cutting edge address latch register group 5 can be displayed on the display. and debug program 7.

割込処理プログラム12内で、割込から復帰する命令を
実行すると、状態レジスタ8およびプログラムカウンタ
9の値をスタック11から回復させる。よって、スタッ
クll内に退避しである状態レジスタのトレースフラグ
の値が変化していなければ、割込まれたプログラム7に
トレース状態で戻ることになる。
When an instruction to return from an interrupt is executed in the interrupt processing program 12, the values of the status register 8 and the program counter 9 are recovered from the stack 11. Therefore, if the value of the trace flag of the status register saved in the stack 11 has not changed, the program returns to the interrupted program 7 in the trace state.

なお、以上の実施例においては、読み込んだデータのア
ドレス、読み込んだデータ、書き込みを行ったアドレス
および書き込んだデータを中央処理装置1内に格納した
が、これらの情報をメモリ10内に格納するようにして
もよいし、またスタック11の代りに、汎用レジスタ2
.状態レジスタ8およびプログラムカウンタ9の内容を
格納するレジスタを中央処理装置1内に設けるようにし
てもよい。
In the above embodiment, the address of the read data, the read data, the write address, and the written data are stored in the central processing unit 1, but it is also possible to store these information in the memory 10. Also, instead of stack 11, general-purpose register 2
.. A register for storing the contents of the status register 8 and the program counter 9 may be provided in the central processing unit 1.

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

以上で説明したように本発明は、シングルステップ割込
の直前に実行した命令で使用したアドレスとデータを、
割込処理プログラム内で自由に読み出せるので、プログ
ラムの観測結果を情報処理装置内のメモリまたは中央処
理装置内に蓄積することができ、特別な装置や外部メモ
リを必要としない効果がある。
As explained above, the present invention saves the address and data used in the instruction executed immediately before a single-step interrupt.
Since it can be freely read within the interrupt processing program, the observation results of the program can be stored in the memory within the information processing device or within the central processing unit, which has the effect of not requiring any special equipment or external memory.

また、アドレスとデータが種別毎に区別されて格納され
るため、プログラムの実行過程を容易に再構成できると
いう効果がある。
Furthermore, since addresses and data are stored separately for each type, there is an advantage that the program execution process can be easily reconfigured.

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

第1図は本発明の一実施例のブロック図である。 1・・・中央処理装置、2・・・汎用レジスタ、3・・
・入力元アドレスラッチレジスタ群、4・・・入力デー
タラッチレジスタ群、5・・・出刃先アドレスラッチレ
ジスタ群、6・・・出力データラッチレジスタ群、7・
・・プログラム、8・・・状態レジスタ、9・・・プロ
グラムカウンタ、10・・・メモリ、11・・・スタッ
ク、12・・・割込処理プログラム。
FIG. 1 is a block diagram of one embodiment of the present invention. 1...Central processing unit, 2...General-purpose register, 3...
- Input source address latch register group, 4... Input data latch register group, 5... Cutting edge address latch register group, 6... Output data latch register group, 7.
...Program, 8...Status register, 9...Program counter, 10...Memory, 11...Stack, 12...Interrupt processing program.

Claims (2)

【特許請求の範囲】[Claims] (1)シングルステップ割込の直前にデバッグ対象プロ
グラムが実行した命令で使用したアドレスとデータを区
別して格納する記憶手段を内部メモリまたは中央処理装
置内に設け、前記シングルステップ割込をされたデバッ
グプログラムに対して前記記憶手段を参照できる命令を
用意し、前記デバッグプログラムが該命令を実行するこ
とにより、前記デバッグ対象プログラムの実行過程を観
測するようにしたことを特徴とするプログラム実行過程
観測方式。
(1) A storage means is provided in the internal memory or central processing unit to separately store the address and data used in the instruction executed by the program to be debugged immediately before the single-step interrupt, and debugging after the single-step interrupt is performed. A program execution process observation method characterized in that an instruction that can refer to the storage means is provided for the program, and the debug program executes the instruction to observe the execution process of the program to be debugged. .
(2)シングルステップ割込の直前にデバッグ対象プロ
グラムが実行した命令で書き込み動作を行つたアドレス
とデータを前記記憶手段に格納するようにしたことを特
徴とする特許請求の範囲第(1)項のプログラム実行過
程観測方式。
(2) Claim (1) characterized in that the address and data for which a write operation was performed by an instruction executed by the program to be debugged immediately before a single-step interrupt are stored in the storage means. A method for observing the program execution process.
JP62303540A 1987-11-30 1987-11-30 System for observing program executing process Pending JPH01144135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62303540A JPH01144135A (en) 1987-11-30 1987-11-30 System for observing program executing process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62303540A JPH01144135A (en) 1987-11-30 1987-11-30 System for observing program executing process

Publications (1)

Publication Number Publication Date
JPH01144135A true JPH01144135A (en) 1989-06-06

Family

ID=17922225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62303540A Pending JPH01144135A (en) 1987-11-30 1987-11-30 System for observing program executing process

Country Status (1)

Country Link
JP (1) JPH01144135A (en)

Similar Documents

Publication Publication Date Title
JPS5886648A (en) Tracing device
JPH03248244A (en) Processor provided with cache memory
JP2003508864A (en) Thread-oriented debugging
CN102467444A (en) Simulation debugging system for special function register
JPH01144135A (en) System for observing program executing process
JPS60159951A (en) Tracing system in information processing device
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JPH0581087A (en) Processor monitoring system
JPH02118733A (en) System for controlling execution of task
JPS605355A (en) Program route recording device
JPH02281341A (en) Write data confirming method for debugging
JPS609294B2 (en) Tracing method in electronic computers
JP2742306B2 (en) emulator
JPS59202546A (en) Debugging device
JPS62109140A (en) Tracing circuit for program processor
JPH0444973B2 (en)
JPS59202550A (en) Debugging device
JPH03194625A (en) Address tracing system for information processor
JPS626341A (en) Information processor
JPS61188622A (en) Data displaying circuit
JPS58125154A (en) State hysteresis storing system
JPH01175646A (en) Storage device with history function
JPS5850051A (en) Program execution tracing system for debugging
JPS6170644A (en) Program debugging system
JPH0264828A (en) Address trace circuit