JPS638947A - Program debug supporting system - Google Patents

Program debug supporting system

Info

Publication number
JPS638947A
JPS638947A JP61153446A JP15344686A JPS638947A JP S638947 A JPS638947 A JP S638947A JP 61153446 A JP61153446 A JP 61153446A JP 15344686 A JP15344686 A JP 15344686A JP S638947 A JPS638947 A JP S638947A
Authority
JP
Japan
Prior art keywords
task
breakpoint
instruction code
address
area
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
JP61153446A
Other languages
Japanese (ja)
Inventor
Koichi Nakamoto
幸一 中本
Kiyomitsu Fukuda
福田 清光
Takashi Kojo
古城 隆
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 JP61153446A priority Critical patent/JPS638947A/en
Publication of JPS638947A publication Critical patent/JPS638947A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To attain the setting of a break point only to a task independent of other tasks and to improve the efficiency of debugging work by deleting the break point by inserting an original instruction code and restoring the instruction code section, and inserting an internal interruption instruction to set a break point. CONSTITUTION:When a break point address is set at the entry of a break point managing area correspondent to a task desired to be interrupted for debugging, the break point is set by an instruction replacing means when the context of the task is switched to the context of another task, the break point set by the instruction replacing means is deleted by a restoring means. Accordingly, even if another task has an instruction code section in common with the objective task, internal interruption is not generated, and the task can be interrupted only when the objective task executes the instruction code section.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ブローラムデバッグサポート方式に関し、更
に詳細には複数のタスクを並行して処理する多重タスク
実行処理を行なう計算機システムにおいて、プログラム
の命令コード部を他のタスクと共有するようなタスクに
関連してデバッグを行なうのに適したプログラムデバッ
グサポート方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a bloram debugging support system, and more specifically, to a computer system that performs multi-task execution processing in which multiple tasks are processed in parallel. The present invention relates to a program debugging support system suitable for debugging a task that shares an instruction code section with other tasks.

〔従来の技術〕[Conventional technology]

計算機システムで動作するプログラムをデバッグする場
合、被デバツグプログラムの実行をブレークポイントと
呼ばれる箇所で中断してそのプログラムの内部状態を調
べ確認する方法が採用されている。
When debugging a program running on a computer system, a method is adopted in which execution of the program to be debugged is interrupted at a location called a breakpoint and the internal state of the program is examined and confirmed.

従来、プログラムに上記ブレークポイントを設定する方
式としては、計算機システムの外部から接続したデバッ
グモニタ装置を使用する方式と、計算機システム内で動
作するデバッグサポートプログラムを使用する方式とが
知られている。
Conventionally, methods for setting breakpoints in a program include a method using a debug monitor device connected from outside the computer system and a method using a debug support program running within the computer system.

前者の方式は、計算機システムのアドレスバスに外部か
らデバッグモニタ装置を接続し、このデバッグモニタ装
置において、アドレスバスに現れる命令フェッチアドレ
スと自身に設定されたブレークポイントアドレスとを比
較し、一致した時にデバッグモニタ装置から計算機シス
テムに割込みをかけてプログラムを停止させるものであ
る。
In the former method, a debug monitor device is externally connected to the address bus of the computer system, and this debug monitor device compares the instruction fetch address that appears on the address bus with the breakpoint address set for itself, and when they match, the debug monitor device The debug monitor device issues an interrupt to the computer system to stop the program.

他方、後者の方式は、計算機システム内のデバッグサポ
ートプログラムが、1プログラムに対応して存在するテ
ーブルに、被デバツグプログラムのブレークポイントア
ドレスに格納された命令コードを退避し、その代わりに
その箇所に内部割込み命令を挿入し、その後プログラム
を実行させ、プログラムの実行がブレークポイントアド
レスに達することによりその内部割込み命令により内部
割込みを発生させてプログラムを停止させるものである
On the other hand, in the latter method, a debug support program in a computer system saves the instruction code stored at the breakpoint address of the program to be debugged in a table that corresponds to one program, and instead writes the instruction code at that point. An internal interrupt instruction is inserted into the program, the program is then executed, and when the execution of the program reaches a breakpoint address, the internal interrupt instruction generates an internal interrupt and the program is stopped.

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

