JP3159155B2 - Method and apparatus for debugging program - Google Patents

Method and apparatus for debugging program

Info

Publication number
JP3159155B2
JP3159155B2 JP04162598A JP4162598A JP3159155B2 JP 3159155 B2 JP3159155 B2 JP 3159155B2 JP 04162598 A JP04162598 A JP 04162598A JP 4162598 A JP4162598 A JP 4162598A JP 3159155 B2 JP3159155 B2 JP 3159155B2
Authority
JP
Japan
Prior art keywords
system call
call
task
instruction
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.)
Expired - Fee Related
Application number
JP04162598A
Other languages
Japanese (ja)
Other versions
JPH11238003A (en
Inventor
英夫 磯貝
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 JP04162598A priority Critical patent/JP3159155B2/en
Publication of JPH11238003A publication Critical patent/JPH11238003A/en
Application granted granted Critical
Publication of JP3159155B2 publication Critical patent/JP3159155B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムのデバ
ッグ方法および装置、特にリアルタイムOS上で動くタ
スクのデバッグ方法および装置に関する。
The present invention relates to a method and an apparatus for debugging a program, and more particularly to a method and an apparatus for debugging a task running on a real-time OS.

【0002】[0002]

【従来の技術】プログラム開発を行う場合、通常、1つ
の大きなプログラムは多くの小さなサブプログラムに分
割して開発を行う。サブプログラムの大半は、その中で
さらに別のサブプログラムを呼び出して処理を行う場合
も多い。このようなプログラムのデバッグは、最初から
大きなプログラムの全体をデバッグするのではなく、下
層にあるサブプログラムから順次上層のサブプログラム
に向かってデバッグしていくことが多い。この場合、デ
バッグが完了した下層のサブプログラムは不具合が存在
しないため、より上層のサブプログラムをデバッグする
ときにはブラックボックスとして扱っても問題ない。
2. Description of the Related Art When developing a program, one large program is usually divided into many small subprograms for development. Most subprograms often call another subprogram to perform processing. When debugging such a program, the debugger often does not debug the entire large program from the beginning, but sequentially debugs the lower-level subprograms sequentially toward the upper-level subprograms. In this case, since there is no defect in the lower subprogram after the completion of debugging, there is no problem if the upper subprogram is treated as a black box when debugging the upper subprogram.

【0003】プログラムのデバッグ作業は、プログラム
を1命令ずつ実行してレジスタやメモリなどの変化を調
べていくステップ実行がよく用いられるが、この場合デ
バッグが完了したサブプログラムに対しては、サブプロ
グラム内をステップ実行して変化を確認する必要はな
く、サブプログラムを一度に実行した後で変化を確認す
ればよい。このためプログラムのデバッグ作業を行うほ
とんどのデバッガには、ステップ実行しようとしている
命令がサブプログラムの呼び出し命令であった場合、そ
のサブプログラム内を一度に実行してしまうプロシージ
ャ・ステップ実行と呼ばれる機能をもっている。
A program debugging operation often uses step execution in which a program is executed one instruction at a time and changes in registers, memories, and the like are examined. In this case, a subprogram that has been debugged is replaced with a subprogram. It is not necessary to confirm the change by step-executing the subroutine, but to confirm the change after executing the subprogram at once. For this reason, most debuggers that perform program debugging work have a function called procedure step execution that executes the subprogram at once if the instruction to be stepped is a subprogram call instruction. I have.

【0004】プログラムの構成上いくつかの並列的に行
われる処理や、時間経過の管理を伴うような処理を必要
とする場合に、リアルタイムOSが使用されることがあ
る。リアルタイムOSとは、タスクという単位に分割さ
れた複数のプログラムを状況により切り替えながら動作
させるOSであり、OSに対するシステムコールの発行
や、割り込みによるイベントの発生により、実行中のタ
スクが切り替わる。このようなタスクは、通常のプログ
ラムと同様に幾つかのサブプログラムに分割されて開発
される。
A real-time OS may be used when some parallel processing or processing involving management of the passage of time is required due to the configuration of a program. The real-time OS is an OS that operates while switching a plurality of programs divided into units called tasks according to the situation. The task being executed is switched by issuing a system call to the OS or generating an event due to an interrupt. Such a task is developed by being divided into several subprograms as in a normal program.

【0005】このようなリアルタイムOS上で並列動作
する複数のタスクをデバッグする場合に、タスクを構成
するメインプログラム中にサブプログラム(または関
数)が含まれていると、CALL命令で呼び出されたサ
ブプログラムがメインプログラムに戻る場合に、RET
(リターン)命令を用いないプログラムを使用したと
き、その処理を正常に終了できるようにすることが要求
される。
When debugging a plurality of tasks operating in parallel on such a real-time OS, if a subprogram (or function) is included in the main program constituting the task, the subprogram called by the CALL instruction is used. RET when the program returns to the main program
(Return) When a program that does not use an instruction is used, it is required that the processing can be completed normally.

【0006】このような要求を実現した従来技術とし
て、特開平9−152980号公報に開示されるプロシ
ージャ・ステップ処理方法がある。
As a prior art which has fulfilled such a demand, there is a procedure / step processing method disclosed in Japanese Patent Application Laid-Open No. 9-152980.

【0007】図1は、このプロシージャ・ステップ処理
方法を実施するデバッガ10の機能ブロック図である。
デバッガ10は、被デバッグ・プログラムの実行を行
い、レジスタやメモリなどのCPU資源や外部デバイス
の状態をユーザがデバッグするための機能を持ってい
る。被デバッグ・プログラムの実行のみを考えると、一
般的にデバッガはデバッグ命令を解析する解析部12
と、ユーザまたはデバッガ・プログラム自身によって設
定されたイベントブレークを検出するまで実行を継続す
るリアルタイム・エミュレーション部14と、一命令だ
けの実行を行うステップ実行部16と、関数単位の命令
の実行を行うプロシージャ・ステップ実行部18とを有
している。プロシージャ・ステップ実行部18は、命令
判別部20および関数実行部22を含んでいる。
FIG. 1 is a functional block diagram of a debugger 10 that implements this procedure / step processing method.
The debugger 10 has a function of executing a program to be debugged and allowing a user to debug the state of CPU resources such as registers and memories and external devices. When considering only the execution of a program to be debugged, the debugger generally analyzes the debug instruction by the analysis unit 12.
And a real-time emulation unit 14 that continues execution until an event break set by the user or the debugger program itself is detected, a step execution unit 16 that executes only one instruction, and executes an instruction for each function. And a procedure / step execution unit 18. The procedure / step execution unit 18 includes an instruction determination unit 20 and a function execution unit 22.

【0008】図2は、このデバッガ10によるプロシー
ジャ・ステップの実行を説明するフローチャートであ
る。
FIG. 2 is a flowchart for explaining the execution of the procedure steps by the debugger 10.

【0009】まず、プロシージャ・ステップ実行部18
の命令判別部20は、ステップ実行中のプログラムにお
いて、実行する命令がCALL命令かどうかを判断し
(ステップS1)、CALL命令でなければ(No)、
その命令だけをステップ実行部16で実行して(ステッ
プS11)終了する。
First, a procedure / step execution unit 18
The command determination unit 20 determines whether the command to be executed is a CALL command in the program being step-executed (step S1), and if the command is not the CALL command (No),
Only the instruction is executed by the step execution unit 16 (step S11), and the process ends.

【0010】CALL命令の場合(Yes)は、戻りア
ドレスをスタックに退避する(ステップS2)。退避す
るスタックのアドレスは、スタック・ポインタにより指
示される。
In the case of the CALL instruction (Yes), the return address is saved on the stack (step S2). The address of the stack to be saved is indicated by the stack pointer.

【0011】次に、ユーザが設定したイベントを退避
し、すべてのイベントブレークを無効にする(ステップ
S3)。これは、関数の実行にリアルタイム・エミュレ
ーションを使用するため、そのリアルタイム・エミュレ
ーション中にイベントブレークを発生させないようにす
るためである。
Next, the event set by the user is saved, and all event breaks are invalidated (step S3). This is to prevent the occurrence of an event break during the real-time emulation because the real-time emulation is used for executing the function.

【0012】次に、ステップS2で戻りアドレスを退避
したスタックのアドレスに、アクセスイベントブレーク
を設定する(ステップS4)。なお、イベントブレーク
とは、被デバッグ対象であるプログラムの実行処理を中
断することである。
Next, an access event break is set at the address of the stack where the return address was saved in step S2 (step S4). Note that an event break is to interrupt the execution of the program to be debugged.

【0013】次に、関数実行部22およびリアルタイム
・エミュレーション部14は、関数のリアルタイム・エ
ミュレーションを開始する(ステップS5)。
Next, the function execution unit 22 and the real-time emulation unit 14 start real-time emulation of the function (step S5).

【0014】戻りアドレスを退避したスタックのアドレ
スをアクセスしたことにより、アクセスイベントブレー
クを検出する(ステップS6)。
An access event break is detected by accessing the address of the stack where the return address is saved (step S6).

【0015】プログラムカウンタPCが戻りアドレスと
一致するまで、リアルタイム・エミュレーションを継続
する(ステップS7)。
The real-time emulation is continued until the program counter PC matches the return address (step S7).

【0016】プログラムカウンタPCが戻りアドレスと
一致したら、リアルタイム・エミュレーションを中断す
る(ステップS8)。
If the program counter PC matches the return address, the real-time emulation is interrupted (step S8).

【0017】次に、ステップS4で設定したアクセスイ
ベントブレークを解除する(ステップS9)。
Next, the access event break set in step S4 is released (step S9).

【0018】最後に、ステップS3で退避したユーザの
イベントを復元し(ステップS10)、プロシージャ・
ステップ実行処理を終了する。
Finally, the event of the user saved in step S3 is restored (step S10), and the procedure
The step execution processing ends.

【0019】以上のようなプロシージャ・ステップによ
れば、戻りアドレスを退避したスタックのアドレスに、
アクセスイベントブレークを設定するので、RET命令
を用いない関数がプロシージャ・ステップ実行される場
合でも、処理を中断することができる。
According to the procedure steps described above, the return address is stored in the address of the saved stack.
Since an access event break is set, even when a function not using the RET instruction is executed in a procedure step, the processing can be interrupted.

【0020】[0020]

【発明が解決しようとする課題】マルチタスク・システ
ムでは、図3のように個々に別々のスタック領域を持っ
たタスクがリアルタイムOSを介して並列に実行され
る。タスクは処理がすべて終わると、自タスク終了シス
テムコールを呼び出し、リアルタイムOSにタスクの終
了を通知する。リアルタイムOSは、タスクの終了を検
知すると、システムコールの発行元のタスクのスタック
領域を解放してしまうので、「PC=戻りアドレス」の
条件で処理を中断させる従来の方法では、プロシージャ
・ステップ実行動作を終了させることができなかった。
In a multitask system, tasks having individual stack areas as shown in FIG. 3 are executed in parallel via a real-time OS. When all the tasks are completed, the task calls its own task termination system call and notifies the real-time OS of the task termination. When the real-time OS detects the end of the task, the real-time OS releases the stack area of the task that issued the system call. Therefore, in the conventional method in which the processing is interrupted under the condition of “PC = return address”, the procedure / step execution is performed. The operation could not be terminated.

【0021】例えば、図4に示すような動作をするプロ
グラムについて考える。
For example, consider a program that operates as shown in FIG.

【0022】図4は、左端に時間、中央に実行中のプロ
グラム(タスク,関数,リアルタイムOS)、右端に当
該時間で命令を実行した直後のスタック状態を示してい
る。タスクは、タスク1,タスク2,タスク3の3つが
あり、関数1はタスク1に含まれるサブプログラムであ
り、関数2はタスク2に含まれるサブプログラムであ
る。各タスク1,2,3は、対応するスタック1,2,
3をそれぞれ有している。これらスタックにおいて、ス
タック・ポインタの示すアドレスを斜線で示している
(ただし、リアルタイムOS処理中についてはOS用の
スタックを持っていたり、スタック切り替えのタイミン
グが異なったりするため、図4とは異なる場合があ
る。)。
FIG. 4 shows the time at the left end, the program (task, function, real-time OS) being executed at the center, and the stack state immediately after executing the instruction at the right end at the right end. There are three tasks, task 1, task 2, and task 3. Function 1 is a subprogram included in task 1, and function 2 is a subprogram included in task 2. Each task 1, 2, 3 has a corresponding stack 1, 2,
3 respectively. In these stacks, the addresses indicated by the stack pointers are indicated by diagonal lines (however, when the real-time OS processing is being performed, the stack may have a stack for the OS, or the timing of stack switching may be different, so that the case different from FIG. There is.).

【0023】例えば、時間T1において実行しているの
はタスク1のプログラムであり、このとき命令「CAL
L SYSCALL」を実行すると、タスク1用のスタ
ック1のスタック・ポインタの示すアドレスに、スタッ
ク1への戻りアドレスAが格納され、リアルタイムOS
に実行が移る。(タスク2およびタスク3用のスタック
2,3には、この時点ですでに戻りアドレスEおよびG
が格納されているが、これはそれぞれのタスクが時間T
1以前に実行されていたことを意味する)。
For example, what is being executed at time T1 is the program of task 1, and at this time, the instruction "CAL
When "L SYSCALL" is executed, the return address A to the stack 1 is stored at the address indicated by the stack pointer of the stack 1 for the task 1, and the real-time OS
Execution moves to. (The stacks 2 and 3 for task 2 and task 3 already have return addresses E and G at this point.
Is stored, which means that each task has time T
1 before).

【0024】次に、時間T2においてリアルタイムOS
の処理が終了すると、OS自身の管理によりタスク1の
アドレスAに処理が復帰する。
Next, at time T2, the real-time OS
Is completed, the process returns to the address A of the task 1 under the management of the OS itself.

【0025】次に、時間T3において、命令「CALL
FUNC1」を実行すると、スタック1への戻りアド
レスDがスタック1に格納され、関数1に実行が移る。
関数1を実行中に、命令「CALL SYSCALL
2」を実行すると、スタック1に関数1への戻りアドレ
スBが格納され、リアルタイムOSに実行が移る。
Next, at time T3, the instruction "CALL"
When "FUNC1" is executed, the return address D to the stack 1 is stored in the stack 1, and the execution shifts to the function 1.
During execution of function 1, the instruction "CALL SYSCALL"
When "2" is executed, the return address B to the function 1 is stored in the stack 1, and the execution shifts to the real-time OS.

【0026】次に、時間T5においてリアルタイムOS
の処理が終了すると、OS自身の管理により関数1のア
ドレスBに処理が復帰する。
Next, at time T5, the real-time OS
Is completed, the process returns to the address B of the function 1 under the management of the OS itself.

【0027】次に、関数1の実行中に時間T6におい
て、命令「CALL FUNC3」を実行すると、スタ
ック1に関数1への戻りアドレスCが格納され、リアル
タイムOSに実行が移る。
Next, when the instruction "CALL FUNC3" is executed at the time T6 during the execution of the function 1, the return address C to the function 1 is stored in the stack 1 and the execution shifts to the real-time OS.

【0028】次に、時間T7においてリアルタイムOS
の処理が終了すると、OS自身の管理により関数1のア
ドレスCに処理が復帰する。
Next, at time T7, the real-time OS
Is completed, the process returns to the address C of the function 1 under the management of the OS itself.

【0029】関数1の実行において、RET命令が実行
されると、タスク1のアドレスDに処理が復帰する。
In execution of the function 1, when the RET instruction is executed, the processing returns to the address D of the task 1.

【0030】時間T9〜T13に見られるように、タス
ク1でSYSCALL4を呼び出した後に、リアルタイ
ムOSの管理によりタスク2に実行が移った場合には、
タスク2ではスタック2が使用され、スタック1が変化
することはない。また、スタックが切り替わるのに伴っ
てスタック・ポインタもスタック2を示すように変更さ
れる。
As seen from the time T9 to T13, if the execution is transferred to the task 2 by the management of the real-time OS after calling the SYSCALL4 in the task 1,
In task 2, stack 2 is used, and stack 1 does not change. In addition, the stack pointer is changed to indicate the stack 2 as the stack switches.

【0031】時間T13でOS自身の管理によりタスク
1に実行が移り、時間T14でタスク終了システムコー
ルである命令「CALL SYSCALL6」が実行さ
れたとする。「CALL SYSCALL6」によっ
て、スタック1にはタスク1への戻り予定アドレスX
(実際には戻ることはないが)が格納される。また、図
4では時間T14以後もスタック1が存在するように示
されているが、通常は不要なリソースを解放するため
に、タスク終了をリアルタイムOSが検知した段階で、
スタック1の領域は解放され空き領域として扱われるこ
とになる。
At time T13, execution shifts to task 1 under the control of the OS itself, and it is assumed that the command "CALL SYSCALL6", which is a task end system call, is executed at time T14. By “CALL SYSCALL6”, the return address X to the task 1 is set in the stack 1
(Although it never returns). Also, FIG. 4 shows that the stack 1 exists after the time T14, but normally, in order to release unnecessary resources, when the real-time OS detects the end of the task,
The area of the stack 1 is released and treated as a free area.

【0032】なお、以上の処理では、前述したように、
リアルタイムOSからタスクへ戻る動作は、OS自身が
管理している。また、リアルタイムOSでは、各タスク
毎に関数の戻りアドレスを管理できるので、各タスク毎
に独自に関数の呼び出しができる。
In the above processing, as described above,
The operation of returning to the task from the real-time OS is managed by the OS itself. Further, in the real-time OS, since the return address of the function can be managed for each task, the function can be independently called for each task.

【0033】以上のようなプログラムにおいて、タスク
のデバッグを行う場合、 ・システムコールを呼び出すと、処理後にそのまま自タ
スクに戻ってくる場合(時間T1〜T2での処理) ・関数を呼ぶと、関数内部でシステムコールを呼び出
し、自タスクに戻ってきてから関数が終わる場合(時間
T3〜T8での処理) ・システムコールを呼び出すと、他タスクの実行をして
から自タスクに戻ってくる場合(時間T9〜T13での
処理) などについては、タスク1のスタックが他タスクと独立
しているため、自タスクに戻ってきた場所で、PC=戻
りアドレスの条件で実行を中断することができる。
In the program as described above, when debugging a task: When a system call is called, the process returns to the invoking task as it is (processing at time T1 to T2). When a system call is called internally and the function ends after returning to the invoking task (processing at time T3 to T8). When calling a system call, returning to the invoking task after executing another task ( (Processing from time T9 to T13) For example, since the stack of task 1 is independent of other tasks, execution can be interrupted at the place where the task returns to its own task under the condition of PC = return address.

【0034】一方、タスク終了システムコールを呼び出
すと自タスクが終了する場合(時間T14での処理)
は、リアルタイムOSがタスク1のスタック1を解放し
て空き領域としてしまうため、プログラムカウンタPC
が戻りアドレスに一致することがないので、実行は中断
しない。
On the other hand, when the task is terminated when the task termination system call is invoked (processing at time T14)
Is because the real-time OS releases the stack 1 of the task 1 and makes the stack 1 an empty area.
Does not match the return address, so execution is not interrupted.

【0035】以上のように、リアルタイムOSを使用し
たプログラムは、タスクを切り替えるために特定のシス
テムコールをタスクから呼び出すが、システムコールの
中には自タスクを終了するためのものがあり、このよう
な自タスク終了のシステムコールが呼び出されると、デ
バッグ処理が中断しない。
As described above, a program using the real-time OS calls a specific system call from a task in order to switch a task, and some system calls are for terminating the task itself. When the system call for terminating the invoking task is called, the debugging process is not interrupted.

【0036】本発明の目的は、リアルタイムOSを使用
したマルチタスク・システムにおいて、自タスク終了を
行うシステムコールが呼び出されても、デバッグの実行
動作を終了することのできるデバッグ方法および装置を
提供することにある。
An object of the present invention is to provide a debugging method and apparatus capable of terminating a debugging execution operation even when a system call for terminating its own task is called in a multitask system using a real-time OS. It is in.

【0037】本発明の他の目的は、デバッグ方法を実施
するプログラムを記録した記録媒体を提供することにあ
る。
Another object of the present invention is to provide a recording medium on which a program for executing a debugging method is recorded.

【0038】[0038]

【課題を解決するための手段】本発明によれば、自タス
ク(システムコールの呼び出し元)を終了してしまうよ
うなシステムコールのプロシージャ・ステップ実行を、
デバッガにリアルタイムOSの内部情報を保持させ、被
デバッグ・プログラムから呼び出されたシステムコール
の種類を判別し、自タスク終了システムコールの場合
は、リアルタイムOS内部にイベントブレークを設定し
て実行することにより、リアルタイムOSの処理が終了
した時点でプログラム実行を中断させる。
According to the present invention, a procedure / step execution of a system call that terminates its task (the caller of the system call) is provided.
By allowing the debugger to retain the internal information of the real-time OS, determining the type of system call called from the program to be debugged, and in the case of the invoking task end system call, setting an event break inside the real-time OS and executing it When the processing of the real-time OS ends, the program execution is interrupted.

【0039】本発明のリアルタイムOS上で並列に実行
される複数のタスクをデバッグする方法は、リアルタイ
ムOSの内部情報を保持させるステップと、CALL命
令であるか否かを判別するステップと、CALL命令で
あれば、そのCALL命令が、自タスク終了システムコ
ールであるか否かを、前記内部情報を参照して判別する
ステップと、自タスク終了システムコールであれば、前
記内部情報を参照してリアルタイムOS内部にイベント
ブレークを設定して、プロシージャ・ステップを実行す
るステップと、前記イベントブレークを検出した後に、
プロシージャ・ステップの実行を終了させるステップと
を含んでいる。
A method of debugging a plurality of tasks executed in parallel on a real-time OS according to the present invention includes a step of retaining internal information of the real-time OS, a step of determining whether or not the information is a CALL instruction; If the CALL instruction is a self-task termination system call, it is determined whether or not the CALL instruction is a self-task termination system call by referring to the internal information. Setting an event break inside the OS and executing a procedure step; and detecting the event break,
Terminating the execution of the procedure step.

【0040】リアルタイムOS上で並列に実行される複
数のタスクをデバッグする装置は、リアルタイムOSの
内部情報を保持する手段と、CALL命令であるか否か
を判別する手段と、CALL命令であれば、そのCAL
L命令が、自タスク終了システムコールであるか否か
を、前記内部情報を参照して判別する手段と、自タスク
終了システムコールであれば、前記内部情報を参照して
リアルタイムOS内部にイベントブレークを設定して、
プロシージャ・ステップを実行する手段と、前記イベン
トブレークを検出した後に、プロシージャ・ステップの
実行を終了させる手段とを有している。
An apparatus for debugging a plurality of tasks executed in parallel on the real-time OS includes a means for holding internal information of the real-time OS, a means for determining whether or not the instruction is a CALL instruction; , That CAL
Means for determining whether or not the L instruction is a self-task termination system call by referring to the internal information; and, if the L instruction is a self-task termination system call, an event break in the real-time OS by referring to the internal information. And set
It has means for executing a procedure step, and means for terminating the execution of the procedure step after detecting the event break.

【0041】さらに本発明のリアルタイムOS上で並列
に実行される複数のタスクをデバッグするプログラムを
記録しした記録媒体は、前記プログラムは、リアルタイ
ムOSの内部情報を保持させるステップと、CALL命
令であるか否かを判別するステップと、CALL命令で
あれば、そのCALL命令が、自タスク終了システムコ
ールであるか否かを、前記内部情報を参照して判別する
ステップと、自タスク終了システムコールであれば、前
記内部情報を参照してリアルタイムOS内部にイベント
ブレークを設定して、プロシージャ・ステップを実行す
るステップと、前記イベントブレークを検出した後に、
プロシージャ・ステップの実行を終了させるステップを
含んでいる。
Further, according to the present invention, there is provided a recording medium recording a program for debugging a plurality of tasks executed in parallel on a real-time OS, wherein the program is a step of holding internal information of the real-time OS, and a CALL instruction. Determining whether or not the CALL instruction is a self-task termination system call by referring to the internal information; and If so, setting an event break inside the real-time OS with reference to the internal information and executing a procedure step; and after detecting the event break,
Terminating the execution of the procedure step.

【0042】[0042]

【発明の実施の形態】図5は、本発明のデバッグ装置
(またはデバッガ)の機能ブロック図である。このデバ
ッガ40は、図1に示す従来のデバッガに比べて、プロ
シージャ・ステップ実行部24の機能が異なり、さらに
OS情報テーブル34を有している。
FIG. 5 is a functional block diagram of a debugging device (or debugger) of the present invention. This debugger 40 differs from the conventional debugger shown in FIG. 1 in the function of the procedure / step execution unit 24, and further has an OS information table 34.

【0043】プロシージャ・ステップ実行部24は、命
令がCALL命令であるかどうかを判断する命令判断部
26と、CALL命令が自タスク終了システムコールで
あるかどうかを判断する関数判断部28と、タスク終了
関数を実行する実行部30と、タスク終了関数以外の通
常関数を実行する実行部32とを有している。
The procedure / step execution unit 24 includes an instruction determination unit 26 for determining whether the instruction is a CALL instruction, a function determination unit 28 for determining whether the CALL instruction is a self-task termination system call, An execution unit 30 executes an end function, and an execution unit 32 executes a normal function other than the task end function.

【0044】このデバッガによるデバッグ方法を説明す
る前に、システムコールの呼び出し方法について説明す
る。
Before describing a debugging method using this debugger, a method for calling a system call will be described.

【0045】システムコールの呼び出し方法には、タス
クからシステムコールを直接呼び出す方式と、リアルタ
イムOSにシステムコールIDを渡して、OS内の共通
の入口であるOSエントリから分岐させる間接呼び出し
方式とがある。
As a method of calling a system call, there are a method of directly calling a system call from a task and an indirect calling method of passing a system call ID to a real-time OS and branching from an OS entry which is a common entrance in the OS. .

【0046】図6は、システムコール直接呼び出し方式
を示すリアルタイムOSの内部処理フローチャートであ
る。また、図7は、システムコール間接呼び出し方式を
示すリアルタイムOSの内部処理フローチャートであ
る。これら図は、OSコード領域を併せて示している。
FIG. 6 is a flowchart of the internal processing of the real-time OS showing the system call direct calling method. FIG. 7 is an internal processing flowchart of the real-time OS showing the system call indirect calling method. These figures also show the OS code area.

【0047】システムコール直接呼び出し方式では、タ
スク上に、 CALL SYSCALL1 のように、システムコールのアドレスをCALL命令の
オペランドとして記述する。
In the system call direct calling method, the address of a system call is described as an operand of a CALL instruction on a task, such as CALL SYSCALL1.

【0048】一方、間接呼び出し方式では、 MOV RG1,SYSCALL_ID1 CALL OS_ENTRY のように、システムコールIDをレジスタ等を用いてO
Sエントリへの引数として渡す。OSエントリでは、こ
のシステムコールIDに基づいて対応するシステムコー
ルへ分岐する。
On the other hand, in the indirect calling method, a system call ID is registered using a register or the like as in MOV RG1, SYSCALL_ID1 CALL OS_ENTRY.
Pass as an argument to the S entry. The OS entry branches to a corresponding system call based on the system call ID.

【0049】直接呼び出し方式では、CALL命令のオ
ペランドを、間接呼び出し方式では,OSエントリへの
引数を、それぞれ解析することによってシステムコール
の種類を判別することができる。
In the direct call method, the type of the system call can be determined by analyzing the operand of the CALL instruction, and in the indirect call method, by analyzing the argument to the OS entry.

【0050】判別した結果に基づいて、システムコール
(OS)の終了アドレスを割り出し、割り出されたOS
終了アドレスにイベントブレークを設定してリアルタイ
ム・エミュレーションを行うことによって、システムコ
ール(OS)処理が終わった箇所で実行を中断すること
ができる。したがって、デバッガのテーブル34に保持
させるOS情報には、 ・システムコールを特定するためのルール ・直接呼び出しか間接呼び出しか ・引数として使用されるレジスタ,メモリの種類 ・自タスク終了システムコールの情報 ・システムコールのアドレスまたはシステムコールID ・OSエントリ・アドレス ・システムコール(OS)の終了位置情報 が必要である。
The end address of the system call (OS) is determined based on the result of the determination, and the determined OS
By setting an event break at the end address and performing real-time emulation, execution can be interrupted at the point where the system call (OS) processing has been completed. Therefore, the OS information held in the table 34 of the debugger includes: rules for specifying a system call; direct call or indirect call; types of registers and memory used as arguments; System call address or system call ID OS entry address System call (OS) end position information is required.

【0051】図8は、図5のデバッガ40の動作を示す
フローチャートである。このフローチャートを参照しな
がら、プロシージャ・ステップの実行処理について説明
する。
FIG. 8 is a flowchart showing the operation of the debugger 40 of FIG. The execution process of the procedure / step will be described with reference to this flowchart.

【0052】まず、プロシージャ・ステップ実行部24
の命令判別部26は、ステップ実行中のプログラムにお
いて、実行する命令がCALL命令かどうかを判別し
(ステップS1)、CALL命令でなければ(No)、
その命令だけをステップ実行部16で実行して(ステッ
プS2)終了する。
First, the procedure / step execution unit 24
The command determining unit 26 determines whether the command to be executed is a CALL command in the program being step-executed (step S1), and if the command is not the CALL command (No),
Only the instruction is executed by the step execution unit 16 (step S2), and the process ends.

【0053】CALL命令の場合(Yes)は、関数判
別部28がOS情報テーブル34から「システムコール
を特定するためのルール」,「自タスク終了システムコ
ールの情報」を読み出し、自タスク終了システムコール
かどうかを判別する(ステップS3)。
In the case of the CALL instruction (Yes), the function discriminating unit 28 reads out “rules for specifying system calls” and “information of the own task termination system call” from the OS information table 34, and It is determined whether or not (Step S3).

【0054】図9および図10に、関数判別部28の処
理を示すフローチャートを示す。図9は、システムコー
ルの呼び出しが直接行われる場合、すなわちシステムコ
ール直接呼び出しの場合の処理を、図10は、システム
コールの呼び出しがOSエントリを介して行われる場
合、すなわちシステムコール間接呼び出しの場合の処理
を示している。
FIGS. 9 and 10 are flowcharts showing the processing of the function determining section 28. FIG. 9 shows the processing when the system call is directly called, that is, the processing when the system call is directly called, and FIG. 10 shows the processing when the system call is called via the OS entry, that is, the case when the system call is called indirectly. Is shown.

【0055】図9の直接呼び出しにおいて、関数判別部
28は、OS情報テーブル34より、自タスク終了シス
テムコール情報(シンボル/アドレス)を抽出し、自タ
スク終了システムコールの先頭アドレスを計算し、保持
する。一方、関数判別部は、CALL命令のオペランド
(呼び出し先アドレス)を獲得した後、保持されている
先頭アドレスを参照し、自タスク終了システムコール先
頭アドレスを取得する。呼び出し先アドレスが、この先
頭アドレスに一致すると、タスク終了関数実行部30の
処理へ、不一致であれば通常関数実行部32の処理へ進
む。
In the direct call shown in FIG. 9, the function discriminating unit 28 extracts the own task end system call information (symbol / address) from the OS information table 34, calculates the start address of the own task end system call, and holds it. I do. On the other hand, after acquiring the operand (call destination address) of the CALL instruction, the function determining unit refers to the held start address to obtain the start address of the invoking task termination system call. If the call destination address matches the start address, the process proceeds to the process of the task termination function execution unit 30. If not, the process proceeds to the process of the normal function execution unit 32.

【0056】図10において、関数判別部28は、OS
情報テーブル34より、OSエントリ・アドレスを抽出
し、および自タスク終了システムコールID(番号/ア
ドレス)を抽出し、保持する。一方、関数判別部は、C
ALL命令のオペランド(呼び出し先アドレス)を獲得
した後、保持しているOSエントリ・アドレスを参照し
て、OSエントリ・アドレスを取得する。
In FIG. 10, the function discriminating unit 28 is provided by the OS
The OS entry address is extracted from the information table 34, and the own task termination system call ID (number / address) is extracted and held. On the other hand, the function determining unit
After the operand (call destination address) of the ALL instruction is obtained, the OS entry address is obtained by referring to the stored OS entry address.

【0057】呼び出し先アドレスが、このOSエントリ
・アドレスに一致すれば引数を取得する。保持している
自タスク終了システムコールIDを参照して、引数が自
タスク終了システムコールIDと一致するかどうかを判
断する。一致すれば、タスク終了関数実行部30の処理
へ、不一致であれば通常関数実行部32の処理へ進む。
また、前述したOSエントリ・アドレスが呼び出し先ア
ドレスに不一致の場合にも、通常関数実行部32の処理
へ進む。
If the call destination address matches this OS entry address, an argument is obtained. By referring to the held own task end system call ID, it is determined whether the argument matches the own task end system call ID. If they match, the process proceeds to the task termination function execution unit 30, and if they do not match, the process proceeds to the normal function execution unit 32.
Further, even when the OS entry address does not match the callee address, the process proceeds to the normal function execution unit 32.

【0058】図8に戻り、関数判別部28で、自タスク
終了システムコールでないと判別された場合には、通常
関数実行部32に通常のプロシージャ・ステップを実行
させる(ステップS4)。この通常のプロシージャ・ス
テップは、図2で説明したプロシージャ・ステップと同
一である。
Referring back to FIG. 8, when the function discriminating section 28 determines that the call is not the invoking task end system call, the normal function executing section 32 executes a normal procedure step (step S4). This normal procedure step is the same as the procedure step described in FIG.

【0059】自タスク終了システムコールであれば、タ
スク終了関数実行部30は、ユーザが設定したイベント
を退避し、すべてのイベントブレークを解除すなわち無
効にする(ステップS5)。
If it is the self-task termination system call, the task termination function execution unit 30 saves the event set by the user and releases or invalidates all event breaks (step S5).

【0060】なお、図11には、図8に示すタスク関数
実行部の処理フローとほぼ同じであるが、OS終了アド
レスの確定の処理を追加して示すフローチャートを示
す。
FIG. 11 is a flowchart that is almost the same as the processing flow of the task function execution unit shown in FIG. 8, but additionally includes processing for determining the OS end address.

【0061】図11において、タスク終了関数実行部3
0は、OS情報テーブル34より、システムコール(O
S)の終了位置情報(シンボル/アドレス)を抽出し、
OS終了アドレスを計算し、保持する。一方、タスク終
了関数実行部は、保持されたOS終了アドレスを確定す
る。
In FIG. 11, the task termination function execution unit 3
0 indicates a system call (O
Extract the end position information (symbol / address) of S),
Calculate and hold the OS end address. On the other hand, the task termination function execution unit determines the stored OS termination address.

【0062】図8に戻り、確定されたOS終了アドレス
へ実行後イベントブレークを設定する(ステップS
6)。
Returning to FIG. 8, after the execution, an event break is set to the determined OS end address (step S).
6).

【0063】次に、タスク終了関数実行部30およびリ
アルタイム・エミュレーション部14は、タスク終了関
数のリアルタイム・エミュレーションを開始する(ステ
ップS7)。
Next, the task termination function execution unit 30 and the real-time emulation unit 14 start real-time emulation of the task termination function (step S7).

【0064】OS終了アドレスをアクセスしたことによ
り、実行後イベントブレークを検出すると(ステップS
8)、リアルタイム・エミュレーションを中断する(ス
テップS9)。
When an event break is detected after execution by accessing the OS end address (step S
8), the real-time emulation is interrupted (step S9).

【0065】次に、ステップS6で設定した実行後イベ
ントブレークを解除する(ステップS10)。
Next, the post-execution event break set in step S6 is released (step S10).

【0066】最後に、ステップS5で退避したユーザの
イベントを復元し(ステップS11)、タスク終了関数
の実行を終了する。
Finally, the event of the user saved in step S5 is restored (step S11), and the execution of the task end function ends.

【0067】以上説明したデバッガによれば、自タスク
終了システムコールが呼び出されても、リアルタイムO
Sの処理が終了した時点でプログラム実行を中断させる
ことができる。
According to the debugger described above, even if the own task termination system call is called, the real-time O
The program execution can be interrupted when the processing of S is completed.

【0068】このようなデバッガは、プログラムで構成
することができる。
Such a debugger can be constituted by a program.

【0069】[0069]

【発明の効果】本発明によれば、自タスクを終了してし
まうようなシステムコールのプロシージャ・ステップ実
行を、デバッガにリアルタイムOSの内部情報を保持さ
せ、被デバッグ・プログラムから呼び出されたシステム
コールの種類を判別し、自タスク終了システムコールの
場合は、リアルタイムOS内部にイベントブレークを設
定して実行することにより、リアルタイムOSの処理が
終了した時点でプログラム実行を中断させるようにした
ので、マルチタスク・システムにおいて、自タスク終了
を行うシステムコールが呼び出されても、デバッグの実
行動作を終了することができる。
According to the present invention, the procedure step execution of the system call that terminates the invoking task is executed by causing the debugger to hold the internal information of the real-time OS and executing the system call called from the program to be debugged. In the case of the self-task termination system call, an event break is set in the real-time OS and executed, so that the program execution is interrupted when the processing of the real-time OS ends. In the task system, even when a system call for terminating the invoking task is called, the debug execution operation can be terminated.

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

【図1】従来のプロシージャ・ステップ処理方法を実施
するデバッガの機能ブロック図である。
FIG. 1 is a functional block diagram of a debugger that executes a conventional procedure / step processing method.

【図2】図1のデバッガによるプロシージャ・ステップ
の実行を説明するフローチャートである。
FIG. 2 is a flowchart illustrating execution of a procedure step by the debugger of FIG. 1;

【図3】被デバッグ・プログラムを示す図である。FIG. 3 is a diagram showing a program to be debugged.

【図4】特定の動作をするプログラムを説明するための
図である。
FIG. 4 is a diagram for describing a program that performs a specific operation.

【図5】本発明のデバッグ装置の機能ブロック図であ
る。
FIG. 5 is a functional block diagram of the debugging device of the present invention.

【図6】システムコール直接呼び出し方式を示すリアル
タイムOSの内部処理フローチャートである。
FIG. 6 is a flowchart of internal processing of a real-time OS showing a system call direct calling method.

【図7】システムコール間接呼び出し方式を示すリアル
タイムOSの内部処理フローチャートである。
FIG. 7 is an internal processing flowchart of a real-time OS showing a system call indirect call method;

【図8】図5のデバッガの動作を示すフローチャートで
ある。
8 is a flowchart showing the operation of the debugger of FIG.

【図9】関数判別の処理を示すフローチャートである。FIG. 9 is a flowchart illustrating a function determination process.

【図10】関数判別の処理を示すフローチャートであ
る。
FIG. 10 is a flowchart illustrating a function determination process.

【図11】タスク関数実行部の処理を説明するフローチ
ャートである。
FIG. 11 is a flowchart illustrating processing of a task function execution unit.

【符号の説明】[Explanation of symbols]

12 デバッグ命令解析部 14 リアルタイム・エミュレーション部 16 ステップ実行部 24 プロシージャ・ステップ実行部 26 命令判別部 28 関数判別部 30 タスク終了関数実行部 32 通常関数実行部 34 OS情報テーブル 40 デバッガ 12 Debug instruction analysis unit 14 Real-time emulation unit 16 Step execution unit 24 Procedure step execution unit 26 Instruction determination unit 28 Function determination unit 30 Task termination function execution unit 32 Normal function execution unit 34 OS information table 40 Debugger

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 11/28 - 11/36 G06F 9/46 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 11/28-11/36 G06F 9/46

Claims (15)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】リアルタイムOS上で並列に実行される複
数のタスクをデバッグする方法において、 リアルタイムOSの内部情報を保持させるステップと、 CALL命令であるか否かを判別するステップと、 CALL命令であれば、そのCALL命令が、自タスク
終了システムコールであるか否かを、前記内部情報を参
照して判別するステップと、 自タスク終了システムコールであれば、前記内部情報を
参照してリアルタイムOS内部にイベントブレークを設
定して、プロシージャ・ステップを実行するステップ
と、 前記イベントブレークを検出した後に、プロシージャ・
ステップの実行を了させるステップと、 を含むことを特徴とするデバッグ方法。
1. A method for debugging a plurality of tasks executed in parallel on a real-time OS, wherein: a step of retaining internal information of the real-time OS; a step of determining whether or not the real-time OS is a CALL instruction; If so, a step of determining whether or not the CALL instruction is an invoking task termination system call by referring to the internal information; Setting an event break therein and executing a procedure step; and detecting the event break,
Debugging method, wherein the step of executing comprises the step of exit, the.
【請求項2】前記内部情報として、システムコールを特
定するためのルールと、自タスク終了システムコールの
情報と、システムコールの終了位置情報とを含むことを
特徴とする請求項1記載のデバッグ方法。
2. The debugging method according to claim 1, wherein the internal information includes a rule for specifying a system call, information on a self-task termination system call, and information on a termination position of the system call. .
【請求項3】CALL命令が自タスク終了システムコー
ルであるか否かを判別する前記ステップは、 システムコールの呼び出しが、タスクからシステムコー
ルを直接呼び出す方式の場合には、前記システムコール
を特定するためのルールにより、直接呼び出し方式であ
ると判別し、さらに、前記自タスク終了システムコール
の情報により、自タスク終了システムコールの先頭アド
レスを計算し、CALL命令のオペランドとして記述さ
れたアドレスと前記先頭アドレスが一致したら、CAL
L命令は自タスク終了システムコールであると判別する
ことを特徴とする請求項2記載のデバッグ方法。
3. The step of judging whether or not the CALL instruction is an invoking task termination system call, wherein the system call is specified when the system call is directly invoked from a task. Is determined to be a direct call method, and based on the information of the invoking task termination system call, the head address of the invoking task termination system call is calculated. If the addresses match, CAL
3. The debugging method according to claim 2, wherein the L instruction is determined to be a self-task termination system call.
【請求項4】CALL命令が自タスク終了システムコー
ルであるか否かを判別する前記ステップは、 リアルタイムOSにシステムコールIDを渡してOSエ
ントリから分岐させる間接呼び出し方式の場合には、前
記システムコールを特定するためのルールにより、間接
呼び出し方式であることを判別し、さらに、前記自タス
ク終了システムコールの情報により、OSエントリ・ア
ドレスを取得し、このOSエントリ・アドレスがCAL
L命令のオペランドとして記述されたアドレスに一致し
たならば引数を取得し、この引数が自タスクシステムコ
ールIDと一致すると、CALL命令は自タスク終了シ
ステムコールであると判別することを特徴とする請求項
2記載のデバッグ方法。
4. The method according to claim 1, wherein the step of determining whether the CALL instruction is an invoking task termination system call is performed in the case of an indirect call system in which a system call ID is passed to a real-time OS to branch from an OS entry. Is determined based on the rule for specifying the indirect call method, and the OS entry address is obtained based on the information of the invoking task termination system call.
If the address matches the address described as the operand of the L instruction, an argument is obtained, and if the argument matches the own task system call ID, the CALL instruction is determined to be the own task end system call. Item 2. The debugging method according to Item 2.
【請求項5】前記イベントブレークは、前記システムコ
ールの終了位置情報から計算されたシステムコールの終
了アドレスに設定することを特徴とする請求項3または
4記載のデバッグ方法。
5. The debugging method according to claim 3, wherein the event break is set at a system call end address calculated from the system call end position information.
【請求項6】リアルタイムOS上で並列に実行される複
数のタスクをデバッグする装置において、 リアルタイムOSの内部情報を保持する手段と、 CALL命令であるか否かを判別する手段と、 CALL命令であれば、そのCALL命令が、自タスク
終了システムコールであるか否かを、前記内部情報を参
照して判別する手段と、 自タスク終了システムコールであれば、前記内部情報を
参照してリアルタイムOS内部にイベントブレークを設
定して、プロシージャ・ステップを実行する手段と、 前記イベントブレークを検出した後に、プロシージャ・
ステップの実行を終了させる手段と、 を有することを特徴とするデバッグ装置。
6. An apparatus for debugging a plurality of tasks executed in parallel on a real-time OS, means for holding internal information of the real-time OS, means for determining whether or not the command is a CALL instruction, If so, means for determining whether or not the CALL instruction is an invoking task termination system call by referring to the internal information; Means for setting an event break therein and executing a procedure step;
Means for ending the execution of the step, and a debugging device comprising:
【請求項7】前記内部情報として、システムコールを特
定するためのルールと、自タスク終了システムコールの
情報と、システムコールの終了位置情報とを含むことを
特徴とする請求項6記載のデバッグ装置。
7. The debugging device according to claim 6, wherein the internal information includes a rule for specifying a system call, information on a self-task termination system call, and information on a termination position of the system call. .
【請求項8】CALL命令が自タスク終了システムコー
ルであるか否かを判別する前記手段は、 システムコールの呼び出しが、タスクからシステムコー
ルを直接呼び出す方式の場合には、前記システムコール
を特定するためのルールにより、直接呼び出し方式であ
ると判別し、さらに、前記自タスク終了システムコール
の情報により、自タスク終了システムコールの先頭アド
レスを計算し、CALL命令のオペランドとして記述さ
れたアドレスと前記先頭アドレスが一致したら、CAL
L命令は自タスク終了システムコールであると判別する
ことを特徴とする請求項7記載のデバッグ装置。
8. The means for judging whether or not the CALL instruction is an invoking task termination system call, specifies the system call when the system call is a system for directly calling a system call from a task. Is determined to be a direct call method, and based on the information of the invoking task termination system call, the head address of the invoking task termination system call is calculated. If the addresses match, CAL
8. The debugging device according to claim 7, wherein the L instruction is determined to be a self-task termination system call.
【請求項9】CALL命令が自タスク終了システムコー
ルであるか否かを判別する前記手段は、 リアルタイムOSにシステムコールIDを渡してOSエ
ントリから分岐させる間接呼び出し方式の場合には、前
記システムコールを特定するためのルールにより、間接
呼び出し方式であることを判別し、さらに、前記自タス
ク終了システムコールの情報により、OSエントリ・ア
ドレスを取得し、このOSエントリ・アドレスがCAL
L命令のオペランドとして記述されたアドレスに一致し
たならば引数を取得し、この引数が自タスクシステムコ
ールIDと一致すると、CALL命令は自タスク終了シ
ステムコールであると判別することを特徴とする請求項
7記載のデバッグ装置。
9. The method according to claim 1, wherein said means for determining whether or not the CALL instruction is an invoking task termination system call comprises: Is determined based on the rule for specifying the indirect call method, and the OS entry address is obtained based on the information of the invoking task termination system call.
If the address matches the address described as the operand of the L instruction, an argument is obtained, and if the argument matches the own task system call ID, the CALL instruction is determined to be the own task end system call. Item 7. The debugging device according to Item 7.
【請求項10】前記イベントブレークは、前記システム
コールの終了位置情報から計算されたシステムコールの
終了アドレスに設定することを特徴とする請求項8また
は9記載のデバッグ装置。
10. The debugging device according to claim 8, wherein the event break is set at an end address of the system call calculated from the end position information of the system call.
【請求項11】リアルタイムOS上で並列に実行される
複数のタスクをデバッグするプログラムを記録した記録
媒体において、 前記プログラムは、リアルタイムOSの内部情報を保持
させるステップと、 CALL命令であるか否かを判別するステップと、 CALL命令であれば、そのCALL命令が、自タスク
終了システムコールであるか否かを、前記内部情報を参
照して判別するステップと、 自タスク終了システムコールであれば、前記内部情報を
参照してリアルタイムOS内部にイベントブレークを設
定して、プロシージャ・ステップを実行するステップ
と、 前記イベントブレークを検出した後に、プロシージャ・
ステップの実行を終了させるステップと、 を含むことを特徴とする記録媒体。
11. A recording medium on which a program for debugging a plurality of tasks executed in parallel on a real-time OS is recorded, the program comprising: a step of retaining internal information of the real-time OS; Determining whether or not the CALL instruction is a self-task termination system call by referring to the internal information; and if the CALL instruction is a self-task termination system call, Setting an event break inside the real-time OS with reference to the internal information and executing a procedure step;
Ending the execution of the step; and a recording medium.
【請求項12】前記内部情報として、システムコールを
特定するためのルールと、自タスク終了システムコール
の情報と、システムコールの終了位置情報とを含むこと
を特徴とする請求項11記載の記録媒体。
12. The recording medium according to claim 11, wherein said internal information includes a rule for specifying a system call, information on a self-task termination system call, and information on a termination position of a system call. .
【請求項13】CALL命令が自タスク終了システムコ
ールであるか否かを判別する前記ステップは、 システムコールの呼び出しが、タスクからシステムコー
ルを直接呼び出す方式の場合には、前記システムコール
を特定するためのルールにより、直接呼び出し方式であ
ると判別し、さらに、前記自タスク終了システムコール
の情報により、自タスク終了システムコールの先頭アド
レスを計算し、CALL命令のオペランドとして記述さ
れたアドレスと前記先頭アドレスが一致したら、CAL
L命令は自タスク終了システムコールであると判別する
ことを特徴とする請求項12記載の記録媒体。
13. The step of judging whether or not the CALL instruction is a self-task termination system call, wherein the system call is specified when the system call is a system for directly calling a system call from a task. Is determined to be a direct call method, and based on the information of the invoking task termination system call, the head address of the invoking task termination system call is calculated. If the addresses match, CAL
13. The recording medium according to claim 12, wherein the L instruction is determined to be a self-task termination system call.
【請求項14】CALL命令が自タスク終了システムコ
ールであるか否かを判別する前記ステップは、 リアルタイムOSにシステムコールIDを渡してOSエ
ントリから分岐させる間接呼び出し方式の場合には、前
記システムコールを特定するためのルールにより、間接
呼び出し方式であることを判別し、さらに、前記自タス
ク終了システムコールの情報により、OSエントリ・ア
ドレスを取得し、このOSエントリ・アドレスがCAL
L命令のオペランドとして記述されたアドレスに一致し
たならば引数を取得し、この引数が自タスクシステムコ
ールIDと一致すると、CALL命令は自タスク終了シ
ステムコールであると判別することを特徴とする請求項
12記載の記録媒体。
14. The method according to claim 1, wherein the step of determining whether or not the CALL instruction is an invoking task termination system call includes: Is determined based on the rule for specifying the indirect call method, and the OS entry address is obtained based on the information of the invoking task termination system call.
If the address matches the address described as the operand of the L instruction, an argument is obtained, and if the argument matches the own task system call ID, the CALL instruction is determined to be the own task end system call. Item 13. The recording medium according to Item 12.
【請求項15】前記イベントブレークは、前記システム
コールの終了位置情報から計算されたシステムコールの
終了アドレスに設定することを特徴とする請求項13ま
たは14記載の記録媒体。
15. The recording medium according to claim 13, wherein said event break is set at an end address of a system call calculated from end position information of said system call.
JP04162598A 1998-02-24 1998-02-24 Method and apparatus for debugging program Expired - Fee Related JP3159155B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04162598A JP3159155B2 (en) 1998-02-24 1998-02-24 Method and apparatus for debugging program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04162598A JP3159155B2 (en) 1998-02-24 1998-02-24 Method and apparatus for debugging program

Publications (2)

Publication Number Publication Date
JPH11238003A JPH11238003A (en) 1999-08-31
JP3159155B2 true JP3159155B2 (en) 2001-04-23

Family

ID=12613525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04162598A Expired - Fee Related JP3159155B2 (en) 1998-02-24 1998-02-24 Method and apparatus for debugging program

Country Status (1)

Country Link
JP (1) JP3159155B2 (en)

Also Published As

Publication number Publication date
JPH11238003A (en) 1999-08-31

Similar Documents

Publication Publication Date Title
US5740413A (en) Method and apparatus for providing address breakpoints, branch breakpoints, and single stepping
US5621886A (en) Method and apparatus for providing efficient software debugging
US5659679A (en) Method and apparatus for providing breakpoints on taken jumps and for providing software profiling in a computer system
US5511217A (en) Computer system of virtual machines sharing a vector processor
US5121472A (en) Method for replacing keyboard data using single step process mode
US5488688A (en) Data processor with real-time diagnostic capability
US6052774A (en) Apparatus and method for identifying exception routines indicated by instruction address issued with an instruction fetch command
JPS634346A (en) Microprocessor debugging apparatus
US20030177476A1 (en) Debugging multiple threads or processes
US20040098639A1 (en) Debugging kernel-loadable modules and suspending and replacing functions in non-microkernel operating systems
US20100251026A1 (en) Debugging program function
US6735774B1 (en) Method and apparatus for system call management
US6131109A (en) Multitask processor, a multitask processing method, a multitask processing display method and a storage medium for processing by correlating task and object
JP3159155B2 (en) Method and apparatus for debugging program
IE880818L (en) Apparatus and method for synchronization of arithmetic¹exceptions in central processing units having pipelined¹execution units simultaneously executing instructions
JP2735523B2 (en) Procedure / step processing method
JP2002351695A (en) Debugging method for program, debugging device and recording medium for program debugging
JP2000181748A (en) Debug system for multi-memory space program and its debug method
JP2788353B2 (en) Task trace method
JP2743889B2 (en) Method and apparatus for program evaluation
JP3039450B2 (en) Stack area switching method and method, and storage medium storing stack area switching program
JP3120841B2 (en) In-circuit emulator
JPH08305607A (en) Program debugging method and debugger for multiprocessor system
JPH10161904A (en) Debugging device and method for dealing with plural languages
JPS59202548A (en) Debugging device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees