JP2002251299A - Program tracing device - Google Patents

Program tracing device

Info

Publication number
JP2002251299A
JP2002251299A JP2001050210A JP2001050210A JP2002251299A JP 2002251299 A JP2002251299 A JP 2002251299A JP 2001050210 A JP2001050210 A JP 2001050210A JP 2001050210 A JP2001050210 A JP 2001050210A JP 2002251299 A JP2002251299 A JP 2002251299A
Authority
JP
Japan
Prior art keywords
processing
resource
task
interrupt processing
program
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
JP2001050210A
Other languages
Japanese (ja)
Inventor
Akihisa Chiba
晃久 千葉
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
MX Mobiling Ltd
Original Assignee
NEC Corp
MX Mobiling Ltd
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, MX Mobiling Ltd filed Critical NEC Corp
Priority to JP2001050210A priority Critical patent/JP2002251299A/en
Publication of JP2002251299A publication Critical patent/JP2002251299A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program tracing device with which when which task processing or interruption processing destroys a queue is immediately recognized. SOLUTION: When going through the interruption processing or at the beginning of the task switching processing of a real time monitor, by checking whether or not the interruption processing or the task processing in a RUN state immediately before accesses resources in a possible range, the error of the way of using the resources of a memory and a timer, etc., is detected by the performance of only the task processing and the interruption processing.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、多数の事象発生
毎に優先順位毎に処理順番を決めて実行するリアルタイ
ムモニタによって制御されるプログラムのプログラムト
レース装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program tracing device for a program which is controlled by a real-time monitor which determines and executes a processing order for each priority when a large number of events occur.

【0002】[0002]

【従来の技術】従来のプログラムトレース装置の一例
が、特開平10−301805号公報の実施の形態5に
記載されている。図3に示すように、この従来のプログ
ラムトレース装置は、メモリ資源やタイマ資源を管理す
るキュー10と、キュー10のチェーン構造の変更履歴
を保存しておくトレースバッファ20と、資源を使いた
いとき、つまり獲得したいときや、削除したいときにキ
ューのチェーン構造の変更履歴が異常でないかを調べる
キュー登録チェック部30とから構成されている。
2. Description of the Related Art An example of a conventional program trace apparatus is described in a fifth embodiment of Japanese Patent Application Laid-Open No. Hei 10-301805. As shown in FIG. 3, the conventional program tracing apparatus includes a queue 10 for managing memory resources and timer resources, a trace buffer 20 for storing a change history of a chain structure of the queue 10, and a resource for using resources. That is, the queue registration check unit 30 checks whether the change history of the queue chain structure is abnormal when it is desired to acquire or delete the queue.

【0003】このような構成を有する従来のプログラム
トレース装置は、次のように動作する。すなわち、メモ
リ資源を使いたいときは欲しいバイト数を指定して、タ
イマ資源ならタイマを1本使いたいことを指定してメモ
リやタイマの獲得処理を呼び出す。
The conventional program tracing device having such a configuration operates as follows. That is, when the user wants to use the memory resource, the user specifies the desired number of bytes, and for the timer resource, the user specifies that one timer is to be used, and the memory and timer acquisition processing is called.

【0004】呼ばれた側の獲得処理内では、キュー登録
チェック部30を実行し、キュー10のチェーン構造の
変更履歴を、保存しておいたトレースバッファ20から
確認し、履歴とキュー10の現状との比較によりキュー
10の破壊の有無をチェックする。
In the called side acquisition processing, the queue registration check unit 30 is executed to check the change history of the chain structure of the queue 10 from the saved trace buffer 20, and to check the history and the current state of the queue 10. Then, the presence or absence of the destruction of the queue 10 is checked by comparing with.

【0005】キュー登録チェック部30は、異常があれ
ば、プログラム実行をCPUのHALT命令によって止
めたり、無限ループにしたり、リセットを掛けるという
ような異常検出処理を実行する。
[0005] If there is an abnormality, the queue registration check unit 30 executes abnormality detection processing such as stopping the program execution by a HALT instruction of the CPU, setting an infinite loop, or resetting the program.

【0006】[0006]