上述した従来の方式では、ブレークポイントアドレスが
プログラムの命令コード部に対応して存在している。こ
のため、多重タスク処理において、プログラムの命令コ
ード部を複数のタスクで共有し、その命令コード部のア
ドレスをブレークポイントアドレスとした場合、その命
令コード部を共有するタスクの実行毎にそのタスクの実
行が中断されることになり、所望のタスクに対してのみ
ブレークポイントを設定することができないという問題
点があった。このため、従来は、タスクの実行が中断す
る度に、操作者は中断したタスクのタスク識別情報をタ
スクコントロールブロック等から読取り、この読取った
タスクが目的とするタスクか否かを判断し、目的とする
タスクであればそのときのプログラム状態を調べるとい
った操作を行なっており、デバッグ時の作業能率が悪い
という欠点があった。
In the conventional method described above, a breakpoint address exists corresponding to an instruction code section of a program. Therefore, in multi-task processing, if an instruction code section of a program is shared by multiple tasks and the address of the instruction code section is set as a breakpoint address, each task that shares the instruction code section is executed. There is a problem in that execution is interrupted and breakpoints cannot be set only for desired tasks. For this reason, conventionally, each time execution of a task is interrupted, the operator reads the task identification information of the interrupted task from a task control block, etc., determines whether the read task is the intended task, and In the case of a task, the current state of the program must be investigated, which has the disadvantage of poor work efficiency during debugging.

本発明はこのような従来の欠点を解決したもので、その
目的は、プログラムの命令コード部を複数のタスクで共
有する多重タスク処理が行なわれていても、他のタスク
とは独立に目的とするタスクにのみ固存なブレークポイ
ントを設定することができるようにして、デバッグ作業
の能率を高めることにある。
The present invention solves these conventional drawbacks, and its purpose is to perform multitask processing in which the instruction code section of a program is shared by multiple tasks, but to perform the task independently of other tasks. The purpose of this feature is to improve the efficiency of debugging by allowing you to set breakpoints that are specific to only the tasks you are debugging.

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

本発明は上記目的を達成するために、複数のタスクを並
行して処理する計算機システムにおいて、ブレークポイ
ントアドレス設定エリアと該エリアに対応する命令コー
ド退避エリアとを含み、タスクに対応して設けられたブ
レークポイント管理領域と、 タスクのコンテクスト切換え時に、切換え前に走行して
いたタスクに対応する前記ブレークポイント管理領域の
ブレークポイントアドレス設定エリアにブレークポイン
トアドレスが設定されていれば、該ブレークポイントア
ドレス設定エリアに対応する前記命令コード退避エリア
に退避されていた命令コードによって前記ブレークポイ
ントアドレスの命令コード部を復旧する復旧手段と、タ
スクのコンテクスト切換え時に、切換え後に走行するタ
スクに対応する前記ブレークポイント管理領域のブレー
クポイントアドレス設定エリアにブレークポイントアド
レスが設定されていれば、該ブレークポイントアドレス
設定エリアのブレークポイントアドレスが指示する命令
コード部の命令コードを前記ブレークポイントアドレス
設定エリアに対応する前記命令コード退避エリアに退避
させた後、前記ブレークポイントアドレスが指示する命
令コード部に内部割込み命令を挿入する命令置換手段と
、 前記内部割込み命令による割込みを捕捉しタスクの実行
を中断せしめる中断手段とを備える。
To achieve the above object, the present invention provides a computer system that processes a plurality of tasks in parallel, which includes a breakpoint address setting area and an instruction code save area corresponding to the area, and is provided corresponding to the task. When a task context is switched, if a breakpoint address is set in the breakpoint address setting area of the breakpoint management area that corresponds to the task that was running before switching, the breakpoint address is set. a restoring means for restoring the instruction code section of the breakpoint address using the instruction code saved in the instruction code save area corresponding to the setting area, and the breakpoint corresponding to the task to be run after switching when the task context is switched; If a breakpoint address is set in the breakpoint address setting area of the management area, the instruction code of the instruction code portion indicated by the breakpoint address in the breakpoint address setting area is transferred to the instruction corresponding to the breakpoint address setting area. an instruction replacement means for inserting an internal interrupt instruction into the instruction code section indicated by the breakpoint address after saving the code to a code saving area; and an interrupting means for catching an interrupt caused by the internal interrupt instruction and interrupting execution of the task. Be prepared.

〔作用〕[Effect]

