JPH04157537A - Address trap system - Google Patents

Address trap system

Info

Publication number
JPH04157537A
JPH04157537A JP2283906A JP28390690A JPH04157537A JP H04157537 A JPH04157537 A JP H04157537A JP 2283906 A JP2283906 A JP 2283906A JP 28390690 A JP28390690 A JP 28390690A JP H04157537 A JPH04157537 A JP H04157537A
Authority
JP
Japan
Prior art keywords
task
address
executed
register
address information
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
JP2283906A
Other languages
Japanese (ja)
Inventor
Megumi Kuwaki
桑木 めぐみ
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 JP2283906A priority Critical patent/JPH04157537A/en
Publication of JPH04157537A publication Critical patent/JPH04157537A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To enable debugging wherein a task is specified even by a microcomputer system which operates under a multitask operating system by comparing the number of a task in execution with a register which has a task number. CONSTITUTION:In the multiple virtual space of the microcomputer equipped with a means which discriminates the task in execution, sessions 0-4 of 0-4 GB are divided into sessions 0-2GB for tasks, a shared utility session 3GB, and an OS residence session 4GB, which are used by tasks 0-4. A system like this compares the address of an instruction to be executed with set address information and also compares the number of the task in execution with the set task number. Consequently, the debugging of a specified task becomes possible even by the microcomputer system which operates under the multitask operating system.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、マルチタスク下で動作するマイクロコンピュ
ータシステムのデバッキングに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to debugging a microcomputer system operating under multitasking.

〔従来の技術〕[Conventional technology]

マイクロコンピュータの応用製品を開発するに当たって
、最も困難な作業の一つはソフトウェアデバッグである
One of the most difficult tasks in developing microcomputer application products is software debugging.

従来、マイクロコンピュータシステムのデバッキングに
は、マルチタスク環境、シングルタスク環境に拘らずソ
フトウェアデバッガが使用されてきた。このソフトウェ
アデバッガは、アドレス情報を持つレジスタと、実行し
ようとする命令のアドレスと前記アドレス情報とを比較
する比較器とを備え、2つのアドレスが一致した場合に
、そのプログラム割り込みを発生できるようになってい
る。
Conventionally, software debuggers have been used for debugging microcomputer systems, regardless of whether the environment is a multi-task environment or a single-task environment. This software debugger is equipped with a register containing address information and a comparator that compares the address of the instruction to be executed with the address information, so that when the two addresses match, a program interrupt can be generated. It has become.

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

このマルチタスク環境において従来技術によって共有コ
ード上に設定されたブレークポイントは、次のような問
題を含んでいる。
Breakpoints set on shared code by the prior art in this multitasking environment include the following problems.

<1)タスク指定ができないので、実行中のタスクに拘
らず、プログラムが指定する命令コードに到着するとブ
レークをおこす。
<1) Since tasks cannot be specified, a break occurs when the program reaches the specified instruction code, regardless of the task being executed.

(2)ソフトウェア命令を埋め込むため、ROM化され
たプログラムのデバッグができない。
(2) Since software instructions are embedded, it is not possible to debug programs stored in ROM.

本発明の目的は、このような問題を解決し、実行中のタ
スク番号とタスク番号を持つレジスタとを比較すること
により、マルチタスク下で動作するマイクロコンピュー
タシステムにおいてもタスクを指定したデバッグが可能
であるようにしたアドレストラップ方式を提供すること
にある。
The purpose of the present invention is to solve such problems and to enable debugging by specifying a task even in a microcomputer system operating under multitasking by comparing the task number being executed and the register containing the task number. An object of the present invention is to provide an address trap method that achieves the following.

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

本発明の構成は、実行中のタスクを識別する手段を備え
るマイクロコンピュータのアドレストラップ方式におい
て、アドレス情報を持つ第1のレジスタと、この第1の
レジスタのアドレス情報と実行しようとする命令のアド
レスとを比較する第1の比較器と、タスク番号を持つ第
2のレジスタと、この第2のレジスタのタスク番号と実
行中のタスク番号とを比較する第2の比較器とを備え、
これら第1.第2の比較器の出力値によってプログラム
割り込みを発生できるようにしたことを特徴とする。
The configuration of the present invention provides an address trap system for a microcomputer that includes means for identifying a task being executed. a second register having a task number; and a second comparator that compares the task number in the second register with the task number being executed;
These first. The present invention is characterized in that a program interrupt can be generated based on the output value of the second comparator.