【発明が解決しようとする課題】しかし、良く使われる
プログラム構造である、多数の事象発生毎に優先順位毎
に処理順番を決めて実行するリアルタイムモニタ(O
S)では、キュー破壊は、以下に説明するとおり、あら
ゆるタスク処理と割込み処理によって発生する可能性が
あるため、上述した従来のプログラムトレース装置で
は、資源を使いたいときにキュー破壊を検出しても、ど
のタスク処理、割込み処理が、いつキュー破壊をしたか
直には分らず、修正に時間がかかってしまうという問題
があった。
However, a real-time monitor (O) which determines a processing order for each priority and executes it for each occurrence of a large number of events, which is a frequently used program structure.
In S), as described below, queue destruction can occur due to all task processing and interrupt processing. Therefore, the above-described conventional program trace device detects queue destruction when it is desired to use resources. However, there is a problem that it is not immediately known which task process or interrupt process has destroyed the queue, and it takes time to correct.

【0007】次に、リアルタイムモニタ(OS)で発生
するキュー破壊の原因について説明する。
Next, the cause of the queue destruction occurring in the real-time monitor (OS) will be described.

【0008】a.資源解放忘れ あらゆるタスク処理と割込み処理のどこかが、1箇所で
もメモリやタイマ等の獲得した資源を返さないルートを
プログラムバグによって作ってしまった場合は、そのル
ートを通過する毎に資源を確保し続け、最後に資源が無
くなってしまう。その後、資源が無いということを判断
している場合は、異常処理等を実行する。しかし、資源
が無い処理を準備していない場合は、資源が無いのに資
源を確保するルートを実行してしまい、0番地にデータ
を書込みしたり、過去に資源が確保できていたときのデ
ータをそのまま使ってしまうため、他のタスク処理や割
込み処理が使用中のメモリやタイマを上書きしてしまう
ことになる。そうすると、この後は、暴走ということに
なってしまう。
A. Forgetting to release resources If any task process or interrupt process creates a route that does not return any resources acquired such as memory or timer due to a program bug, resources are secured every time the route passes And end up running out of resources. Thereafter, if it is determined that there is no resource, an abnormal process is executed. However, if a process with no resources is not prepared, a route for securing resources is executed even if there are no resources, and data is written to address 0, or data when resources were secured in the past. Is used as it is, so that other task processing or interrupt processing overwrites the used memory or timer. Then, after this, it will be a runaway.

【0009】b.資源未獲得 資源を獲得する処理をどこかが一箇所でも獲得しないル
ートがあったり、獲得した以上のメモリを使ってしまっ
た場合、やはり、正しく資源を獲得したタスク処理や割
込み処理のデータを上書きしたり、付近のデータを破壊
するために暴走になる。
B. Resource not acquired If there is a route that does not acquire any resource acquisition process at any point, or if more memory is used than acquired, the task processing and interrupt processing data that correctly acquired the resource are also overwritten Or runaway to destroy nearby data.

【0010】この発明の目的は、どのタスク処理、割込
み処理が、いつキュー破壊をしたかが直ちに分かるプロ
グラムトレース装置を提供することにある。
An object of the present invention is to provide a program tracing apparatus which can immediately determine which task processing or interrupt processing has destroyed a queue and when.

【0011】[0011]

【課題を解決するための手段】本発明は、良く使われる
プログラム構造である、多数の事象発生毎に優先順位毎
に処理順番を決めて実行するリアルタイムモニタによっ
て制御されるプログラムにおいて、あらゆるタスク処理
と割込み処理によって発生する可能性がある、動的管理
が行われている資源の使い方の誤りを、前記タスク処
理、割込み処理だけの実行までで検出し、前記誤りを他
のタスク処理、割込み処理へ影響させないようにするこ
とを特徴とする。
SUMMARY OF THE INVENTION The present invention relates to a program structure frequently used, which is a program which is controlled by a real-time monitor which executes a processing order in a priority order for each occurrence of a large number of events, and executes any task processing. Errors in the use of dynamically managed resources that may occur due to interrupt processing are detected up to the execution of only the task processing and interrupt processing, and the errors are detected in other task processing and interrupt processing. Characterized in that it is not affected.

【0012】[0012]

【発明の実施の形態】次に、この発明の実施の形態につ
いて図面を参照して説明する。
Next, an embodiment of the present invention will be described with reference to the drawings.