デバッグの為に中断したいタスクに対応するブレークポ
イント管理領域のエントリにブレークポイントアドレス
を設定すれば、タスクのコンテクストがそのタスクのコ
ンテクストへ切換えられる際に、命令1換手段によって
ブレークポイントが設定され、タスクのコンテクストが
そのタスクから別のタスクのコンテクストへ切換えられ
る際には、復旧手段によって上記命令置換手段で設定さ
れたブレークポイントが削除されるので、その別のタス
クがたとえ目的とするタスクの命令コード部を共存する
ものであっても、内部割込みは発生せず、目的とするタ
スクがその命令コード部を実行したときにのみ内部割込
みによってタスクを中断することができる。
If you set a breakpoint address in the entry in the breakpoint management area corresponding to the task you want to interrupt for debugging, when the context of the task is switched to the context of that task, the breakpoint will be set by the single instruction conversion means, When the context of a task is switched from that task to the context of another task, the breakpoint set by the instruction replacement means is deleted by the recovery means, so even if the other task is switched to the instruction of the target task. Even if code sections coexist, no internal interrupt occurs, and a task can be interrupted by an internal interrupt only when the target task executes the instruction code section.

〔実施例〕〔Example〕

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

第1図は本発明のプログラムデバッグサポート方式を実
施する計算機システムの一実施例のブロック図であり、
中央処理装置5と、主記憶装置1と、端末装置4とで構
成されている。
FIG. 1 is a block diagram of an embodiment of a computer system implementing the program debugging support method of the present invention.
It is composed of a central processing unit 5, a main storage device 1, and a terminal device 4.

主記憶装置1には、一般プログラム占有メモリ空間2と
、オペレーティング・システム占有メモリ空間3とがあ
り、一般プログラム占有メモリ空間2には、この空間2
で走行するタスクの命令コード部21.〜21.lと、
その空間2で走行するタスクのデータ部22□〜221
*、 22,1.とが含まれている。
The main storage device 1 includes a general program exclusive memory space 2 and an operating system exclusive memory space 3. The general program exclusive memory space 2 includes this space 2.
The instruction code section 21 of the task running in . ~21. l and
Data section 22□-221 of the task running in that space 2
*, 22,1. and are included.

また、オペレーティング・システム占有メモリ空間3に
は、タスクのコンテクスト(実行環境)を切換えるタス
クディスパッチ中31と、タスク対応のエントリ32.
〜32、を有し、対応するエントリにそのタスクのブレ
ークポイントアドレスとこのアドレスにある命令コード
との対応を記憶し得るブレークポイント管理テーブル3
2と、ブレークポイント管理テーブル32を管理するモ
ジュール33と、ブレークポイントアドレスで発生する
内部割込みに対応する割込み処理を行なう割込み処理モ
ジエール34と、タスク対応のエントリ35.〜35.
を存するタスクコンテクスト退避領域35と、実行中或
いは中断中のタスクの識別情報を格納するタスクコント
ロールブロック36とが含められている。
Further, in the operating system occupied memory space 3, there is a task dispatching entry 31 for switching the task context (execution environment), and an entry 32 corresponding to the task.
~32, and can store the correspondence between the breakpoint address of the task and the instruction code at this address in the corresponding entry.
2, a module 33 that manages the breakpoint management table 32, an interrupt processing module 34 that performs interrupt processing corresponding to an internal interrupt that occurs at a breakpoint address, and an entry 35.2 that corresponds to a task. ~35.
, and a task control block 36 that stores identification information of tasks that are currently being executed or suspended.

第2図はブレークポイント管理テーブル32における一
つのタスクに対応するエントリの構成例を示す、ブレー
クポイント管理テーブル32の各エントリ32.〜32
.は、ブレークポイントアドレスを設定する為のエリア
BKADR(Bl[ADH,A−BKADR,)と、各
エリア8KADI?l −BKAI)11.に設定され
たブレークポイントアドレスに存在する命令コードを退
避する為のエリア5VCODE(SVCODEI 〜5
VCODE、 ”) と、そのエントリに登録されてい
るブレークポイントの個数を設定するためのエリアBK
Nとで構成されている。
FIG. 2 shows an example of the configuration of entries corresponding to one task in the breakpoint management table 32, each entry 32. ~32
.. is the area BKADR (Bl[ADH, A-BKADR,) for setting the breakpoint address and each area 8KADI? l-BKAI)11. Area 5VCODE (SVCODEI ~ 5
Area BK for setting VCODE, ”) and the number of breakpoints registered in that entry.
It is composed of N.

次に本実施例の動作について、モジュール33で実行さ
れるブレークポイント設定処理例の流れを示す第3図、
モジュール33で実行されるブレークポイント解除処理
例の流れを示す第4図、およびブレークポイントの設定
されたタスクの制御の流れを示す第5図等を参照しなが
ら以下詳細に説明する。
Next, regarding the operation of this embodiment, FIG.
A detailed explanation will be given below with reference to FIG. 4 showing the flow of an example of breakpoint cancellation processing executed by the module 33, and FIG. 5 showing the flow of control of a task in which a breakpoint has been set.