〔実施例〕〔Example〕

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

第1図は本発明の第1の実施例のアドレストラップ方式
のソフトウェアデバッグ時におけるプログラム割込みの
発生の流れ図である。本実施例は、従来例に対してレジ
スタへのタスク番号設定と、この設定されたタスク番号
と実行中のタスク番号とを比較する比較器が追加されて
いる。
FIG. 1 is a flow chart of the generation of a program interrupt during address trap type software debugging according to the first embodiment of the present invention. In the present embodiment, compared to the conventional example, a task number is set in a register, and a comparator is added that compares the set task number with the task number being executed.

第2図は第1図の実行中のタスクを識別する手段を備え
るマイクロコンピュータの多重仮想空間の構成図である
。0〜4GBのセクション0〜4は、タスク用セクショ
ン(0〜2GB)、共有ユーティリティセクション(3
GB)、O3常駐セクション(4GB)に分けられ、こ
れらをタスク0〜4で使用される。斜線部分が、タスク
2から見える仮想アドレス空間となる。
FIG. 2 is a configuration diagram of a multiple virtual space of a microcomputer provided with means for identifying the task being executed in FIG. 1. Sections 0 to 4 of 0 to 4 GB are task sections (0 to 2 GB), shared utility sections (3
GB), and an O3 resident section (4 GB), which are used by tasks 0 to 4. The shaded area is the virtual address space visible to task 2.

通常、マルチタスキングを行なっている仮想記憶システ
ムでは、各々のタスク毎に独立した仮想アドレス空間を
与え、自タスクのみがシステム内で走行しているかのよ
うに見せている。このようなシステムでは、各々のタス
クに独立に存在するアドレス域が必要であると同時に、
オペレーティング・システムのような全てのタスクに共
通したサービスを提供するプログラムを使用するために
、各々のタスクに共通したアドレス域も必要である。
Normally, in a virtual memory system that performs multitasking, each task is given an independent virtual address space, making it appear as if only the own task is running within the system. In such a system, each task requires an independent address area, and at the same time
Address areas common to each task are also required to use programs that provide services common to all tasks, such as an operating system.

従来使用されてきたソフトウェアデバッガでは、タスク
固有のアドレス域にブレークポイントを設定した場合に
は、設定したアドレス情報実行時にはデバッグしたいタ
スクが実行中であるので問題はない、しかし、タスク間
の共有アドレス域にブレークポイントを設定する場合に
は、実行中のタスクがデバッグしたいタスクであるとは
限らず、デバッグするタスクの指定ができなかった。
With conventional software debuggers, if you set a breakpoint in a task-specific address area, there is no problem because the task you want to debug is running when the set address information is executed. When setting a breakpoint in an area, the task being executed was not necessarily the task you wanted to debug, and it was not possible to specify the task to debug.

第1図において、マルチタスク下で動作するマイクロコ
ンピュータシステムのデバッグの流れを説明する。プロ
グラム割り込みを発生させるアドレス情報及びタスク番
号を、ステップ11のアドレス情報設定処理とステップ
12のタスク番号設定処理により、あらかじめ第1.第
2のレジスタに設定する。次に、ステップ13でアドレ
ス情報比較器により比較を行い、実行しようとする命令
のアドレスとステップ11のアドレス情報設定処理によ
って第1のレジスタに設定されたアドレス情報とを比較
する。このステップ13で2つのアドレス情報が一致し
なければ、ステップ15でアドレス情報が一致するまで
1行プログラム実行処理で、1行ずつプログラムを実行
する。アドレス情報が一致したら、ステップ14に進み
、タスク番号比較器により比較を行い、マイクロコンピ
ュータ内で識別される実行中のタスク番号とステップ1
2のタスク番号設定処理によって第2のレジスタに設定
されたタスク番号とを比較する。2つのタスク番号が一
致しなければ、ふたたびステップ15で1行プログラム
実行処理で1行ずつプログラムを実行する。タスク番号
が一致した場合は、ステップ16のブレーク処理により
ブレークをおこす。
Referring to FIG. 1, the flow of debugging a microcomputer system operating under multitasking will be explained. The address information and task number for generating a program interrupt are set in advance by the address information setting process in step 11 and the task number setting process in step 12. Set in the second register. Next, in step 13, the address information comparator performs a comparison, and compares the address of the instruction to be executed with the address information set in the first register by the address information setting process in step 11. If the two pieces of address information do not match in step 13, the program is executed line by line in a one-line program execution process until the address information matches in step 15. If the address information matches, the process proceeds to step 14, where the task number comparator compares the currently executing task number identified within the microcomputer with step 1.
The task number set in the second register by the second task number setting process is compared. If the two task numbers do not match, the program is executed line by line again in step 15 using the one line program execution process. If the task numbers match, a break is caused by the break process in step 16.