【0013】この発明のプログラムトレース装置は、複
数のタスク処理や割込み処理が動作可能な計算機を対象
として使用されるものである。図1は、この発明のプロ
グラムトレース装置の実施の形態を示すブロック図であ
る。図1に示すプログラムトレース装置は、メモリ資源
やタイマ資源を管理するキュー1と、キュー1によって
動的管理(使う間だけ空いているメモリやタイマ等の資
源を確保し、使い終ったら返す)が行われているメモリ
やタイマ等の資源に対して獲得、書込み、解放が行われ
た際の資源へのアクセス情報を保存しておくトレースバ
ッファ2と、割込み処理を抜けるとき、またはリアルタ
イムモニタ(OS)のタスク切替処理の最初に、現在の
割込み処理または直前にRUN状態であったタスク処理
が、有り得る範囲でメモリやタイマ等の資源をアクセス
したか否かをチェックする資源チェック部3とから構成
されている。
The program tracing device of the present invention is used for a computer capable of operating a plurality of task processes and interrupt processes. FIG. 1 is a block diagram showing an embodiment of the program trace device of the present invention. The program tracing apparatus shown in FIG. 1 manages queues 1 for managing memory resources and timer resources, and dynamically manages the queues 1 (resources such as memory and timers that are free only during use and return when used). A trace buffer 2 for storing access information to resources such as a memory and a timer that are being acquired, written, and released when resources are acquired; A) a resource check unit 3 for checking whether or not the current interrupt processing or the task processing in the RUN state immediately before has accessed resources such as a memory and a timer in a possible range. Have been.

【0014】ここで、キューについて説明する。メモリ
資源を使いたいときは欲しいバイト数を指定して、タイ
マ資源であればタイマを1本使いたいことを指定してメ
モリやタイマの獲得処理を呼び出す。呼ばれた側の獲得
処理内では、資源の始点から空いている場所を捜し、空
いていれば呼んだ側に獲得できた場所を伝える。
Here, the queue will be described. When the user wants to use the memory resource, the user specifies the desired number of bytes. When the user uses the timer resource, the user specifies that he wants to use one timer. Within the called party's acquisition process, a search is made for a vacant place from the start of the resource, and if free, the called party is notified of the acquired place.

【0015】獲得処理内では、多くの場合、資源をキュ
ーによってチェーン構造を取って管理している。この方
法は以下の通りである。
In the acquisition process, resources are often managed in a chain structure using queues. This method is as follows.

【0016】資源を管理するキューの始点に、使ってい
る1つの資源のアドレスを格納しておき、そこで示され
たアドレスの先には、次に使っている1つの資源のアド
レスを格納し、そのアドレスの先には、さらに次に使っ
ている1つの資源のアドレスを格納し、使っている資源
はここまでで終りということを示す終点まで次の資源の
アドレスを格納する。
At the starting point of the queue for managing resources, the address of one used resource is stored, and after the indicated address, the address of the next used resource is stored. After the address, the address of one resource used next is stored, and the address of the next resource is stored up to the end point indicating that the used resource ends here.

【0017】次に、図1を参照して、全体の動作につい
て詳細に説明する。
Next, the overall operation will be described in detail with reference to FIG.

【0018】まず、各タスク処理・割込み処理がキュー
1で管理されているメモリやタイマ等の資源に対して獲
得・書込み・解放を行ったとき、トレースバッファ2に
資源へのアクセス情報を保存しておく。保存するのは以
下の値である。
First, when each task process / interrupt process acquires, writes, and releases resources such as a memory and a timer managed by the queue 1, access information to the resources is stored in the trace buffer 2. Keep it. The following values are stored.

【0019】(A)獲得時 a.資源の状態を獲得だけされた状態にする。 b.獲得した資源のアドレス・範囲を格納する。 c.獲得した処理番号、書込みして良い処理番号、解放
して良い処理番号を格納する。
(A) At the time of acquisition a. The state of the resource is changed to a state in which only the resource is acquired. b. Stores the address and range of the acquired resource. c. The acquired process number, the process number that can be written, and the process number that can be released are stored.

【0020】(B)書込み時 a.資源の情報を書き込み済み状態にする。 b.書込みした処理番号を格納する。 c.書込みした値を格納する(資源によって現実的に格
納できる量のみを格納する)。
(B) At the time of writing a. Put the resource information in the written state. b. Stores the written process number. c. The written value is stored (only the amount that can be practically stored by the resource is stored).

【0021】(C)解放時 a.資源の状態を解放状態にする。 b.解放した処理番号を格納する。(C) Release time a. Releases the resource status. b. Store the released process number.