[ブレークポイント設定処理] ブレークポイント設定時には、端末装置4から、アーギ
ュメントとしてブレークポイントを設定する対象タスク
のタスク識別子とブレークポイントアドレスとを持つブ
レークポイント設定コマンドを入力する。このブレーク
ポイント設定コマンドが与えられると、中央処理袋W5
はモジュール33の第3図に示した処理を開始する。即
ち、先ずそのブレークポイント設定コマンド中に含まれ
たタスク識別子を持つタスクに対応するブレークポイン
ト管理テーブル32のエントリに、その指定されたブレ
ークポイントアドレスと同一のアドレスのブレークポイ
ントが設定されているか否かを判断しく300) 、設
定されていなければ、そのエントリにおけるエリアBK
ADR+−BKADR,のうちの空きエリアに、指定さ
れたブレークポイントアドレスを登録しく301) 、
エリアBINのブレークポイント個数を1だけ増加させ
る(302) 。
[Breakpoint Setting Process] When setting a breakpoint, a breakpoint setting command is input from the terminal device 4 having the task identifier of the target task for which a breakpoint is to be set and the breakpoint address as arguments. When this breakpoint setting command is given, the central processing bag W5
starts the process shown in FIG. 3 of module 33. That is, first, it is determined whether a breakpoint at the same address as the specified breakpoint address is set in the entry in the breakpoint management table 32 corresponding to the task with the task identifier included in the breakpoint setting command. 300), if it is not set, the area BK in that entry.
Register the specified breakpoint address in the free area of ADR+-BKADR (301),
The number of breakpoints in area BIN is increased by 1 (302).

[ブレークポイント解除処理] ブレークポイント解除時には、端末装置4から、アーギ
ユメントとしてブレークポイントを解除する対象タスク
のタスク識別子と解除すべきブレークポイントアドレス
とを持つブレークポイント解除コマンドを入力する。こ
のブレークポイント解除コマンドが与えられると、中央
処理装置5はモジュール33の第4図に示した処理を開
始する。aち、先ずそのブレークポイント解除コマンド
中に含まれたタスク識別子を持つタスクに対応するブレ
ークポイント管理テーブル32中のエントリに、その指
定されたブレークポイントアドレスと同一のアドレスの
ブレークポイントが設定されているか否かを判断しく4
00) 、設定されていれば、そのエントリにおける指
定されたブレークポイントアドレスを削除しく401)
 、エリアIKNのブレークポイント個数を1だけ減少
させる(402) 。
[Breakpoint Cancellation Process] When canceling a breakpoint, a breakpoint cancellation command is input from the terminal device 4, which has the task identifier of the target task for which the breakpoint is to be canceled and the breakpoint address to be canceled as arguments. When this breakpoint cancellation command is given, the central processing unit 5 starts the processing shown in FIG. 4 of the module 33. First, a breakpoint with the same address as the specified breakpoint address is set in the entry in the breakpoint management table 32 corresponding to the task with the task identifier included in the breakpoint cancellation command. 4.
00), if set, delete the specified breakpoint address in that entry 401)
, the number of breakpoints in area IKN is decreased by 1 (402).

[ブレークポイントの設定されたタスクの制御]今、第
1図において、ある命令コード部たとえば命令コード部
211を共有する二つのタスクTl。
[Control of tasks with breakpoints set] In FIG. 1, two tasks Tl share a certain instruction code section, for example, instruction code section 211.

T2が存在するとし、タスクT1に対応するブレークポ
イント管理テーブル32のエントリ32.には前述した
ブレークポイント設定処理によりて、命令コード部21
1 のアドレスがブレークポイントアドレスとして登録
されており、タスクT2に対応するブレークポイント管
理テーブル32のエントリ32、には一つもブレークポ
イントが登録されていないとする。このような状態にお
いて、タスクTlからタスクT2に実行の制御が移り、
その後再びタスクT1に実行の制御が移る場合を考える
Assuming that task T2 exists, entry 32. of the breakpoint management table 32 corresponding to task T1. The instruction code section 21 is set by the breakpoint setting process described above.
1 is registered as a breakpoint address, and no breakpoint is registered in the entry 32 of the breakpoint management table 32 corresponding to task T2. In this state, execution control is transferred from task Tl to task T2,
Consider the case where execution control is then transferred to task T1 again.

この場合、タスクT1からタスクT2に実行の制御が移
る際に、まず一般のタスク切換え処理で行なわれるよう
に、タスク切換え前に走行したタスクT1のコンテクス
トが対応するタスクコンテクスト退避領域35のエント
リ351に退避される(500)、そして、処理501
〜処理505で構成されたブレークポイント1換処理が
実行される。
In this case, when execution control is transferred from task T1 to task T2, first, as is done in general task switching processing, an entry 351 in the task context save area 35 corresponding to the context of task T1 that ran before task switching is (500), and processing 501
The breakpoint 1 conversion process configured in steps 505 to 505 is executed.

このブレークポイント置換処理では、その処理501に
おいて、切換前のタスクであるタスクT1にブレークポ
イントが設定されていたか苦かを、タスクT1に対応す
るブレークポイント管理テーブル32のエントリ32.
中の領域BKNの値が0か否かにより判断する。今の例
では、命令コード部21+のアドレスがブレークポイン
トアドレスとしてエントリ32.に登録されており、こ
のブレークポイントアドレスが指示する命令コード部2
11の命令コードがエントリ32.に退避されている。
In this breakpoint replacement process, in process 501, whether or not a breakpoint was set in task T1, which is the task before switching, is determined from the entry 32 of the breakpoint management table 32 corresponding to task T1.
The determination is made based on whether the value of the area BKN inside is 0 or not. In the current example, the address of instruction code section 21+ is used as the breakpoint address in entry 32. is registered in the instruction code part 2 specified by this breakpoint address.
The instruction code of 11 is entry 32. has been evacuated to.

従って、上記処理501でブレークポイントが設定され
ていると判断され、次の処理502によって、タスクT
1に対応するブレークポイント管理テーブル32のエン
トリ321 におけるコード退避エリア5VCODHに
退避されている命令コードが、そのエリア 5VCOD
I!に対応するブレークポイントアドレスに従って、命
令コード部21.に復旧される。
Therefore, it is determined in the above process 501 that a breakpoint has been set, and in the next process 502, task T
The instruction code saved in the code save area 5VCODH in the entry 321 of the breakpoint management table 32 corresponding to 1 is stored in that area 5VCOD.
I! According to the breakpoint address corresponding to the instruction code section 21. will be restored.

次に、これから実行されるタスクT2にブレークポイン
トが設定されているか否かが、タスクT2に対応するブ
レークポイント管理テーブル32中のエントリ32□に
おけるエリアBKNの値がOか否かを判別することによ
り判断される(503) 、今の例ではタスクT2には
一つもブレークポイントが設定されていないので、次に
処理506が実行され、一般のタスク切換処理が実行さ
れる。即ち、タスク切換後に走行するタスクT2のコン
テクストが対応するタスクコンテクスト退避領域35の
エントリ35.から復旧され(506) 、タスクT2
に実行の制御が移される(507) 。
Next, whether or not a breakpoint is set for task T2 to be executed from now on is determined by determining whether or not the value of area BKN in entry 32□ in breakpoint management table 32 corresponding to task T2 is O. As determined by (503), since no breakpoint is set in task T2 in this example, process 506 is executed next, and general task switching process is executed. That is, entry 35. of the task context save area 35 to which the context of task T2 running after task switching corresponds. (506) and task T2
Execution control is transferred to (507).

これによってタスクT2が走行を開始し、その実行の制
御が命令コード部21.に達したとすると、その命令コ
ード部2L の命令コードはタスクのコンテクスト切換
時に処理502によって復旧されているので、タスクT
2が命令コード部21+を実行しても内部割込みを発生
することはない。
As a result, task T2 starts running, and its execution is controlled by instruction code section 21. , the instruction code in the instruction code section 2L was restored by process 502 when the task context was switched, so the task T
2 executes the instruction code portion 21+, no internal interrupt is generated.

次に、タスクT2から再びタスクTIに実行の制御が移
った場合、再び第5図の処理が開始され、処理500に
よって、タスクT2のコンテクストがタスクコンテクス
ト退避領域35のエントリ35.に退避され、ブレーク
ポイント置換処理が実行される。今回のブレークポイン
ト置換処理では、その処理501で切換前のタスクT2
にブレークポイントが登録されていないことが判別され
るので、処理502は実行されず、処理503へ進む。
Next, when the execution control is transferred from task T2 to task TI again, the process of FIG. 5 is started again, and the context of task T2 is changed to entry 35. , and breakpoint replacement processing is executed. In this breakpoint replacement process, in process 501, task T2 before switching
Since it is determined that no breakpoint is registered in , processing 502 is not executed and the process advances to processing 503.

