JPH11272501A - Debugger processing method and real-time OS processing method - Google Patents
Debugger processing method and real-time OS processing methodInfo
- Publication number
- JPH11272501A JPH11272501A JP10070203A JP7020398A JPH11272501A JP H11272501 A JPH11272501 A JP H11272501A JP 10070203 A JP10070203 A JP 10070203A JP 7020398 A JP7020398 A JP 7020398A JP H11272501 A JPH11272501 A JP H11272501A
- Authority
- JP
- Japan
- Prior art keywords
- task
- time
- execution
- real
- processing method
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
(57)【要約】
【課題】 マルチタスクシステムにおいて、タスク切替
え時間の増大を伴わず、タスクブレークを確実に機能さ
せる。
【解決手段】 モニタプログラム101が、デバック対
象タスクのブレーク時に、実行タスクIDをリアルタイ
ムOS102へのシステムコールで取得し、ユーザによ
り指定されたデバッグ対象タスクIDと比較し、等しく
なければ実行再開し、等しければデバッガ専用のタスク
停止のシステムコールをリアルタイムOS102へ発行
し、そのタスクを停止させる。これによって、リアルタ
イムOS102が実行タスクIDを特定領域に格納する
処理が不要となり、タスク切り替え時間を削減でき、ま
た、いったんタスク停止したタスクが、後続のユーザタ
スクによって再び起床されてしまう問題を回避できる。
(57) [Summary] [PROBLEMS] In a multitasking system, a task break function is ensured without increasing task switching time. A monitor program obtains an execution task ID by a system call to a real-time OS when a debug target task breaks, compares it with a debug target task ID specified by a user, and resumes execution if not equal. If they are equal, a system call for stopping the task dedicated to the debugger is issued to the real-time OS 102 to stop the task. This eliminates the need for the real-time OS 102 to store the execution task ID in the specific area, thereby reducing the task switching time and avoiding the problem that a task that has been stopped once is woken up again by a subsequent user task. .
Description
【0001】[0001]
【発明の属する技術分野】本発明は、計算機上で動作さ
せるアプリケーションソフトウェアの効率の良いデバッ
グを支援するためのデバッガの処理方法、および計算機
上で動作させるアプリケーションソフトウェアをタスク
を実行単位とした並行動作(マルチタスク)として制御
するリアルタイムOS(Real Time Operating System)
の処理方法に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processing method of a debugger for supporting efficient debugging of application software running on a computer, and a parallel operation of the application software running on the computer as a task as an execution unit. Real-time OS (Real Time Operating System) controlled as (multitask)
In the processing method.
【0002】[0002]
【従来の技術】計算機アプリケーションソフトウェアの
デバッガ装置は、少なくとも、被デバッグプログラムの
ロード、メモリやCPUレジスタの読み書き、プログラ
ム実行、および停止といったシステムデバッグのため必
要な機能を備える装置である。一方、従来のデバッガ装
置としてのタスクレベルのデバッガ装置(以後、タスク
レベルデバッグ装置と称す。また、区別のためシステム
デバッグのためのデバッグ装置はシステムデバッグ装置
と称す)は、少なくとも、タスク単位の実行および停止
といったタスクデバッグのため必要な機能を備える装置
である。2. Description of the Related Art A debugger for computer application software has at least functions necessary for system debugging, such as loading a program to be debugged, reading and writing a memory and a CPU register, executing a program, and stopping. On the other hand, a task-level debugger as a conventional debugger (hereinafter referred to as a task-level debugger, and for the sake of distinction, a debugger for system debugging is referred to as a system debugger) is at least executed in task units. This is a device having functions necessary for task debugging such as stop and stop.
【0003】システムデバッグ装置とタスクレベルデバ
ッグ装置のプログラム実行・停止の機能には、つぎのよ
うな相違点がある。すなわち、タスクレベルデバッガ装
置は、実行・停止の状態を切り替えるために、リアルタ
イムOSが管理するラン(RUN)状態やレディ(RE
ADY)状態やサスペンド(SUSPEND)状態等に
遷移させることで、被デバッグタスクを制御する。The functions of the system debug device and the task level debug device for executing and stopping a program have the following differences. In other words, the task-level debugger switches between a run (RUN) state and a ready (RE)
The debugged task is controlled by making a transition to an (ADY) state or a suspend (SUSPEND) state.
【0004】サスペンド状態となったタスクは停止状態
となるが、システムレベルでは割り込み可能な状態であ
って、かつより高位の優先度のタスクは実行可能である
ため、システム全体としては停止しない。一方、システ
ムデバッグ装置におけるプログラム停止は、割り込み禁
止状態でモニタプログラムがでループし、デバッガに制
御を委ねる状態となって、システム全体が停止する。[0004] A suspended task is in a suspended state, but is in an interruptible state at a system level, and a task with a higher priority can be executed. Therefore, the entire system does not stop. On the other hand, when the program is stopped in the system debug device, the monitor program loops in the interrupt disabled state, leaving control to the debugger, and the entire system stops.
【0005】従来のリアルタイムOSの構成およびその
制御方法は、例えば、μITRON3.0標準ハンドブ
ック(パーソナルメディア発行)に記載されている。従
来のタスクレベルデバッグ装置のモニタプログラムの処
理方法は、例えば、特開平3−113648号公報に記
載されているように、ブレーク時の処理として、ブレー
ク発生以前の実行タスクID(Identification)の領域
を読み出すことで実行タスクIDを取得し、この実行タ
スクIDとユーザにより指定され記憶するデバッグ対象
タスクIDとを比較し、実行タスクIDとデバッグ対象
タスクIDとが一致しなければ、再びブレークしたアド
レスよりタスクの実行を再開し、一致すればデバッガに
制御を移し、システム全体を停止するか、または実行中
のタスクをサスペンド状態に遷移させ停止させる処理方
法が採られていた。[0005] The configuration of a conventional real-time OS and its control method are described in, for example, the µITRON 3.0 standard handbook (published by personal media). In a conventional method of processing a monitor program of a task-level debugging device, for example, as described in Japanese Patent Application Laid-Open No. 3-113648, an area of an execution task ID (Identification) before the occurrence of a break is set as a break processing. The execution task ID is obtained by reading, and the execution task ID is compared with the debug target task ID specified and stored by the user. If the execution task ID and the debug target task ID do not match, the execution task ID is obtained again from the address at which the break occurred. A processing method has been adopted in which task execution is resumed, and if they match, control is transferred to the debugger, and the entire system is stopped, or the running task is shifted to a suspended state and stopped.
【0006】図4は上述した処理方法において、被デバ
ッグタスク403とモニタプログラム401の処理内容
を示すフローチャートである。ここで、モニタプログラ
ム401の処理はNMI(Non Maskable Interrupt)で
起動する場合のNMIハンドラとして動作する処理を表
す。また、モニタプログラム401にはこの他に、図示
せぬ初期化ルーチンや他の割込みハンドラ等の既知の処
理を含むことがある。FIG. 4 is a flowchart showing the processing contents of the debugged task 403 and the monitor program 401 in the processing method described above. Here, the processing of the monitor program 401 represents processing that operates as an NMI handler when activated by an NMI (Non Maskable Interrupt). In addition, the monitor program 401 may include other known processes such as an initialization routine (not shown) and other interrupt handlers.
【0007】まず、被デバッグタスク403がブレーク
を発生する、つまりイリーガル命令等、ブレークを誘因
するブレーク命令を実行すると(ステップT1)、NM
Iハンドラに制御が移り、レジスタ退避等の前処理(ス
テップT2)の後、実行タスクIDの取得を行う(ステ
ップT3)。なお、実行タスクIDは、リアルタイムO
Sによって、タスク切り替えの度に特定の領域に格納さ
れ、実行タスクIDの取得は、その領域のデータを読み
出すことで実現される。First, when the debugged task 403 generates a break, that is, executes a break instruction causing a break such as an illegal instruction (step T1), the NM
The control is transferred to the I handler, and after performing preprocessing such as register saving (step T2), an execution task ID is obtained (step T3). The execution task ID is the real-time O
By S, the task is stored in a specific area every time the task is switched, and the acquisition of the execution task ID is realized by reading out the data of the area.
【0008】つぎに、実行タスクIDがデバッグ対象タ
スクIDに等しいか否かの判定を行い(ステップT
4)、等しければデバッガへ制御を移してシステム全体
を停止させるか、もしくは実行中のタスクをサスペンド
状態に遷移させ停止させ(図示せず)、等しくなけれ
ば、再び割り込まれたタスクのアドレスより実行を再開
する。なお、割り込み前に走っていたタスクは、割り込
み要因の発生によって、上記のように割り込まれたタス
クと呼ばれる。Next, it is determined whether or not the execution task ID is equal to the task ID to be debugged (step T).
4) If equal, transfer control to the debugger to stop the entire system, or shift the running task to the suspended state and stop it (not shown); if not equal, execute from the address of the interrupted task again Resume. The task running before the interruption is called the task interrupted as described above due to the occurrence of the interruption factor.
【0009】[0009]
【発明が解決しようとする課題】しかしながら、上記し
た従来のタスクレベルデバッガ装置には、つぎの2つの
問題がある。まず、第1の問題は、モニタプログラム4
01でブレーク発生以前の実行タスクIDを取得できる
ようにするため、リアルタイムOSはタスク切り替えの
度に実行タスクIDを特定の領域に格納しなければなら
ず、タスク切り替え時間が増大してしまうという問題で
ある。However, the above-mentioned conventional task level debugger has the following two problems. First, monitor program 4
01, the real-time OS must store the execution task ID in a specific area every time the task is switched, so that the task switching time increases. It is.
【0010】また、第2の問題として、モニタプログラ
ム401の処理によって、ブレーク発生以前の実行タス
クIDとデバッグ対象タスクIDとが一致した際に、タ
スクをサスペンド状態に遷移させ停止させる場合では、
後続の実行タスクが発行するシステムコールの処理によ
っては(例えば停止状態のタスクを再び起床させるシス
テムコールの発行処理を行った場合等)、タスクの停止
状態が維持されない場合があり、ユーザが意図した通り
にデバッグ操作を継続できなくなる問題がある。A second problem is that when the execution task ID before the occurrence of a break matches the task ID to be debugged by the processing of the monitor program 401, the task is shifted to the suspended state and stopped.
Depending on the processing of the system call issued by the succeeding execution task (for example, when the processing of issuing a system call that wakes up the stopped task is performed again), the stopped state of the task may not be maintained, and the user intends. There is a problem that the debugging operation cannot be continued as expected.
【0011】したがって、本発明の目的は、リアルタイ
ムOSにおけるタスク切り替え時間を減少させることが
できるデバッガの処理方法を提供することである。ま
た、本発明の他の目的は、タスク切り替え時間を減少さ
せることができるリアルタイムOSの処理方法を提供す
ることである。また、本発明のさらに他の目的は、後続
の実行タスクが発行するシステムコールの処理にかかわ
らず確実にタスクを停止状態にすることができ、ユーザ
が意図したとおりにデバッグを継続させることができる
リアルタイムOSの処理方法を提供することである。It is therefore an object of the present invention to provide a debugger processing method that can reduce the task switching time in a real-time OS. Another object of the present invention is to provide a real-time OS processing method that can reduce the task switching time. Still another object of the present invention is to allow a task to be reliably stopped regardless of the processing of a system call issued by a subsequent execution task, and to continue debugging as intended by the user. An object of the present invention is to provide a processing method of a real-time OS.
【0012】[0012]
【課題を解決するための手段】請求項1記載のデバッガ
の処理方法は、タスクレベルのデバッグの支援を行う方
法であり、ブレーク時の処理として、ブレーク発生以前
の実行タスクIDをシステムコールで取得する第1のス
テップと、ユーザにより指定され記憶する1つのデバッ
グ対象タスクIDと実行タスクIDとの比較を行う第2
のステップと、デバッグ対象タスクIDと実行タスクI
Dとが等しくなければ再びブレークしたアドレスよりタ
スクの実行を再開し、等しければタスクの実行を停止さ
せる第3のステップとを含むことを特徴とする。According to a first aspect of the present invention, there is provided a debugger processing method for supporting debugging at a task level. As a break processing, an execution task ID before a break occurs is acquired by a system call. And a second step of comparing one execution target task ID designated and stored by the user with a debug target task ID.
Step, debug target task ID and execution task I
If D is not equal, the execution of the task is resumed from the address where the break has occurred again, and if equal, the execution of the task is stopped.
【0013】この方法によれば、システムコールに応答
するリアルタイムOSにおいて、タスク切り替え時に実
行タスクIDを記憶する処理を省略できるため、リアル
タイムOSのタスク切り替え時間を減少させることがで
き、システム負荷を軽減することができる。請求項2記
載のデバッガの処理方法は、請求項1記載のデバッガの
処理方法において、タスクの実行停止をシステムコール
により実行することを特徴とする。According to this method, in the real-time OS responding to the system call, the process of storing the execution task ID at the time of task switching can be omitted, so that the task switching time of the real-time OS can be reduced and the system load can be reduced. can do. According to a second aspect of the present invention, there is provided the debugger processing method according to the first aspect, wherein the execution of the task is stopped by a system call.
【0014】この方法によれば、通常のタスクの停止と
ブレーク処理によるタスクの停止状態とを異ならせるこ
とが可能であり、ブレーク処理により停止するタスク
は、後続の実行タスクが発行するシステムコールの処理
にかかわらず確実に停止状態にすることが可能になる。
請求項3記載のリアルタイムOSの処理方法は、請求項
1記載のデバッガの処理方法を実現するための方法であ
り、現在実行中のタスクの実行タスクIDを通知するシ
ステムコール処理を実行することを特徴とする。According to this method, it is possible to make the normal task stop and the task stop state by the break processing different from each other, and the task stopped by the break processing is replaced by the system call issued by the subsequent execution task. Regardless of the processing, it is possible to surely bring the apparatus to a stop state.
A real-time OS processing method according to a third aspect is a method for realizing the debugger processing method according to the first aspect, and executes a system call process for notifying an execution task ID of a currently executing task. Features.
【0015】この方法によれば、タスク切り替え時に実
行タスクIDを記憶する処理を省略できるため、タスク
切り替え時間を減少させることができ、システム負荷を
軽減することができる。請求項4記載のリアルタイムO
Sの処理方法は、請求項1記載のデバッガの処理方法を
実現するための方法であり、リアルタイムOSが管理す
るタスク状態として、通常のラン状態、レディ状態、ウ
ェイト状態およびサスペンド状態等の各状態に加えて、
デバッガ指示により遷移する停止状態であるデバッグサ
スペンド(DEBUG SUSPEND)状態を追加
し、タスクをデバッグサスペンド状態へ遷移させるシス
テムコール処理とタスクをデバッグサスペンド状態より
元の状態へ復帰させるシステムコール処理とを実行可能
なことを特徴とする。According to this method, the process of storing the execution task ID at the time of task switching can be omitted, so that the task switching time can be reduced and the system load can be reduced. The real-time O according to claim 4
The processing method of S is a method for realizing the processing method of the debugger according to claim 1, wherein each of the task states managed by the real-time OS includes a normal run state, a ready state, a wait state, and a suspend state. In addition to,
A debug suspend (DEBUG SUSPEND) state, which is a stop state that transitions according to a debugger instruction, is added, and a system call processing for transitioning the task to the debug suspend state and a system call processing for returning the task from the debug suspend state to the original state are executed. It is characterized by being possible.
【0016】この方法によれば、ブレーク処理によるタ
スクを停止するときは、タスクを通常のサスペンド状態
とは別のデバッグサスペンド状態とすることができるの
で、ブレーク処理により停止するタスクは、後続の実行
タスクが発行するシステムコールの処理にかかわらず確
実に停止状態にすることが可能となる。According to this method, when the task by the break processing is stopped, the task can be set to the debug suspend state different from the normal suspend state. This makes it possible to reliably stop the system regardless of the processing of the system call issued by the task.
【0017】[0017]
【発明の実施の形態】以下、本発明の形態について、図
面を参照して説明する。図1は本発明の実施の形態に係
るデバッガ装置を含むデバッガシステムの全体構成を示
す概略図である。図1において、10はターゲットシス
テムであり、101はモニタプログラム、102はリア
ルタイムOS、103はマルチタスクシステムにおける
1つ以上のタスクを示す。20はターゲットシステム1
0と通信手段202により接続されるホストコンピュー
タであって、デバッガ201が利用者に対しターゲット
システム10上のタスク103に関するデバッグ機能を
提供する。30はユーザによって指定され記憶したデバ
ッグ対象タスクIDであり、特定の領域に格納されてい
る。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic diagram showing an overall configuration of a debugger system including a debugger device according to an embodiment of the present invention. In FIG. 1, reference numeral 10 denotes a target system, 101 denotes a monitor program, 102 denotes a real-time OS, and 103 denotes one or more tasks in a multitask system. 20 is the target system 1
0, which is a host computer connected to the communication means 202, and a debugger 201 provides a user with a debugging function for the task 103 on the target system 10. Reference numeral 30 denotes a debug target task ID designated and stored by the user, and is stored in a specific area.
【0018】図2は、リアルタイムOSが管理するタス
ク状態遷移の流れを示す概略図であり、矢印は状態間の
遷移の方向を表し、割り込みやユーザタスクからのシス
テムコールを契機として遷移する。同図において、40
はレディ状態、50はラン状態、60はウェイト状態、
70はサスペンド状態、80はデバッグサスペンド状態
である。従来例と異なるのは、タスクレベルデバッガの
ためのNMIハンドラからのシステムコール発行により
遷移するデバッグサスペンド状態80を有することであ
る。FIG. 2 is a schematic diagram showing the flow of task state transition managed by the real-time OS. Arrows indicate the direction of transition between states, and transition is triggered by an interrupt or a system call from a user task. In FIG.
Is ready, 50 is run, 60 is wait,
70 is a suspend state, and 80 is a debug suspend state. The difference from the conventional example is that the system has a debug suspend state 80 to which a transition is made by issuing a system call from the NMI handler for the task level debugger.
【0019】なお、デバッグサスペンド状態80へ遷移
するシステムコールとデバッグサスペンド状態から元の
状態に復帰するシステムコールは例えば、サスペンド状
態との間で遷移するためのシステムコールとは名前やそ
のエントリが区別されるため、ユーザがその混用を容易
に避けることができる。したがって、ブレーク処理によ
り停止するタスクは、後続の実行タスクが発行するシス
テムコールの処理にかかわらず確実に停止状態にするこ
とが可能となる。The system call for transition to the debug suspend state 80 and the system call for returning from the debug suspend state to the original state are, for example, distinguished from the system call for transitioning to the suspend state in terms of name and entry. Therefore, the user can easily avoid the mixing. Therefore, the task stopped by the break processing can be reliably stopped regardless of the processing of the system call issued by the subsequent execution task.
【0020】以下、モニタプログラム101とリアルタ
イムOS102による、その制御のための動作について
説明する。図3は被デバッグタスク103と、モニタプ
ログラム101と、リアルタイムOS102の処理内容
を示すフローチャートである。ここで、モニタプログラ
ム101の処理はNMIで起動する場合のNMIハンド
ラとして動作する処理を表す。また、モニタプログラム
101にはこの他に、図示せぬ初期化ルーチンや他の割
込みハンドラ等の既知の処理を含むことがあり、リアル
タイムOS102についても同様に、図示せぬタスクス
ケジューラやキュー操作等の処理が含まれる。Hereinafter, the operation of the monitor program 101 and the real-time OS 102 for its control will be described. FIG. 3 is a flowchart showing processing contents of the debugged task 103, the monitor program 101, and the real-time OS 102. Here, the process of the monitor program 101 represents a process that operates as an NMI handler when activated by the NMI. In addition, the monitor program 101 may include other known processes such as an initialization routine and other interrupt handlers (not shown), and the real-time OS 102 similarly includes a task scheduler and queue operation (not shown). Processing is included.
【0021】まず、被デバッグタスク103がブレーク
を発生する、つまりイリーガル命令等、ブレークを誘因
するブレーク命令を実行すると(ステップS1)、NM
Iハンドラに制御が移り、レジスタ退避等の前処理(ス
テップS2)の後、リアルタイムOSへの第1のシステ
ムコールを発行することにより実行タスクIDの取得を
行う(ステップS3)。このとき、リアルタイムOS1
02では、第1のシステムコールを受けて、実行タスク
ID取得システムコール処理を実行することになる。こ
の実行タスクID取得システムコール処理では、リター
ンパラメータに実行タスクIDを設定し(ステップS3
1)、その後モニタプログラム101に復帰し、これに
よってモニタプログラム101における実行タスクID
の取得が行われる。なお、実行タスクIDは、リアルタ
イムOSによって、第1のシステムコールを受けたとき
にリターンパラメータに設定するだけであり、従来例の
ように、タスク切り替えの度に特定の領域に格納してお
くということはない。First, when the debugged task 103 generates a break, that is, executes a break instruction which causes a break such as an illegal instruction (step S1), NM
The control is transferred to the I handler, and after preprocessing such as register saving (step S2), a first system call to the real-time OS is issued to acquire an execution task ID (step S3). At this time, the real-time OS1
In 02, the first system call is received, and the execution task ID acquisition system call process is executed. In the execution task ID acquisition system call process, the execution task ID is set in the return parameter (step S3).
1) Then, the process returns to the monitor program 101, thereby executing task ID in the monitor program 101
Is obtained. Note that the execution task ID is simply set in the return parameter when the first system call is received by the real-time OS, and is stored in a specific area every time the task is switched, as in the conventional example. Never.
【0022】つぎに、実行タスクIDがデバッグ対象タ
スクIDに等しいか否かの判定を行い(ステップS
4)、等しければ、続いてタスクをデバッグサスペンド
状態へ遷移させる第2のシステムコールの発行を行う
(ステップS5)ことによりタスクを停止させる。この
とき、リアルタイムOS102では、第2のシステムコ
ールを受けて、タスク停止(デバッグサスペンド)シス
テムコール処理を実行する。このタスク停止システムコ
ール処理では、実行タスクのTCB(Task Control blo
ck:タスク実行表)をランキューから外し、デバッグサ
スペンドキューにつなぎ(ステップS51)、ついでタ
スクの再スケジュールを行い(ステップS52)、その
後モニタプログラム101に復帰し、これによってモニ
タプログラム101におけるタスクの停止が行われる。
このタスクの停止処理によって、後続の実行タスクが発
行するシステムコールの処理にかかわらず確実に停止状
態になる。Next, it is determined whether or not the execution task ID is equal to the task ID to be debugged (step S).
4) If they are equal, then the task is stopped by issuing a second system call that causes the task to transition to the debug suspend state (step S5). At this time, in response to the second system call, the real-time OS 102 executes a task stop (debug suspend) system call process. In this task stop system call processing, the TCB (Task Control blo
ck: task execution table) is removed from the run queue, connected to the debug suspend queue (step S51), and the task is rescheduled (step S52). Thereafter, the process returns to the monitor program 101, thereby stopping the task in the monitor program 101. Is performed.
By this task stop processing, the task is reliably stopped regardless of the processing of the system call issued by the subsequent execution task.
【0023】その後、第3のシステムコールの発行を行
うことで、タスクをデバッグサスペンド状態から元の状
態に復帰させる。一方、実行タスクIDがデバッグ対象
タスクIDとが等しくなければ、再び割り込まれたタス
クのアドレスより実行を再開する。以上のように、この
実施の形態によれば、モニタプログラム101におい
て、デバッグ対象タスクのブレーク時に、実行タスクI
DをリアルタイムOS102へのシステムコールで取得
し、ユーザにより指定されたデバッグ対象タスクIDと
比較し、等しくなければ実行再開し、等しければデバッ
ガ専用のタスク停止のシステムコールをリアルタイムO
S102へ発行し、そのタスクを停止させるので、リア
ルタイムOS102が実行タスクIDを特定領域に格納
する処理が不要となり、タスク切替え時間を削減でき、
また、いったんタスク停止したタスクが、後続のユーザ
タスクによって再び起床されてしまう問題を回避でき
る。したがって、マルチタスクシステムにおいて、タス
ク切替え時間の増大を伴わず、タスクブレークを確実に
機能させることが可能となる。これらによって、ユーザ
は、少ないシステム負荷で効率の良いタスクレベルのデ
バッグを行うことができるようになり、その効果は大き
い。Thereafter, a task is returned from the debug suspend state to the original state by issuing a third system call. On the other hand, if the execution task ID is not equal to the debug target task ID, the execution is resumed from the interrupted task address. As described above, according to this embodiment, when the debug target task breaks in the monitor program 101, the execution task I
D is obtained by a system call to the real-time OS 102 and compared with the debugged task ID specified by the user. If they are not equal, execution is resumed.
Since the task is issued to S102 and the task is stopped, the process of storing the execution task ID in the specific area by the real-time OS 102 becomes unnecessary, and the task switching time can be reduced.
Further, it is possible to avoid a problem that a task that has been once stopped is woken up again by a subsequent user task. Therefore, in the multitasking system, the task break can be reliably functioned without increasing the task switching time. As a result, the user can perform efficient task-level debugging with a small system load, and the effect is large.
【0024】[0024]
【発明の効果】請求項1記載のデバッガの処理方法によ
れば、システムコールに応答するリアルタイムOSにお
いて、タスク切り替え時に実行タスクIDを記憶する処
理を省略できるため、リアルタイムOSのタスク切り替
え時間を減少させることができ、システム負荷を軽減す
ることができる。According to the first aspect of the present invention, in the real-time OS responding to a system call, the process of storing the execution task ID at the time of task switching can be omitted, so that the task switching time of the real-time OS is reduced. And the system load can be reduced.
【0025】請求項2記載のデバッガの処理方法によれ
ば、通常のタスクの停止とブレーク処理によるタスクの
停止状態とを異ならせることが可能であり、ブレーク処
理により停止するタスクは、後続の実行タスクが発行す
るシステムコールの処理にかかわらず確実に停止状態に
することが可能になる。請求項3記載のリアルタイムO
Sの処理方法によれば、タスク切り替え時に実行タスク
IDを記憶する処理を省略できるため、タスク切り替え
時間を減少させることができ、システム負荷を軽減する
ことができる。According to the processing method of the debugger according to the second aspect, it is possible to make the normal task stop and the task stop state by the break processing different from each other. It is possible to reliably stop the system regardless of the processing of the system call issued by the task. The real-time O according to claim 3
According to the processing method of S, the process of storing the execution task ID at the time of task switching can be omitted, so that the task switching time can be reduced and the system load can be reduced.
【0026】請求項4記載のリアルタイムOSの処理方
法によれば、ブレーク処理によるタスクを停止するとき
は、タスクを通常のサスペンド状態とは別のデバッグサ
スペンド状態とすることができるので、ブレーク処理に
より停止するタスクは、後続の実行タスクが発行するシ
ステムコールの処理にかかわらず確実に停止状態にする
ことが可能になり、効率の良いタスクレベルのデバッグ
を行うことができる。According to the processing method of the real-time OS, when the task is stopped by the break processing, the task can be set to the debug suspend state different from the normal suspend state. The task to be stopped can be reliably stopped regardless of the processing of the system call issued by the subsequent execution task, and efficient task-level debugging can be performed.
【図1】本発明の実施の形態に係るデバッガ装置を含む
デバッガシステムの全体構成を示す概略図である。FIG. 1 is a schematic diagram showing an overall configuration of a debugger system including a debugger device according to an embodiment of the present invention.
【図2】本発明の実施の形態に係るタスク状態遷移の流
れを示す概略図である。FIG. 2 is a schematic diagram showing a flow of task state transition according to the embodiment of the present invention.
【図3】本発明の実施の形態に係る被デバッグタスクと
モニタプログラムおよびリアルタイムOSの動作を示す
フローチャートである。FIG. 3 is a flowchart showing operations of a debugged task, a monitor program, and a real-time OS according to the embodiment of the present invention.
【図4】従来例に係る被デバッグタスクとモニタプログ
ラムの動作を示すフローチャートである。FIG. 4 is a flowchart showing operations of a debugged task and a monitor program according to a conventional example.
10 ターゲットシステム 101 モニタプログラム 102 リアルタイムOS 103 被デバッグタスク 20 ホストコンピュータ 201 デバッガ 202 通信手段 30 デバッグ対象タスクID 40 レディ状態 50 ラン状態 60 ウェイト状態 70 サスペンド状態 80 デバッグサスペンド状態 401 モニタプログラム 403 被デバッグタスク Reference Signs List 10 target system 101 monitor program 102 real-time OS 103 debug target task 20 host computer 201 debugger 202 communication means 30 debug target task ID 40 ready state 50 run state 60 wait state 70 suspend state 80 debug suspend state 401 monitor program 403 debug task
Claims (4)
バッガの処理方法であって、 ブレーク時の処理として、ブレーク発生以前の実行タス
クIDをシステムコールで取得する第1のステップと、
ユーザにより指定され記憶する1つのデバッグ対象タス
クIDと前記実行タスクIDとの比較を行う第2のステ
ップと、前記デバッグ対象タスクIDと前記実行タスク
IDとが等しくなければ再びブレークしたアドレスより
タスクの実行を再開し、等しければ前記タスクの実行を
停止させる第3のステップとを含むことを特徴とするデ
バッガの処理方法。1. A processing method of a debugger for supporting task-level debugging, comprising: a first step of acquiring, by a system call, an execution task ID before a break occurs, as a process at the time of a break;
A second step of comparing one debugged task ID designated and stored by the user with the execution task ID, and if the debuggee task ID and the execution task ID are not equal, the task is re-started from the address at which the task was broken again. A third step of resuming execution and, if equal, stopping execution of the task.
り実行することを特徴とする請求項1記載のデバッガの
処理方法。2. The processing method according to claim 1, wherein the execution of the task is stopped by a system call.
現するためのリアルタイムOSの処理方法であって、 現在実行中のタスクの実行タスクIDを通知するシステ
ムコール処理を実行することを特徴とするリアルタイム
OSの処理方法。3. A processing method of a real-time OS for realizing the processing method of the debugger according to claim 1, wherein a system call process for notifying an execution task ID of a task currently being executed is executed. A real-time OS processing method.
現するためのリアルタイムOSの処理方法であって、 リアルタイムOSが管理するタスク状態として、通常の
ラン状態、レディ状態、ウェイト状態およびサスペンド
状態等の各状態に加えて、デバッガ指示により遷移する
停止状態であるデバッグサスペンド状態を追加し、 タスクを前記デバッグサスペンド状態へ遷移させるシス
テムコール処理と前記タスクを前記デバッグサスペンド
状態より元の状態へ復帰させるシステムコール処理とを
実行可能なことを特徴とするリアルタイムOSの処理方
法。4. A real-time OS processing method for realizing the debugger processing method according to claim 1, wherein the task states managed by the real-time OS include a normal run state, a ready state, a wait state, and a suspend state. In addition to each of the above states, a debug suspend state, which is a stop state that transitions according to a debugger instruction, is added, and a system call process that transitions the task to the debug suspend state and the task returns from the debug suspend state to the original state And a system call process for causing the real-time OS to execute.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10070203A JPH11272501A (en) | 1998-03-19 | 1998-03-19 | Debugger processing method and real-time OS processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10070203A JPH11272501A (en) | 1998-03-19 | 1998-03-19 | Debugger processing method and real-time OS processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH11272501A true JPH11272501A (en) | 1999-10-08 |
Family
ID=13424739
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10070203A Pending JPH11272501A (en) | 1998-03-19 | 1998-03-19 | Debugger processing method and real-time OS processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH11272501A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100406953B1 (en) * | 2001-08-16 | 2003-11-28 | 엘지전자 주식회사 | Run-time debugging method for a real time operating system |
-
1998
- 1998-03-19 JP JP10070203A patent/JPH11272501A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100406953B1 (en) * | 2001-08-16 | 2003-11-28 | 엘지전자 주식회사 | Run-time debugging method for a real time operating system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6006247A (en) | Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system | |
| US6282601B1 (en) | Multiprocessor data processing system and method of interrupt handling that facilitate identification of a processor requesting a system management interrupt | |
| CN103473135B (en) | The processing method of spin lock LHP phenomenon under virtualized environment | |
| US7971205B2 (en) | Handling of user mode thread using no context switch attribute to designate near interrupt disabled priority status | |
| US20040098639A1 (en) | Debugging kernel-loadable modules and suspending and replacing functions in non-microkernel operating systems | |
| US20220035664A1 (en) | Reverse restartable sequences for lock polling scalability | |
| JPS62184544A (en) | Virtual computer system | |
| JP5131269B2 (en) | Multi-processing system | |
| WO2003083656A2 (en) | Method and apparatus for context switching in computer operating systems | |
| JP3598282B2 (en) | Computer, control method thereof, and recording medium recording the control method | |
| JPH11272501A (en) | Debugger processing method and real-time OS processing method | |
| US7702836B2 (en) | Parallel processing device and exclusive control method | |
| JP2643804B2 (en) | Debug method | |
| JPH08272755A (en) | Processor switching device | |
| KR100506254B1 (en) | Apparatus and method for handling interrupt in non-privileged of embedded system | |
| JPH0668725B2 (en) | Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition | |
| JP2022107229A (en) | Information processing apparatus, control method, and control program | |
| JPS62150416A (en) | Transition system to low power consumption state | |
| JP2553526B2 (en) | Multitasking processor | |
| Cherepov et al. | Hard Real-time with {RTX} on Windows {NT} | |
| JP3516589B2 (en) | High-speed address switching device | |
| JPH05165652A (en) | Task switching control method | |
| CN121681445A (en) | Method, device, equipment, medium and product for synchronizing processor and coprocessor | |
| JP2006228074A (en) | Multitask system and multitask control method | |
| US20030225817A1 (en) | Concurrent execution of kernel work and non-kernel work in operating systems with single-threaded kernel |