【0022】次に、割込み処理を抜けるとき、またはタ
スク処理内でタスク間通知・事象発生待ち等のタスク切
替えを伴うOSの処理を実行した後に資源チェック部3
で、現在の割込み処理、またはRUN状態であったタス
ク処理が、有り得る範囲で資源をアクセスしたかをチェ
ックする処理を実行し、資源に対し異常な処理を行って
しまったかを検出する。
Next, when exiting the interrupt processing or after executing the processing of the OS involving task switching such as notification between tasks and waiting for event occurrence in the task processing, the resource check unit 3
Then, a process for checking whether the current interrupt process or the task process in the RUN state has accessed a resource within a possible range is executed, and it is detected whether an abnormal process has been performed on the resource.

【0023】割込み処理やタスク処理が、有り得る範囲
で資源をアクセスしたか否かは、以下の方法で確認す
る。
Whether or not the interrupt processing and the task processing have accessed resources within a possible range is confirmed by the following method.

【0024】メモリやタイマの資源は、大きく2つの状
態を持っている。1つ目の状態は、タスク処理・割込み
処理が使用したいために獲得されているという状態であ
る。このとき、資源の内容は細かく以下の2つの状態の
どちらかである。
The resources of the memory and the timer have two main states. The first state is that the task processing / interrupt processing has been acquired because it is desired to use it. At this time, the content of the resource is in one of the following two states.

【0025】(1)獲得だけされた状態 獲得だけされて使われていなければ、資源の内容値は、
タスク処理または割込み処理実行前と変わっていない筈
である。
(1) Acquired state If acquired and not used, the content value of the resource is:
It should not be different from before executing the task processing or the interrupt processing.

【0026】割込み処理を抜けるとき、またはOSのタ
スク切替処理の最初のタイミングで、獲得だけされた資
源の内容値を読み出し、その前に実行された割込み処
理、または直前にRUN状態であったタスク処理のとき
の値から変わっていれば、現在の割込み処理、直前にR
UN状態であったタスク処理が、資源に対し異常な処理
を行ってしまったことになる。
At the time of exiting the interrupt processing or at the first timing of the task switching processing of the OS, the content value of the acquired resource is read, and the interrupt processing executed before that, or the task which was in the RUN state immediately before is read out. If the value has changed from the value at the time of processing, the current interrupt processing
This means that the task process in the UN state has performed an abnormal process on the resource.

【0027】さらにこのとき、異常を判断する資源の使
用量を予め定めておき、資源が設計量の例えば80%を
使ってしまったなど資源の使用量をチェックし、異常を
判断することもできる。
At this time, it is also possible to determine in advance the amount of resources to be used for judging the abnormality and to check the amount of resources used, for example, when the resource has used 80% of the designed amount, and to judge the abnormality. .

【0028】(2)獲得済みで設計通りの正しい処理が
資源の内容値を書き換え、資源を使用中の状態 このときは、資源の内容値は、設計通りの正しい処理が
書き換えた値と同一値の筈である。
(2) A state in which the acquired and correct processing as designed rewrites the content value of the resource and the resource is being used. At this time, the content value of the resource is the same value as the value rewritten by the correct processing as designed. It should be.

【0029】さらに、獲得したアドレスに、獲得した範
囲内で、設計通りの正しい処理が書き換えたことも、獲
得だけされたときの情報と、あらかじめ設計で決められ
ている処理番号等を確認することでチェックできる。
Further, it is necessary to confirm that the correct processing as designed is rewritten in the obtained address in the obtained address, to confirm the information at the time of obtaining only, and to check the processing number determined in advance in the design. You can check with

【0030】割込み処理を抜けるとき、またはOSのタ
スク切替処理の最初のタイミングで、同一値である否か
をチェックし、またはアドレス・範囲・書込み処理番号
のチェックを行い、異常を検出する。
At the time of exiting the interrupt processing or at the first timing of the task switching processing of the OS, it is checked whether the values are the same, or the address, range, and write processing number are checked to detect an abnormality.

【0031】2つ目の状態は、装置の電源投入後の初期
状態や、タスク処理・割込み処理が獲得した資源を使い
終わったため解放している状態である。このとき、資源
の内容は細かく以下の2つの状態のどちらかである。
The second state is an initial state after the power of the apparatus is turned on, or a state in which resources acquired by task processing / interrupt processing have been used up and released. At this time, the content of the resource is in one of the following two states.