そして、この処理503において、切換後のタスクT1
にブレークポイントが設定されていることが判別され、
処理504,505が実行されることになる。
Then, in this process 503, task T1 after switching
It is determined that a breakpoint is set on
Processes 504 and 505 will be executed.

この処理504においては、切換後のタスクT1に対応
するブレークポイント管理テーブル32のエントリ32
1に登録されたブレークポイントアドレスに従って、命
令コード部21+ の命令コードが、そのエントリ32
.のそのブレークポイントアドレスに対応するエリア5
VCODI!に退避され(504) 、次いで、そのエ
ントリ32+に登録されたブレークポイントアドレスに
従って、命令コード部21.に内部割込み命令が挿入さ
れる(505) 、そして、この後、タスク切換え後に
走行するタスクTIのコンテクストが対応するタスクコ
ンテクスト退避領域35のエントリ35.から復旧され
(506) 、タスクT1に実行の制御が移される(5
07) 。
In this process 504, the entry 32 of the breakpoint management table 32 corresponding to the task T1 after switching
According to the breakpoint address registered in 1, the instruction code in the instruction code section 21+ is transferred to its entry 32.
.. Area 5 corresponding to that breakpoint address in
VCODI! (504), and then, according to the breakpoint address registered in the entry 32+, the instruction code section 21. An internal interrupt instruction is inserted into (505), and after this, the context of the task TI running after the task switch is inserted into the corresponding entry 35. of the task context save area 35. (506), and execution control is transferred to task T1 (506).
07).

タスクTIに実行の制御が移され、タスクT1が走行を
始め、その実行の制御がブレークポイントアドレスに達
すると、そのアドレスには処理505で内部割込み命令
が挿入されているので内部割込みが発生し、対応する割
込み処理モジュール34が実行されることになる。従っ
て、この割込み処理モジュール34によりタスクT1の
実行状態が走行状態から待ち状態に遷移させられ、タス
クT1の実行が中断される。このとき、端末装置4にタ
スクが中断された旨およびタスクコントロールプロンク
36の内容を参照して得られた中断タスクT1の識別情
報が出力される0本実施例では、タスクT1に対しての
みブレークポイントを設定したので、上記中断は必ずタ
スクT1の中断であり、操作者は直ちにタスクT1の実
行がブレークポイントによって中断したことを知ること
ができる。従って、従来のように改めて中断したタスク
が目的とするタスクであるか否かを調べる必要はなくな
る。
Execution control is transferred to task TI, task T1 starts running, and when the execution control reaches the breakpoint address, an internal interrupt is generated at that address because an internal interrupt instruction was inserted at that address in process 505. , the corresponding interrupt processing module 34 will be executed. Therefore, the interrupt processing module 34 causes the execution state of the task T1 to transition from the running state to the waiting state, and the execution of the task T1 is interrupted. At this time, the notification that the task has been interrupted and the identification information of the interrupted task T1 obtained by referring to the contents of the task control pronk 36 are output to the terminal device 4. In this embodiment, a break is made only for task T1. Since the point is set, the above-mentioned interruption is always an interruption of task T1, and the operator can immediately know that the execution of task T1 has been interrupted by the breakpoint. Therefore, it is no longer necessary to check whether the interrupted task is the intended task as in the conventional case.

以上のような処理により、命令コード部を共有する複数
のタスクがある場合においても、各タスク毎に独立した
ブレークポイントの管理が可能となり、他のタスクとは
独立に目的とするタスクにのみブレークポイントを設定
し、そのブレークポイントにてそのタスクの実行を中断
させることが可能となる。なお、以上の説明では、タス
クT2にはブレークポイントを設定しなかったが、タス
クT2に対してもそれ独立にブレークポイントを設定し
得ることは勿論のことであり、複数のタスクに対して各
々独立にブレークポイントを設定した場合、中断時にど
のタスクが中断したかは端末装置の表示で識別でき、ブ
レークポイントアドレスの命令コード部を共有する他の
タスクであってそのタスクにはブレークポイントが設定
されていない非デバッグ対象タスクは中断しないので、
中断したタスクは必ずデバッグ対象のタスクであること
を直ちに認識することができる。また、本発明は、命令
コード部を他のタスクと共有しないタスクに対しても適
用し得ることは勿論のことである。
Through the above processing, even when there are multiple tasks that share the instruction code part, it is possible to manage breakpoints independently for each task, and break only to the target task independently of other tasks. It is possible to set a point and interrupt the execution of the task at that breakpoint. Note that in the above explanation, breakpoints were not set for task T2, but it is of course possible to set breakpoints for task T2 independently, and it is possible to set breakpoints for task T2 independently. If breakpoints are set independently, you can identify which task was interrupted at the time of interruption by looking at the display on the terminal device, and if the breakpoint is set for another task that shares the instruction code part of the breakpoint address. Since non-debug target tasks that are not
It is possible to immediately recognize that the interrupted task is always the task to be debugged. It goes without saying that the present invention can also be applied to tasks that do not share an instruction code section with other tasks.

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