以上の説明により、本実施例のアドレストラップ方式は
、マルチタスク下で動作するマイクロコンピュータシス
テムのデバッグを可能にする。
As explained above, the address trap method of this embodiment enables debugging of a microcomputer system operating under multitasking.

次に、本発明の第2の実施を第1区を用いて説明する。Next, a second implementation of the present invention will be explained using the first section.

第1の実施例では、デバッグするタスクの指定を可能と
したが、本実施例では、プログラム割り込みをタスク番
号のみで発生させる。また、アドレス情報のみで割り込
みを発生させる。
In the first embodiment, it was possible to specify the task to be debugged, but in this embodiment, a program interrupt is generated only by the task number. Also, an interrupt is generated only with address information.

まず、前者の流れを説明する。プログラム割り込みを発
生させるタスク番号を、ステップ12のタスク番号設定
処理により、あらかじめ第2のレジスタに設定する。次
に、ステップ14でタスク番号比較器により、実行中の
タスク番号とステップ12のタスク番号設定処理によっ
て第2のレジスタに設定されたタスク番号とを比較する
。2つのタスク番号が一致するまで、ステップ15の1
行プログラム処理で1行ずつプログラムを実行する。タ
スク番号が一致した場合は、ステップ16のブレーク処
理によりブレークをおこす。指定タスクの先頭でブレー
クをおこし、実行しようとする命令のアドレスをたどれ
は、タスク自身のデバッグが行える。
First, the flow of the former will be explained. The task number for generating a program interrupt is set in advance in the second register by the task number setting process in step 12. Next, in step 14, the task number comparator compares the task number being executed with the task number set in the second register by the task number setting process in step 12. 1 in step 15 until the two task numbers match.
Execute the program line by line using line program processing. If the task numbers match, a break is caused by the break process in step 16. You can debug the task itself by causing a break at the beginning of the specified task and tracing the address of the instruction to be executed.

次に、後者の流れを説明する1、ステップ11でプログ
ラム割り込みを発生させるアドレス情報を、アドレス番
号設定処理により、あらかじめ第1のレジスタに設定す
る。設定するアドレス情報はタスク間の共有アドレスで
あり、実行しようとする命令のアドレスとレジスタの共
有アドレス情報とをステップ13でアドレス情報比較器
で比較する。2つのアドレス情報が一致するまで、ステ
ップ15の1行プログラム処理で1行ずつプログラムを
実行する。アドレス情報が一致した場合は、ステップ1
6でブレーク処理によりブレークをおこす。
Next, in step 11 to explain the latter flow, address information for generating a program interrupt is set in advance in the first register by address number setting processing. The address information to be set is a shared address between tasks, and the address of the instruction to be executed and the shared address information of the register are compared in step 13 by an address information comparator. The program is executed line by line in the single line program processing in step 15 until the two pieces of address information match. If the address information matches, step 1
A break is caused by break processing at step 6.

共有アドレス情報でブレークをおこし、実行中のタスク
番号を確認すれば、すべてのタスクに共通するオペレー
ティング・システムのようなプログラムのデバッグが行
える。
By triggering a break using shared address information and checking the running task number, you can debug programs such as operating systems that are common to all tasks.

以上の説明により、このアドレストラップ方式はマルチ
タスク下で動作するマイクロコンピュータシステムにお
いて、指定タスクのデバッグやデパック中のタスクの識
別を可能にする。
As explained above, this address trap method enables debugging of a designated task and identification of a task being depacked in a microcomputer system operating under multitasking.

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