【0032】(3)電源投入後の初期状態 資源の内容値は初期値になっている筈である。特に初期
値を設定しない資源であれば電源投入時の値から変化が
ない筈である。
(3) Initial state after power-on The contents of resources should be initial values. Especially for resources for which no initial value is set, there should be no change from the value at power-on.

【0033】割込み処理を抜けるとき、またはOSのタ
スク切替処理の最初のタイミングで同一値であるか否か
をチェックし、異常を検出する。
When exiting the interrupt processing or at the first timing of the task switching processing of the OS, it is checked whether or not the values are the same, and an abnormality is detected.

【0034】(4)解放された状態 資源の内容値は解放された時の値から変化がない筈であ
る。
(4) Released state The content value of the resource should not change from the value at the time of release.

【0035】割込み処理を抜けるとき、またはOSのタ
スク切替処理の最初のタイミングで同一値であるか否か
をチェックし、異常を検出する。
When exiting the interrupt processing or at the first timing of the task switching processing of the OS, it is checked whether or not the values are the same, and an abnormality is detected.

【0036】このようにして、動的管理が行われている
メモリやタイマ等の資源の使い方の誤りを現在のタスク
処理・割込み処理だけの実行までで検出することを可能
にする。
In this way, it is possible to detect an error in the use of resources such as a memory and a timer, which are being dynamically managed, up to the execution of only the current task processing / interrupt processing.

【0037】次に、図2により、割込処理を抜けると
き、またはタスク切替処理の最初に行う資源異常チェッ
クの動作について説明する。図2は、割込処理の最後ま
たはタスク内でタスク間通知・事象発生待ち等のタスク
切替を伴うOSの処理を実行した後に、資源異常チェッ
クを行う動作を説明するフローチャートである。
Next, referring to FIG. 2, the operation of the resource abnormality check performed at the time of exiting the interrupt processing or at the beginning of the task switching processing will be described. FIG. 2 is a flowchart illustrating an operation of performing a resource abnormality check after executing an OS process that involves task switching at the end of an interrupt process or within a task, such as notification between tasks and event occurrence wait.

【0038】まず、タスク切替処理の場合は、割り込み
を禁止して排他制御を行う(ステップ101)。次に、
メモリ資源、タイマ資源、その他の資源をアクセスした
か否かを前述した(1)〜(4)のチェックにより確認
する(ステップ102〜104)。次に、優先順にRE
ADYタスクの有無を確認する(ステップ105)。こ
こで、READYタスクが無ければ割り込みを許可し
て、排他制御を終了する(ステップ106)。次に、H
ALT/STOP命令によって、次の事象発生を待ち
(ステップ107)、タスク切替処理があれば、最初の
ステップ101に戻る。
First, in the case of the task switching process, the exclusive control is performed by inhibiting the interrupt (step 101). next,
Whether or not the memory resource, the timer resource, and other resources have been accessed is confirmed by the above-described checks (1) to (4) (steps 102 to 104). Next, in order of priority,
The presence or absence of an DY task is confirmed (step 105). Here, if there is no READY task, the interruption is permitted and the exclusive control is terminated (step 106). Next, H
The ALT / STOP instruction waits for the occurrence of the next event (step 107). If there is a task switching process, the process returns to the first step 101.

【0039】ステップ105において、READYタス
クが有れば、READYタスクの状態をRUNにし、R
UNタスクのスタックポインタ、レジスタを復帰する
(ステップ108)。
In step 105, if there is a READY task, the state of the READY task is set to RUN,
The stack pointer and register of the UN task are restored (step 108).

【0040】次に、割り込みを許可して、排他制御を終
了し、プログラムカウンタにRUNタスクのプログラム
カウンタ値を入れる(ステップ109)。
Next, the interrupt is permitted, the exclusive control is terminated, and the program counter value of the RUN task is entered in the program counter (step 109).

【0041】[0041]

【発明の効果】以上説明したように、この発明は、割込
み処理を抜けるとき、またはリアルタイムモニタのタス
ク切替処理の最初に、割込み処理、または直前にRUN
状態であったタスク処理が、有り得る範囲で資源をアク
セスしたかをチェックすることにより、メモリやタイマ
等の資源の使い方の誤りを前記タスク処理、割込み処理
だけの実行までで検出し、前記誤りを他のタスク処理、
割込み処理へ影響させないようにすることができる。
As described above, according to the present invention, when exiting the interrupt processing, at the beginning of the task switching processing of the real-time monitor, at the interrupt processing, or immediately before
By checking whether the task process in the state has accessed resources within a possible range, an error in usage of resources such as a memory and a timer is detected up to the execution of only the task process and the interrupt process, and the error is detected. Other task processing,
It is possible not to affect the interrupt processing.

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