以上説明したように、本発明のプログラムデバッグサポ
ート方式では、タスクのコンテクスト切換時に切換前に
走行していたタスクの命令コード部にブレークポイント
が設定されていれば、元の命令コードを挿入して命令コ
ード部を復旧することによってそのブレークポイントを
削除し、切換後に走行すべきタスクにブレークポイント
が設定されていれば、そのブレークポイントアドレスが
指示する命令コード部の命令コードを退避させると共に
内部割込み命令を挿入してブレークポイントを設定する
ようにしたので、多重タスクを処理する計算機システム
において、命令コード部を共有する他のタスクとは独立
に、あるタスクにのみブレークポイントを設定すること
が可能となる。
As explained above, in the program debugging support method of the present invention, when a task context is switched, if a breakpoint is set in the instruction code section of the task that was running before switching, the original instruction code is inserted. By restoring the instruction code section, the breakpoint is deleted, and if a breakpoint is set in a task that should run after switching, the instruction code of the instruction code section specified by the breakpoint address is saved and an internal interrupt is Breakpoints are now set by inserting instructions, so in computer systems that process multiple tasks, it is possible to set breakpoints only for one task, independent of other tasks that share the instruction code section. becomes.

従って、従来のようにブレークポイントで実行が中断す
る度に、中断したタスクがデバッグの対象タスクか否か
を判断する必要がなくなり、デバ。
Therefore, it is no longer necessary to determine whether the interrupted task is the task to be debugged every time execution is interrupted at a breakpoint, unlike in the past.

グ作業の能率を向上することができ、従来のデバッグサ
ポート方式に比べてソフトウェアの生産性を大幅に向上
することができる効果がある。
This has the effect of significantly improving software productivity compared to conventional debugging support methods.

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

第1図は本発明のプログラムデバッグサポート方式を実
施する計算機システムの一実施例のブロック図、 第2図はブレークポイント管理テーブルの内容説明図、 第3図はブレークポイント設定処理の一例を示す流れ図
、 第4図はブレークポイント解除処理の一例を来す流れ図
および、 第5図はタスク切換時の処理例を示す流れ図である。 図において、1・・・主記憶装置、2・・・一般プログ
ラム占有メモリ空間、3・・・オペレーティング・シス
テム占有メモリ空間、4・・・端末装置、5・・・中央
処理装置、21.〜21.・・・命令コード部、221
.〜22.s。 22、・・・データ部、31・・・タスクディスパッチ
ャ、32・・・ブレークポイント管理テーブル、321
〜32.・・・ブレークポイント管理テーブル32の各
エントリ、33・・・ブレークポイント管理テーブル3
2を管理するモジュール、34・・・割込み処理モジエ
ール、35・・・タスクコンテクスト退避領域、35.
〜35.・・・タスクコンテクスト退避領域35の各エ
ントリ、36・・・タスクコントロールブロック。
Fig. 1 is a block diagram of an embodiment of a computer system that implements the program debugging support method of the present invention, Fig. 2 is an explanatory diagram of the contents of a breakpoint management table, and Fig. 3 is a flowchart showing an example of breakpoint setting processing. , FIG. 4 is a flowchart showing an example of breakpoint cancellation processing, and FIG. 5 is a flowchart showing an example of processing when switching tasks. In the figure, 1... Main storage device, 2... General program occupied memory space, 3... Operating system occupied memory space, 4... Terminal device, 5... Central processing unit, 21. ~21. ...Instruction code section, 221
.. ~22. s. 22...Data section, 31...Task dispatcher, 32...Breakpoint management table, 321
~32. ...Each entry of the breakpoint management table 32, 33...Breakpoint management table 3
34... interrupt processing module, 35... task context save area, 35.
~35. ...Each entry of the task context save area 35, 36...Task control block.