以上説明したように本発明は、実行しようとする命令の
アドレスと設定アドレス情報との比較と、実行中のタス
ク番号と設定タスク番号との比較を行うので、これら2
つの比較結果より、マルチタスク下で動作するマイクロ
コンピュータシステムにおけるデバッグするタスクの指
定や、デバッグ中のタスクの識別を可能にすることがで
きるという効果がある。
As explained above, the present invention compares the address of the instruction to be executed with the set address information, and compares the task number being executed with the set task number.
From the results of the two comparisons, it is possible to specify a task to be debugged in a microcomputer system operating under multitasking and to identify the task being debugged.

【図面の簡単な説明】 第1図は本発明の一実施例のアドレストラップ方式の割
り込み発生時の流れ図、第2図は第1図の実行中のタス
クを識別する手段を備えるマイクロコンピュータの多重
仮想空間の構成図である。 11・・・レジスタへのアドレス情報設定処理、12・
・・レジスタへのタスク番号設定処理、13・・・アド
レス情報比較器、14・・・タスク番号比較器、15・
・・1行プログラム実行処理、16・・・ブレーク処理
[BRIEF DESCRIPTION OF THE DRAWINGS] FIG. 1 is a flowchart when an interrupt occurs using the address trap method according to an embodiment of the present invention, and FIG. FIG. 2 is a configuration diagram of a virtual space. 11...Address information setting process to register, 12.
... Task number setting process to register, 13... Address information comparator, 14... Task number comparator, 15.
...One-line program execution processing, 16...Break processing.

Claims (1)

【特許請求の範囲】[Claims] 実行中のタスクを識別する手段を備えるマイクロコンピ
ュータのアドレストラップ方式において、アドレス情報
を持つ第1のレジスタと、この第1のレジスタのアドレ
ス情報と実行しようとする命令のアドレスとを比較する
第1の比較器と、タスク番号を持つ第2のレジスタと、
この第2のレジスタのタスク番号と実行中のタスク番号
とを比較する第2の比較器とを備え、これら第1、第2
の比較器の出力値によってプログラム割り込みを発生で
きるようにしたことを特徴とするアドレストラップ方式
In an address trap method for a microcomputer that includes means for identifying a task being executed, a first register having address information, and a first register that compares the address information of the first register with the address of an instruction to be executed. a comparator for and a second register with a task number;
a second comparator that compares the task number in the second register with the task number being executed;
An address trap method characterized in that a program interrupt can be generated based on the output value of the comparator.
JP2283906A 1990-10-22 1990-10-22 Address trap system Pending JPH04157537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2283906A JPH04157537A (en) 1990-10-22 1990-10-22 Address trap system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2283906A JPH04157537A (en) 1990-10-22 1990-10-22 Address trap system

Publications (1)

Publication Number Publication Date
JPH04157537A true JPH04157537A (en) 1992-05-29

Family

ID=17671719

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2283906A Pending JPH04157537A (en) 1990-10-22 1990-10-22 Address trap system

Country Status (1)

Country Link
JP (1) JPH04157537A (en)

Similar Documents

Publication Publication Date Title
EP0638864B1 (en) Development support system for microcomputer with internal cache
JPH04157537A (en) Address trap system
JPH0675820A (en) Interruption device in multi-processor system
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JP2653412B2 (en) How to set breakpoints
JPH03113648A (en) Program debug system
JP2653411B2 (en) How to set breakpoints
JPS60124746A (en) Data processing unit
JP2590154B2 (en) Program debug support device for parallel processor
JPS5842891B2 (en) Meirei Seigiyohoushiki
JPH02109146A (en) Program debugging device
JP2808558B2 (en) Information processing device
JPH0465729A (en) Symbolic debugger
KR920003909B1 (en) Debugging supporting circuit
JPS61180344A (en) Step execution system for high level language
JPH02135545A (en) Execution control processing system for debugger
JPS59183443A (en) Debug device
JPS63104151A (en) Microprocessor containing tracing function
JPS63639A (en) Program debugging system
JPS6376053A (en) Multicomputer equipment
JPH0772874B2 (en) Interrupt receiving device
JPH03201135A (en) Microprocessor
JPS61214030A (en) Arithmetic processing unit
JPS61210440A (en) Level tracing device
JPH03141436A (en) Debugging device