【図1】この発明のプログラムトレース装置の実施の形
態を示す構成図である。
FIG. 1 is a configuration diagram showing an embodiment of a program trace device of the present invention.

【図2】タスク切替処理の最初に資源異常をチェックす
る動作を説明するフローチャートである。
FIG. 2 is a flowchart illustrating an operation of checking a resource abnormality at the beginning of a task switching process.

【図3】従来のプログラムトレース方法を示す図であ
る。
FIG. 3 is a diagram showing a conventional program trace method.

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

1,10 キュー 2,20 トレースバッファ 3 資源チェック部 30 キュー登録チェック部 1,10 queue 2,20 trace buffer 3 resource check unit 30 queue registration check unit

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】良く使われるプログラム構造である、多数
の事象発生毎に優先順位毎に処理順番を決めて実行する
リアルタイムモニタによって制御されるプログラムにお
いて、あらゆるタスク処理と割込み処理によって発生す
る可能性がある、動的管理が行われている資源の使い方
の誤りを、前記タスク処理、割込み処理だけの実行まで
で検出し、前記誤りを他のタスク処理、割込み処理へ影
響させないようにすることを特徴とするプログラムトレ
ース装置。
In a program which is controlled by a real-time monitor, which is a frequently used program structure and which determines a processing order for each priority when a large number of events occur and which may be executed by any task processing and interrupt processing, There is a need to detect an error in the use of resources for which dynamic management is being performed up to the execution of only the task processing and interrupt processing, and to prevent the error from affecting other task processing and interrupt processing. Characterized program trace device.
【請求項2】前記割込み処理を抜けるとき、またはリア
ルタイムモニタのタスク切替処理の最初に、前記割込み
処理、または直前にRUN状態であったタスク処理が、
有り得る範囲で前記資源をアクセスしたかをチェックす
ることにより前記誤りを検出することを特徴とする請求
項1に記載のプログラムトレース装置。
2. When exiting the interrupt processing or at the beginning of the task switching processing of the real-time monitor, the interrupt processing or the task processing which was in the RUN state immediately before is executed.
2. The program tracing apparatus according to claim 1, wherein the error is detected by checking whether the resource has been accessed within a possible range.
【請求項3】前記有り得る範囲で資源をアクセスしたか
は、前記資源が獲得だけされた状態のときには、割込み
処理を抜けるとき、またはリアルタイムモニタのタスク
切替処理の最初のタイミングで資源の内容値を読み出
し、資源の内容値が、その前に実行された割込み処理、
または直前にRUN状態であったタスクのときの値と同
一値か否かをチェックし、 または、前記割込み処理を抜けるとき、またはリアルタ
イムモニタのタスク切替処理の最初のタイミングで前記
資源の使用量が予め定めた使用量を超えたか否かをチェ
ックして行うことを特徴とする請求項2に記載のプログ
ラムトレース装置。
3. The method according to claim 1, wherein the resource is accessed within the possible range when the resource is only acquired, when the interrupt processing is exited, or at the first timing of the task switching processing of the real-time monitor. Read, the content value of the resource is the previously executed interrupt processing,
Or, check whether the value is the same as the value of the task that was in the RUN state immediately before, or when the resource usage is reduced at the time of exiting the interrupt processing or at the first timing of the task switching processing of the real-time monitor. 3. The program tracing device according to claim 2, wherein whether or not the usage amount exceeds a predetermined amount is checked.
【請求項4】前記有り得る範囲で資源をアクセスしたか
は、前記資源を獲得済みで設計通りの正しい処理が資源
の内容値を書き換え、前記資源を使用中の状態のときに
は、前記割込み処理を抜けるとき、またはリアルタイム
モニタのタスク切替処理の最初のタイミングで資源の内
容値を読み出し、資源の内容値が、設計通りの正しい処
理が書き換えた値と同一値か否かをチェックして行い、 または、獲得したアドレスに、獲得した範囲内で、設計
通りの正しい処理が書き換えたことを、獲得だけしたと
きの情報と、あらかじめ設計で決めている処理番号を確
認することでチェックして行うことを特徴とする請求項
2に記載のプログラムトレース装置。
4. Whether the resource has been accessed within the possible range depends on whether the resource has been acquired and correct processing as designed rewrites the content value of the resource, and exits the interrupt processing when the resource is in use. Or at the first timing of the task switching process of the real-time monitor, read the content value of the resource, and check whether the content value of the resource is the same as the value rewritten by the correct process as designed, or In the acquired address, the correct processing as designed is rewritten within the acquired range by checking the information at the time of acquisition only and the processing number predetermined in the design and checking it. 3. The program trace apparatus according to claim 2, wherein
【請求項5】前記有り得る範囲で資源をアクセスしたか
は、電源投入後に資源に初期値を設定しない初期状態お
よび資源が解放された状態のときには、割込み処理を抜
けるとき、またはリアルタイムモニタのタスク切替処理
の最初のタイミングで同一値か否かをチェックして行う
ことを特徴とする請求項2に記載のプログラムトレース
装置。
5. The method according to claim 5, wherein the resource is accessed within the possible range, when the power is turned on, an initial state in which no initial value is set to the resource and a state in which the resource is released, when interrupt processing is exited, or task switching of the real-time monitor is performed. 3. The program tracing apparatus according to claim 2, wherein at the first timing of the processing, whether or not the values are the same is checked.
【請求項6】良く使われるプログラム構造である、多数
の事象発生毎に優先順位毎に処理順番を決めて実行する
リアルタイムモニタによって制御されるプログラムにお
いて、あらゆるタスク処理と割込み処理によって発生す
る可能性がある、動的管理が行われている資源の使い方
の誤りを、前記タスク処理、割込み処理だけの実行まで
で検出し、前記誤りを他のタスク処理、割込み処理へ影
響させないようにすることを特徴とするプログラムトレ
ース方法。
6. A program which is controlled by a real-time monitor, which is a program structure frequently used and which determines and executes a processing order for each priority when a large number of events occur, may be generated by any task processing and interrupt processing. There is a need to detect an error in the use of resources for which dynamic management is being performed up to the execution of only the task processing and interrupt processing, and to prevent the error from affecting other task processing and interrupt processing. Characterized program tracing method.
【請求項7】前記割込み処理を抜けるとき、またはリア
ルタイムモニタのタスク切替処理の最初に、前記割込み
処理、または直前にRUN状態であったタスク処理が、
有り得る範囲で前記資源をアクセスしたかをチェックす
ることにより前記誤りを検出することを特徴とする請求
項6に記載のプログラムトレース方法。
7. When exiting the interrupt processing or at the beginning of a task switching processing of the real-time monitor, the interrupt processing or the task processing which was in the RUN state immediately before is executed.
7. The program tracing method according to claim 6, wherein the error is detected by checking whether the resource has been accessed within a possible range.
【請求項8】前記有り得る範囲で資源をアクセスしたか
は、前記資源が獲得だけされた状態のときには、割込み
処理を抜けるとき、またはリアルタイムモニタのタスク
切替処理の最初のタイミングで資源の内容値を読み出
し、資源の内容値が、その前に実行された割込み処理、
または直前にRUN状態であったタスクのときの値と同
一値か否かをチェックし、 または、前記割込み処理を抜けるとき、またはリアルタ
イムモニタのタスク切替処理の最初のタイミングで前記
資源の使用量が予め定めた使用量を超えたか否かをチェ
ックして行うことを特徴とする請求項7に記載のプログ
ラムトレース方法。
8. A method for determining whether a resource has been accessed within the possible range, when the resource is only acquired, when exiting an interrupt process, or at the first timing of a task switching process of a real-time monitor. Read, the content value of the resource is the previously executed interrupt processing,
Or, check whether the value is the same as the value of the task that was in the RUN state immediately before, or when the resource usage is reduced at the time of exiting the interrupt processing or at the first timing of the task switching processing of the real-time monitor. 8. The program tracing method according to claim 7, wherein a check is made as to whether or not a predetermined usage amount has been exceeded.
【請求項9】前記有り得る範囲で資源をアクセスしたか
は、前記資源を獲得済みで設計通りの正しい処理が資源
の内容値を書き換え、前記資源を使用中の状態のときに
は、前記割込み処理を抜けるとき、またはリアルタイム
モニタのタスク切替処理の最初のタイミングで資源の内
容値を読み出し、資源の内容値が、設計通りの正しい処
理が書き換えた値と同一値か否かをチェックして行い、 または、獲得したアドレスに、獲得した範囲内で、設計
通りの正しい処理が書き換えたことを、獲得だけしたと
きの情報と、あらかじめ設計で決めている処理番号を確
認することでチェックして行うことを特徴とする請求項
7に記載のプログラムトレース方法。
9. Whether the resource has been accessed within the possible range depends on whether the resource has been acquired and correct processing as designed rewrites the content value of the resource, and exits the interrupt processing when the resource is in use. Or at the first timing of the task switching process of the real-time monitor, read the content value of the resource, and check whether the content value of the resource is the same as the value rewritten by the correct process as designed, or In the acquired address, it is checked that the correct processing as designed within the acquired range is rewritten by confirming the information obtained only when acquiring and the processing number determined in advance in the design. 8. The program trace method according to claim 7, wherein:
【請求項10】前記有り得る範囲で資源をアクセスした
かは、電源投入後に資源に初期値を設定しない初期状態
および資源が解放された状態のときには、割込み処理を
抜けるとき、またはリアルタイムモニタのタスク切替処
理の最初のタイミングで同一値か否かをチェックして行
うことを特徴とする請求項7に記載のプログラムトレー
ス方法。
10. A method for determining whether a resource has been accessed within the possible range, when an initial state in which an initial value is not set in a resource after power-on and a state in which the resource is released, when exiting an interrupt process, or switching a task of a real-time monitor. 8. The program trace method according to claim 7, wherein at the first timing of the processing, whether or not the values are the same is checked.
JP2001050210A 2001-02-26 2001-02-26 Program tracing device Pending JP2002251299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001050210A JP2002251299A (en) 2001-02-26 2001-02-26 Program tracing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001050210A JP2002251299A (en) 2001-02-26 2001-02-26 Program tracing device