Claims (1)

【特許請求の範囲】 複数のタスクを並行して処理する計算機システムにおい
て、 ブレークポイントアドレス設定エリアと該エリアに対応
する命令コード退避エリアとを含み、タスクに対応して
設けられたブレークポイント管理領域と、 タスクのコンテクスト切換え時に、切換え前に走行して
いたタスクに対応する前記ブレークポイント管理領域の
ブレークポイントアドレス設定エリアにブレークポイン
トアドレスが設定されていれば、該ブレークポイントア
ドレス設定エリアに対応する前記命令コード退避エリア
に退避されていた命令コードによって前記ブレークポイ
ントアドレスの命令コード部を復旧する復旧手段と、タ
スクのコンテクスト切換え時に、切換え後に走行するタ
スクに対応する前記ブレークポイント管理領域のブレー
クポイントアドレス設定エリアにブレークポイントアド
レスが設定されていれば、該ブレークポイントアドレス
設定エリアのブレークポイントアドレスが指示する命令
コード部の命令コードを前記ブレークポイントアドレス
設定エリアに対応する前記命令コード退避エリアに退避
させた後、前記ブレークポイントアドレスが指示する命
令コード部に内部割込み命令を挿入する命令置換手段と
、 前記内部割込み命令による割込みを捕捉しタスクの実行
を中断せしめる中断手段とを具備したことを特徴とする
プログラムデバッグサポート方式。
[Claims] In a computer system that processes multiple tasks in parallel, a breakpoint management area provided corresponding to a task includes a breakpoint address setting area and an instruction code save area corresponding to the area. and, when a task context is switched, if a breakpoint address is set in the breakpoint address setting area of the breakpoint management area corresponding to the task that was running before switching, the breakpoint address corresponding to the breakpoint address setting area is set. a restoring means for restoring the instruction code portion of the breakpoint address using the instruction code saved in the instruction code save area; and a breakpoint in the breakpoint management area corresponding to the task to be run after switching when task context is switched. If a breakpoint address is set in the address setting area, save the instruction code of the instruction code section specified by the breakpoint address in the breakpoint address setting area to the instruction code save area corresponding to the breakpoint address setting area. and an interrupting means for capturing an interrupt caused by the internal interrupt instruction and interrupting execution of the task. Program debugging support method.
JP61153446A 1986-06-30 1986-06-30 Program debug supporting system Pending JPS638947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61153446A JPS638947A (en) 1986-06-30 1986-06-30 Program debug supporting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61153446A JPS638947A (en) 1986-06-30 1986-06-30 Program debug supporting system

Publications (1)

Publication Number Publication Date
JPS638947A true JPS638947A (en) 1988-01-14

Family

ID=15562725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61153446A Pending JPS638947A (en) 1986-06-30 1986-06-30 Program debug supporting system

Country Status (1)

Country Link
JP (1) JPS638947A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007079969A (en) * 2005-09-14 2007-03-29 Matsushita Electric Ind Co Ltd System and method for debug

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007079969A (en) * 2005-09-14 2007-03-29 Matsushita Electric Ind Co Ltd System and method for debug

Similar Documents

Publication Publication Date Title
US5161226A (en) Microprocessor inverse processor state usage
US5319645A (en) Method for debugging and testing the correctness of programs
US5613114A (en) System and method for custom context switching
US7694182B2 (en) Debugging system and method
EP0638864B1 (en) Development support system for microcomputer with internal cache
JPS638947A (en) Program debug supporting system
JPH0668725B2 (en) Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition
JPH0414376B2 (en)
JPH0922369A (en) Illicit operation detection method in kernel of multi-tasking system
JPS638946A (en) Program debug supporting system
JPH01147640A (en) Multi-programming debug device
JPS63177231A (en) Debug system for parallel program
JPH03144705A (en) Operation state monitor for programmable controller
JPS61180344A (en) Step execution system for high level language
JPH02139630A (en) Online task exchange device
JPH0262633A (en) Inter-program communication system
JP2591818B2 (en) Auxiliary function selection control method
JP2954006B2 (en) Emulation device and emulation method
JPH0535507A (en) Central processing unit
JPS63167940A (en) Multi-programming directional cpu
JPH01147639A (en) Multi-programming debug device
JPH05204710A (en) Event tracer
JPH04138535A (en) Source level debugging system
JPS61267137A (en) System for controlling interrupting action
JPH04195539A (en) System call processing system