Publications (1)

Publication Number Publication Date
JP2002251299A true JP2002251299A (en) 2002-09-06

Family

ID=18911207

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001050210A Pending JP2002251299A (en) 2001-02-26 2001-02-26 Program tracing device

Country Status (1)

Country Link
JP (1) JP2002251299A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005258889A (en) * 2004-03-12 2005-09-22 Nec Corp Program trace method and trace processing system
JP2009199365A (en) * 2008-02-21 2009-09-03 Funai Electric Co Ltd Multi-task processing system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005258889A (en) * 2004-03-12 2005-09-22 Nec Corp Program trace method and trace processing system
JP4527419B2 (en) * 2004-03-12 2010-08-18 日本電気株式会社 Program trace method and trace processing system
JP2009199365A (en) * 2008-02-21 2009-09-03 Funai Electric Co Ltd Multi-task processing system

Similar Documents

Publication Publication Date Title
US9727343B2 (en) Apparatus and method for handling exception events
US6708326B1 (en) Method, system and program product comprising breakpoint handling mechanism for debugging and/or monitoring a computer instruction sequence
JP4476193B2 (en) Information processing method and information processing apparatus
EP0534884A1 (en) Task timeout prevention in a multi-task, real-time system
JP2006277115A (en) Abnormality detection program and abnormality detection method
CN117234729B (en) Dynamic memory protection method, device, computer equipment and storage medium
WO2011113828A1 (en) Diagnostic data capture in a computing environment
US5257269A (en) Error controller for use in debugging microprocessor
JPH02294739A (en) Fault detecting system
JP2002251299A (en) Program tracing device
JPH0245838A (en) Program execution condition monitoring method
US20130318310A1 (en) Processor processing method and processor system
JPH0922369A (en) Illicit operation detection method in kernel of multi-tasking system
CN114253825A (en) Memory leak detection method and device, computer equipment and storage medium
JPH04266141A (en) Stack overflow detection system
JP2000339189A (en) Method for detecting illegal memory access debugging device and storage medium
CN108415788B (en) Data processing apparatus and method for responding to non-responsive processing circuitry
JP2004318469A (en) Program tracing system
JP3124788B2 (en) Exception handling method of embedded multitasking operating system
JP2000066922A (en) Storage contention preventing method for all instruction trace data in secondary storage device
JP3185780B2 (en) System monitoring apparatus and method
JP3480903B2 (en) Control method of all instruction trace in emulator
JP2006185365A (en) Semiconductor device and debugging method
JPH07210421A (en) Debugging method in thread environment
JPH0581051A (en) Resource destruction supervisory system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040406