JP2000020352A - Stack overflow detecting method and stack underflow detecting method - Google Patents

Stack overflow detecting method and stack underflow detecting method

Info

Publication number
JP2000020352A
JP2000020352A JP10190761A JP19076198A JP2000020352A JP 2000020352 A JP2000020352 A JP 2000020352A JP 10190761 A JP10190761 A JP 10190761A JP 19076198 A JP19076198 A JP 19076198A JP 2000020352 A JP2000020352 A JP 2000020352A
Authority
JP
Japan
Prior art keywords
stack
address
program
underflow
overflow
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
JP10190761A
Other languages
Japanese (ja)
Inventor
Hiroaki Toride
博明 取出
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.)
Mitsubishi Electric Corp
Mitsubishi Electric Semiconductor Systems Corp
Original Assignee
Mitsubishi Electric Corp
Mitsubishi Electric Semiconductor Systems 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 Mitsubishi Electric Corp, Mitsubishi Electric Semiconductor Systems Corp filed Critical Mitsubishi Electric Corp
Priority to JP10190761A priority Critical patent/JP2000020352A/en
Publication of JP2000020352A publication Critical patent/JP2000020352A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To unnecessitate debugger setting at the time of using a detection function and to unnecessitate the update of break conditions even when the break conditions are changed by frequent program correction in debugging. SOLUTION: When executing a program, a stack overflow detection address and stack pointer address preset to a stack overflow register 1 and a stack pointer register 2 are compared and in the case of coincidence, an interruption request is generated and the debugger executes break processing while using a leading address 6a of break processing preset to an overflow interruption vector area 6b.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、組み込みシステ
ム上で実行されるプログラムをデバッグ中に暴走する原
因の一つであるスタックオーバーフローやスタックアン
ダーフローを、デバッグ時に容易に検出するためのデバ
ッグシステムでのスタックオーバーフロー検出方法及び
スタックアンダーフロー検出方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging system for easily detecting, at the time of debugging, a stack overflow or a stack underflow which is one of the causes of a runaway during debugging of a program executed on an embedded system. And a stack underflow detection method.

【0002】[0002]

【従来の技術】図6はスタックオーバーフローを説明す
るための図であり、図において、101はメモリ空間を
示している。メモリ空間101には、データ領域102
及び組み込みシステムに搭載するプログラム(以下、プ
ログラムと称す)が記憶されるプログラム領域103が
設けられている。データ領域102とプログラム領域1
03との間には、スタック領域104が設けられてい
る。ここで、スタック消費量は、プログラムアルゴリズ
ム、割り込み機能の動作状態、割り込み要求の受け付け
タイミングなどを考慮し、関数、サブルーチンおよび割
り込みプログラムが多重に受け付けられた場合や、割り
込み許可状態でスタック操作命令を実行している場合の
組み合わせなどで、机上計算もしくはスタック消費量算
出ソフトウェアを用いて見積っている。
2. Description of the Related Art FIG. 6 is a diagram for explaining a stack overflow. In FIG. 6, reference numeral 101 denotes a memory space. The memory area 101 has a data area 102
And a program area 103 for storing a program (hereinafter, referred to as a program) mounted on the embedded system. Data area 102 and program area 1
03, a stack area 104 is provided. Here, the stack consumption is determined in consideration of the program algorithm, the operation state of the interrupt function, the timing of accepting an interrupt request, and the like, when a function, a subroutine, and an interrupt program are received multiple times, or when a stack operation instruction is issued in an interrupt enabled state. Estimation is performed using desk calculation or stack consumption calculation software based on the combination in the case of execution.

【0003】この方法は推定であり、見積りの誤りがあ
る場合は過剰にスタック領域104にデータが退避さ
れ、スタック領域104がその領域を越えて本来のデー
タ領域102まで成長し、図6の斜線で示すように本来
のデータ領域102を破壊するスタックオーバーフロー
が発生する。破壊されたデータをプログラムが使用する
とそのプログラムは不正な処理をすることになり、最悪
の場合プログラムが暴走することになる。デバッグ時に
この暴走の原因(スタックオーバーフロー)をすみやか
に突き止めることは困難である。
This method is an estimation. If there is an estimation error, data is excessively saved in the stack area 104, and the stack area 104 grows beyond the area to the original data area 102. As shown in FIG. 7, a stack overflow occurs that destroys the original data area 102. If the corrupted data is used by the program, the program will perform illegal processing, and in the worst case, the program will run away. It is difficult to quickly determine the cause of this runaway (stack overflow) during debugging.

【0004】そこで、プログラムが暴走する前、つまり
スタックオーバーフローが発生した直後にデバッガによ
りプログラムを停止させ、その原因を追求することが必
要となる。現在のマイコン機能やデバッガ機能ではプロ
グラムや変数のアドレス信号とそのアドレスをアクセス
したときの信号をトリガにしてブレークをかけるハード
ウェアブレークが考えられる。ブレークアドレスをスタ
ックトップ(スタック領域の一番若いアドレス)−1に
設定し、設定アドレスに対して任意データを読み書きし
た場合に実行ブレークをかける方法である。この方法の
特徴は、「実行後ブレークである」、「デバッガコント
ロールソフトウェアでのきめ細かいブレーク条件設定が
可能」、「ターゲットプログラム変更による変数アドレ
ス変更があった場合、ブレーク条件の再設定が必要」等
である。
Therefore, it is necessary to stop the program by a debugger before the program runs away, that is, immediately after the occurrence of a stack overflow, and to pursue the cause. In the current microcomputer function and debugger function, a hardware break that breaks by using an address signal of a program or a variable and a signal when the address is accessed as a trigger can be considered. In this method, the break address is set at the top of the stack (the lowest address in the stack area) -1, and an execution break is set when arbitrary data is read from or written to the set address. The features of this method are "break after execution", "detailed break conditions can be set by debugger control software", "break condition needs to be reset if variable address is changed by changing target program", etc. It is.

【0005】[0005]

【発明が解決しようとする課題】従来のスタックオーバ
ーフロー検出方法は以上のように構成されているので、
プログラム変更後にスタックポインタが変化した場合、
デバッガコントロールソフトウェアでの再設定が必要で
あり、またマルチタスクプログラミングの場合、タスク
数分のブレーク条件を設定する必要があるなどの課題が
あった。
Since the conventional stack overflow detection method is configured as described above,
If the stack pointer changes after changing the program,
There are problems such as resetting with debugger control software is required, and in the case of multitask programming, it is necessary to set break conditions for the number of tasks.

【0006】この発明は上記のような課題を解決するた
めになされたもので、検出機能使用時のデバッガ設定を
不要とすることができるスタックオーバーフロー検出方
法及びスタックアンダーフロー検出方法を得ることを目
的とする。また、この発明は、デバッグ時の頻繁なプロ
グラム修正によるブレーク条件の変更があった場合もブ
レーク条件の更新を不要とすることができるスタックオ
ーバーフロー検出方法及びスタックアンダーフロー検出
方法を得ることを目的とする。さらに、この発明は、命
令の実行前にブレークをすることができるスタックオー
バーフロー検出方法及びスタックアンダーフロー検出方
法を得ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide a stack overflow detection method and a stack underflow detection method which can eliminate the need for setting a debugger when using a detection function. And Another object of the present invention is to provide a stack overflow detection method and a stack underflow detection method which can eliminate the need for updating break conditions even when break conditions are changed due to frequent program correction during debugging. I do. Still another object of the present invention is to provide a method for detecting a stack overflow and a method for detecting a stack underflow that can break before execution of an instruction.

【0007】[0007]

【課題を解決するための手段】この発明に係るスタック
オーバーフロー検出方法は、組み込みプログラムのデバ
ッグ時におけるデバッガのスタックオーバーフロー検出
方法において、プログラムの初期設定段階でスタックに
データが過剰に退避された場合にオーバーフローするス
タックオーバーフロー検出アドレスを第1のレジスタに
設定しておき、プログラムの初期設定段階でスタックポ
インタアドレスを第2のレジスタに設定し、プログラム
の実行直前にデバッガがブレーク処理の先頭アドレスを
割り込みベクタ領域に設定し、プログラムが実行する際
に、スタックオーバーフロー検出アドレスとスタックポ
インタアドレスとを比較して一致した場合、割り込み要
求を発生し、デバッガがブレーク処理の先頭アドレスを
使ってブレーク処理を実行するものである。
A method for detecting a stack overflow according to the present invention is a method for detecting a stack overflow of a debugger at the time of debugging an embedded program. The stack overflow detection address at which overflow occurs is set in the first register, the stack pointer address is set in the second register at the initial setting stage of the program, and the debugger sets the start address of the break processing to the interrupt vector immediately before the execution of the program. If the stack overflow detection address and the stack pointer address match when the program is executed and the stack pointer address matches, an interrupt request is generated and the debugger uses the break processing start address to execute the break processing. It is intended to run.

【0008】この発明に係るスタックオーバーフロー検
出方法は、オペレーティングシステムのシステム記憶領
域に各タスクのスタックオーバーフロー検出アドレスを
設定しておき、ディスパッチ時に次に実行状態にするタ
スクのスタックオーバーフロー検出アドレスをシステム
記憶領域から読み出して第1のレジスタに設定するもの
である。
In the stack overflow detection method according to the present invention, a stack overflow detection address of each task is set in a system storage area of an operating system, and a stack overflow detection address of a task to be executed next at the time of dispatch is stored in a system storage. The data is read from the area and set in the first register.

【0009】この発明に係るスタックアンダーフロー検
出方法は、組み込みプログラムのデバッグ時におけるデ
バッガのスタックアンダーフロー検出方法において、プ
ログラムの初期設定段階でスタックからデータが過剰に
復帰された場合にアンダーフローするスタックアンダー
フロー検出アドレスを第1のレジスタに設定しておき、
プログラムの初期設定段階でスタックポインタアドレス
を第2のレジスタに設定し、プログラムの実行直前にデ
バッガがブレーク処理の先頭アドレスを割り込みベクタ
領域に設定し、プログラムが実行する際に、スタックア
ンダーフロー検出アドレスとスタックポインタアドレス
とを比較して一致した場合、割り込み要求を発生し、デ
バッガがブレーク処理の先頭アドレスを使ってブレーク
処理を実行するものである。
A method of detecting a stack underflow according to the present invention is a method of detecting a stack underflow of a debugger when debugging an embedded program, wherein the stack underflows when data is excessively returned from the stack in a program initialization stage. Set the underflow detection address in the first register,
The stack pointer address is set in the second register at the initial setting stage of the program, the debugger sets the start address of the break processing in the interrupt vector area immediately before the program is executed, and the stack underflow detection address is set when the program is executed. When a match is found between the address and the stack pointer address, an interrupt request is generated, and the debugger executes the break process using the start address of the break process.

【0010】この発明に係るスタックアンダーフロー検
出方法は、オペレーティングシステムのシステム記憶領
域に各タスクのスタックアンダーフロー検出アドレスを
設定しておき、ディスパッチ時に次に実行状態にするタ
スクのスタックアンダーフロー検出アドレスをシステム
記憶領域から読み出して第1のレジスタに設定するもの
である。
In the stack underflow detection method according to the present invention, a stack underflow detection address of each task is set in a system storage area of an operating system, and a stack underflow detection address of a task to be executed next at the time of dispatch is set. Is read from the system storage area and set in the first register.

【0011】[0011]

【発明の実施の形態】以下、この発明の実施の一形態を
説明する。 実施の形態1.図1はこの発明の実施の形態1によるス
タックオーバーフロー検出方法の説明図である。図1に
おいて、1はプログラムの初期設定段階でスタックにデ
ータが過剰に退避された場合にオーバーフローするスタ
ックオーバーフロー検出アドレスが設定される第1のレ
ジスタとしてのスタックオーバーフローレジスタ(以
下、SORと称する)である。2はプログラムの初期設
定段階でスタックポインタアドレスが設定される第2の
レジスタとしてのスタックポインタレジスタ(以下、S
PRと称する)である。プログラムはサブルーチンおよ
び割り込み機能を用いるので、スタックポインタアドレ
スの設定はプログラムの初期設定段階で行っている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below. Embodiment 1 FIG. FIG. 1 is an explanatory diagram of a stack overflow detection method according to Embodiment 1 of the present invention. In FIG. 1, reference numeral 1 denotes a stack overflow register (hereinafter, referred to as SOR) as a first register in which a stack overflow detection address that overflows when data is excessively saved on the stack in a program initial setting stage is set. is there. 2 is a stack pointer register (hereinafter referred to as S) as a second register in which a stack pointer address is set at a program initial setting stage.
PR). Since the program uses a subroutine and an interrupt function, the setting of the stack pointer address is performed at the initial setting stage of the program.

【0012】3はプログラムが実行する際に、スタック
オーバーフロー検出アドレスとスタックポインタアドレ
スとを比較し、一致した場合に割り込み要求を発生する
比較器である。4は任意のレジスタを示しており、この
レジスタ4にはオーバーフロー割り込み用の許可ビット
4aが設定される。すなわち、初期設定終了後メインプ
ログラム実行直前にオーバーフロー割り込みを許可する
ためにオーバーフロー割り込み用の割り込み許可ビット
を許可にする。
Reference numeral 3 denotes a comparator which compares a stack overflow detection address with a stack pointer address when the program is executed, and generates an interrupt request when the addresses match. Reference numeral 4 denotes an arbitrary register. In this register 4, an overflow interrupt permission bit 4a is set. That is, the interrupt enable bit for the overflow interrupt is enabled to enable the overflow interrupt immediately after the initialization and immediately before the execution of the main program.

【0013】ここで、この準備処理はマイコン側につい
てのみなので、これだけではスタックオーバーフロー検
出機能は使用できない。つまりデバッガの処理もマイコ
ンのオーバーフロー割り込みと連動させなければならな
い。連動させるために、オーバーフロー割り込みが発生
した場合にデバッガ側がブレーク処理を行えるように、
デバッガはプログラム実行直前にROM領域5の割り込
みベクタテーブル領域6内のオーバーフロー割り込みベ
クタ領域(割り込みベクタ領域)6bに対してブレーク
処理の先頭アドレス6aを設定する。
Here, since this preparation processing is performed only on the microcomputer side, the stack overflow detection function cannot be used by itself. In other words, the processing of the debugger must also be linked with the overflow interrupt of the microcomputer. In order to cooperate, the debugger can perform break processing when an overflow interrupt occurs.
The debugger sets the break processing start address 6a in the overflow interrupt vector area (interrupt vector area) 6b in the interrupt vector table area 6 of the ROM area 5 immediately before executing the program.

【0014】次に動作について説明する。マイコンは命
令を実行するたびに、その時出力されようとするSPR
2に設定されているスタックポインタアドレスとSOR
1に設定されているスタックオーバーフロー検出アドレ
スとを比較器3によりマイコン内部で比較する。
Next, the operation will be described. Each time the microcomputer executes an instruction, the SPR to be output at that time
Stack pointer address and SOR set to 2
The comparator 3 compares the stack overflow detection address set to 1 inside the microcomputer.

【0015】ここで、プログラムを実行中に推定してい
たスタック容量を超えてデータがスタックに退避されよ
うとした場合、その時のSPR2に設定されているスタ
ックポインタアドレスとSOR1に設定されているスタ
ックオーバーフロー検出アドレスとが比較器3によりマ
イコン内部で比較され一致することになる。このとき、
初めて割り込み要求が発生する。この割り込みはリセッ
ト同様に即時に要求を受け付ける。この要求を利用しデ
バッガがプログラムをブレークさせブレーク後の処理を
行うことになる。
Here, if data is to be saved on the stack beyond the stack capacity estimated during the execution of the program, the stack pointer address set in SPR2 and the stack set in SOR1 at that time. The overflow detection address is compared with the overflow detection address in the microcomputer by the comparator 3 and coincides with each other. At this time,
An interrupt request occurs for the first time. This interrupt accepts a request immediately like a reset. Using this request, the debugger breaks the program and performs processing after the break.

【0016】ここで、デバッグ工程でプログラムを修正
したためにスタックオーバーフロー検出アドレスが変化
しても、プログラム上でスタックオーバーフロー検出ア
ドレスにラベルを割り付け、ラベルによりSOR1の設
定を行っていれば、ユーザのデバッグ時の再設定は不要
である。
Here, even if the stack overflow detection address changes due to the program being modified in the debugging process, if a label is assigned to the stack overflow detection address on the program and the SOR1 is set by the label, user debugging No time resetting is required.

【0017】以上のように、この実施の形態1によれ
ば、デバッガのハードウェアブレーク機能によるスタッ
クオーバーフロー検出とは違い、検出機能使用時のデバ
ッガ設定が不要であるという効果が得られる。また、デ
バッグ時の頻繁なプログラム修正によるブレーク条件
(ここではスタックオーバーフロー検出アドレス)の変
更があった場合もブレーク条件の更新は不要であるとい
う効果が得られる。さらに、命令の実行前ブレークが可
能となるという効果が得られる。
As described above, according to the first embodiment, unlike the stack overflow detection by the hardware break function of the debugger, the effect that the debugger setting when using the detection function is unnecessary is obtained. In addition, even when a break condition (here, a stack overflow detection address) is changed due to frequent program modification at the time of debugging, there is an effect that the break condition need not be updated. Further, an effect that a break before execution of an instruction is enabled is obtained.

【0018】実施の形態2.この発明の実施の形態2
は、マルチタスクプログラムの各タスクが持つユーザス
タックのスタックオーバーフロー検出にこの発明を適用
したものである。その場合の概略回路構成は図1と同様
であるが、現在のリアルタイムOS(以下、OSと称す
る)の機能では実現しない。実現させるためのOSの追
加構成を図2に示す。
Embodiment 2 FIG. Embodiment 2 of the present invention
Is an application of the present invention to detection of stack overflow of a user stack of each task of a multitask program. The schematic circuit configuration in that case is the same as that of FIG. 1, but is not realized by the function of the current real-time OS (hereinafter, referred to as OS). FIG. 2 shows an additional configuration of the OS to be realized.

【0019】図2に示すように、OSのシステム記憶領
域7にはOSが管理する資源情報が格納されているが、
本機能を実現するために各タスクが持つスタックのスタ
ックオーバーフロー検出アドレスを新たな管理情報とし
て追加登録し、スタックオーバーフロー検出アドレス格
納領域8を設ける。スタックオーバーフロー検出用アド
レスはタスクコントロールブロックに置いてもよい。
As shown in FIG. 2, resource information managed by the OS is stored in the system storage area 7 of the OS.
In order to realize this function, a stack overflow detection address of the stack of each task is additionally registered as new management information, and a stack overflow detection address storage area 8 is provided. The address for detecting a stack overflow may be placed in the task control block.

【0020】スタックオーバーフロー検出アドレス格納
領域8は、システム用スタックオーバーフロー検出アド
レス9、ID1のタスク用スタックオーバーフロー検出
アドレス10、ID2のタスク用スタックオーバーフロ
ー検出アドレス11などにより構成されている。
The stack overflow detection address storage area 8 is composed of a system stack overflow detection address 9, a task stack overflow detection address 10 of ID1, a task stack overflow detection address 11 of ID2, and the like.

【0021】さらにOSの機能として、ディスパッチ時
に次に実行状態にするタスクのスタックオーバーフロー
検出アドレスをスタックオーバーフロー検出アドレス格
納領域8から読み出し、SOR1に設定するようにす
る。システムコール処理中もしくは割り込みプログラム
実行中にシステムスタックを使用する場合は、その処理
を実行する前にシステム用スタックオーバーフロー検出
アドレス9をSOR1に設定するようにする。
Further, as a function of the OS, the stack overflow detection address of the task to be executed next at the time of dispatch is read from the stack overflow detection address storage area 8 and set in the SOR1. When the system stack is used during the system call processing or during the execution of the interrupt program, the system stack overflow detection address 9 is set to SOR1 before executing the processing.

【0022】次に動作について説明する。タスク実行中
もしくはディスパッチ時にそのタスクが確保しているス
タック容量を越えてデータを退避しようとする場合、ス
タックオーバーフロー検出機能によりオーバーフロー割
り込みが発生し、プログラムは即時にブレークする。デ
ィスパッチにより実行状態のタスクが替わってもその都
度実行状態タスクのスタックオーバーフロー検出アドレ
スをSOR1に設定するので、個々のタスクのスタック
オーバーフロー検出が可能となる。
Next, the operation will be described. When attempting to save data beyond the stack capacity secured by the task during task execution or dispatch, an overflow interrupt is generated by the stack overflow detection function, and the program immediately breaks. Even if the task in the execution state is changed by the dispatch, the stack overflow detection address of the execution state task is set to SOR1 each time, so that the stack overflow of each task can be detected.

【0023】また、システムコール処理中もしくは割り
込みプログラム実行中にシステムスタックのオーバーフ
ローが発生した場合もSOR1はシステム用スタックオ
ーバーフロー検出アドレスに設定されているので、オー
バーフロー割り込みが発生し、プログラムは即時にブレ
ークする。デバッグ工程でプログラムを修正したために
スタックオーバーフロー検出アドレスが変化しても、ス
タックオーバーフロー検出アドレスはOSの管理下にあ
るので、ユーザのデバッグ時の再設定は不要である。
If the system stack overflows during the processing of the system call or the execution of the interrupt program, the overflow interrupt occurs and the program immediately breaks because the SOR1 is set to the stack overflow detection address for the system. I do. Even if the stack overflow detection address changes due to the modification of the program in the debugging process, the stack overflow detection address is under the control of the OS, so that the user does not need to reset the address at the time of debugging.

【0024】以上のように、この実施の形態2によれ
ば、マルチタスクプログラムにおいても、デバッガのハ
ードウェアブレーク機能によるスタックオーバーフロー
検出とは違い、検出機能使用時のデバッガ設定が不要で
あり、またデバッグ時の頻繁なプログラム修正によるブ
レーク条件(ここではスタックオーバーフロー検出アド
レス)の変更があった場合もブレーク条件の更新は不要
であり、さらに命令の実行前ブレークが可能となるとい
う効果が得られる。
As described above, according to the second embodiment, even in a multitask program, unlike the stack overflow detection by the hardware break function of the debugger, the debugger setting when using the detection function is not required. Even when a break condition (here, a stack overflow detection address) is changed due to frequent program modification at the time of debugging, it is not necessary to update the break condition, and an effect that a break before execution of an instruction is possible is obtained.

【0025】実施の形態3.図3はスタックアンダーフ
ロー発生時の様子を示す図である。メモリ空間12にお
けるサブルーチンや割り込みプログラムの実行直後のス
タック状態は図3(a)に示すようになる。その後スタ
ック操作命令を実行し、スタックポインタアドレスを減
じた時のスタック状態は図3(b)に示すようになる。
その後サブルーチン終了や割り込みプログラム終了時
に、そのスタックポインタアドレスを元に戻しておけば
本来の退避データが復帰され、プログラムはその後も正
常動作をする。しかし、スタックポインタアドレスを元
に戻さなかった場合は減じたアドレスから退避データを
復帰させるので、最終的にはサブルーチンや割り込みプ
ログラム実行直前のスタックポインタアドレスを越えて
スタックを復帰させることになる。その様子を図3
(c)に示す。この場合の復帰データは本来の退避デー
タとは異なるため、その後のプログラム実行は不正動作
をする可能性がある。実施の形態3に係るスタックアン
ダーフロー検出方法はかかる事態を防止するものであ
る。
Embodiment 3 FIG. 3 is a diagram showing a state when a stack underflow occurs. FIG. 3A shows the state of the stack in the memory space 12 immediately after the execution of the subroutine or the interrupt program. Thereafter, the stack operation instruction is executed, and the stack state when the stack pointer address is reduced is as shown in FIG.
Then, when the subroutine ends or the interrupt program ends, if the stack pointer address is restored, the original saved data is restored, and the program continues to operate normally thereafter. However, if the stack pointer address is not restored, the saved data is restored from the reduced address, and eventually the stack is restored beyond the stack pointer address immediately before execution of the subroutine or interrupt program. Figure 3
It is shown in (c). Since the return data in this case is different from the original save data, the subsequent execution of the program may operate improperly. The stack underflow detection method according to the third embodiment prevents such a situation.

【0026】図4はこの発明の実施の形態3によるスタ
ックアンダーフロー検出方法の説明図である。図4にお
いて、13はプログラムの初期設定段階でスタックから
データが過剰に復帰された場合にアンダーフローするス
タックアンダーフロー検出アドレスが設定される第1の
レジスタとしてのスタックアンダーフローレジスタ(以
下、SURと称する)である。14はプログラムの初期
設定段階でスタックポインタアドレスが設定される第2
のレジスタとしてのスタックポインタレジスタ(以下、
SPRと称する)である。プログラムはサブルーチンお
よび割り込み機能を用いるので、スタックポインタアド
レスの設定はプログラムの初期設定段階で行っている。
FIG. 4 is an explanatory diagram of a stack underflow detection method according to Embodiment 3 of the present invention. In FIG. 4, reference numeral 13 denotes a stack underflow register (hereinafter, SUR and SUR) as a first register in which a stack underflow detection address which underflows when data is excessively returned from the stack in a program initialization stage is set. ). Numeral 14 denotes a second in which the stack pointer address is set in the initial setting stage of the program.
Stack pointer register as a register of
SPR). Since the program uses a subroutine and an interrupt function, the setting of the stack pointer address is performed at the initial setting stage of the program.

【0027】また、15はプログラムが実行する際に、
スタックアンダーフロー検出アドレスとスタックポイン
タアドレスとを比較し、一致した場合に割り込み要求を
発生する比較器である。16は任意のレジスタを示して
おり、このレジスタ16にはアンダーフロー割り込み用
の許可ビット16aが設定される。すなわち、初期設定
終了後メインプログラム実行直前にアンダーフロー割り
込みを許可する為にアンダーフロー割り込み用の割り込
み許可ビットを許可にする。
Reference numeral 15 denotes when the program is executed,
This is a comparator that compares a stack underflow detection address with a stack pointer address and generates an interrupt request when the addresses match. Reference numeral 16 denotes an arbitrary register, in which an underflow interrupt enable bit 16a is set. That is, the interrupt enable bit for the underflow interrupt is enabled in order to enable the underflow interrupt immediately after the initialization and immediately before the execution of the main program.

【0028】ここで、この準備処理はマイコン側につい
てのみなので、これだけではスタックアンダーフロー検
出機能は使用できない。つまりデバッガの処理もマイコ
ンのアンダーフロー割り込みと連動させなければならな
い。連動させるためにアンダーフロー割り込みが発生し
た場合にデバッガ側がブレーク処理を行えるように、デ
バッガはプログラム実行直前にROM領域17のアンダ
ーフロー割り込みベクタ領域18に対してブレーク処理
の先頭アドレス18aを設定する。
Here, since this preparation processing is performed only on the microcomputer side, the stack underflow detection function cannot be used alone. In other words, the processing of the debugger must also be linked with the underflow interrupt of the microcomputer. The debugger sets the start address 18a of the break processing in the underflow interrupt vector area 18 of the ROM area 17 immediately before the execution of the program so that the debugger can perform the break processing when an underflow interrupt occurs for the interlocking.

【0029】次に動作について説明する。マイコンは命
令を実行するたびに、その時出力されようとするスタッ
クポインタアドレスとスタックアンダーフロー検出アド
レスとを比較器15によりマイコン内部で比較する。
Next, the operation will be described. Each time the microcomputer executes an instruction, the stack pointer address to be output at that time and the stack underflow detection address are compared by the comparator 15 inside the microcomputer.

【0030】ここで、サブルーチンや割り込みプログラ
ム実行直前のスタックポインタアドレスを越えてスタッ
クを復帰させようとした場合、そのときのスタックポイ
ンタアドレスとスタックアンダーフロー検出アドレスと
が比較器15により比較され一致することになる。この
とき、初めて割り込み要求が発生する。この割り込みは
リセット同様に即時に要求を受け付ける。この要求を利
用しデバッガがプログラムをブレークさせブレーク後の
処理を行うことになる。
If the stack is to be restored beyond the stack pointer address immediately before the execution of the subroutine or interrupt program, the comparator 15 compares the stack pointer address at that time with the stack underflow detection address. Will be. At this time, an interrupt request is generated for the first time. This interrupt accepts a request immediately like a reset. Using this request, the debugger breaks the program and performs processing after the break.

【0031】ここで、デバッグ工程でプログラムを修正
したためにスタックアンダーフロー検出アドレスが変化
しても、プログラム上でスタックアンダーフロー検出ア
ドレスにラベルを割り付け、ラベルによりSUR13の
設定を行っていれば、ユーザのデバッグ時の再設定は不
要である。
Here, even if the stack underflow detection address changes due to the program being modified in the debugging process, if a label is assigned to the stack underflow detection address on the program and the SUR13 is set by the label, the user There is no need to reset when debugging.

【0032】以上のように、この実施の形態3によれ
ば、デバッガのハードウェアブレーク機能によるスタッ
クアンダーフロー検出とは違い、検出機能使用時のデバ
ッガ設定が不要であり、またデバッグ時の頻繁なプログ
ラム修正によるブレーク条件(ここではスタックアンダ
ーフロー検出アドレス)の変更があった場合もブレーク
条件の更新は不要であり、さらに命令の実行前ブレーク
が可能であるという効果が得られる。
As described above, according to the third embodiment, unlike the detection of the stack underflow by the hardware break function of the debugger, it is not necessary to set the debugger when using the detection function, and the debugging is frequently performed. Even when a break condition (here, a stack underflow detection address) is changed due to program correction, the break condition need not be updated, and an effect that a break before execution of an instruction is possible is obtained.

【0033】実施の形態4.この発明の実施の形態4
は、マルチタスクプログラムの各タスクが持つユーザス
タックのスタックアンダーフロー検出にこの発明を適用
させたものである。その場合の概略回路構成は図4と同
様であるが、現在のOSの機能では実現しない。実現さ
せるためのOSの追加構成を図5に示す。
Embodiment 4 FIG. Embodiment 4 of the present invention
The present invention is applied to detection of a stack underflow of a user stack of each task of a multitask program. The schematic circuit configuration in that case is similar to that of FIG. 4, but is not realized by the current OS function. FIG. 5 shows an additional configuration of the OS to be realized.

【0034】図5に示すように、OSのシステム記憶領
域19にはOSが管理する資源情報が格納されている
が、本機能を実現するために各タスクが持つスタックの
スタックアンダーフロー検出アドレスを新たな管理情報
として追加登録し、スタックアンダーフロー検出アドレ
ス格納領域20を設ける。スタックアンダーフロー検出
用アドレスはタスクコントロールブロックに置いてもよ
い。
As shown in FIG. 5, resource information managed by the OS is stored in the system storage area 19 of the OS. To realize this function, the stack underflow detection address of the stack of each task is stored. Additional registration is performed as new management information, and a stack underflow detection address storage area 20 is provided. The address for detecting a stack underflow may be placed in the task control block.

【0035】スタックアンダーフロー検出アドレス格納
領域20は、システム用スタックアンダーフロー検出ア
ドレス21、ID1のタスク用スタックアンダーフロー
検出アドレス22、ID2のタスク用スタックアンダー
フロー検出アドレス23などにより構成されている。
The stack underflow detection address storage area 20 includes a system stack underflow detection address 21, a task stack underflow detection address 22 of ID1, a task stack underflow detection address 23 of ID2, and the like.

【0036】さらにOSの機能として、ディスパッチ時
に次に実行状態にするタスクのスタックアンダーフロー
検出アドレスをスタックアンダーフロー検出アドレス格
納領域20から読み出し、SUR13に設定するように
する。OS処理実行中もしくは割り込みプログラム実行
中にシステムスタックを使用する場合は、その処理を実
行する前にシステム用スタックアンダーフロー検出アド
レス21をSUR13に設定するようにする。
Further, as a function of the OS, the stack underflow detection address of the task to be executed next at the time of dispatch is read from the stack underflow detection address storage area 20 and set in the SUR 13. When the system stack is used during the execution of the OS process or the execution of the interrupt program, the system stack underflow detection address 21 is set in the SUR 13 before the execution of the process.

【0037】次に動作について説明する。タスク実行中
にそのタスクのスタックボトム(スタック領域の一番大
きいアドレス)を越えてデータを復帰しようとした場
合、スタックアンダーフロー検出機能によりアンダーフ
ロー割り込みが発生し、プログラムは即時にブレークす
る。ディスパッチにより実行状態のタスクが替わっても
その都度実行状態タスクのスタックアンダーフロー検出
アドレスをSUR13に設定するので、個々のタスクの
スタックアンダーフロー検出が可能となる。
Next, the operation will be described. If an attempt is made to return data beyond the stack bottom (the largest address in the stack area) of the task during execution of the task, an underflow interrupt is generated by the stack underflow detection function, and the program immediately breaks. Even when the task in the execution state is changed by the dispatch, the stack underflow detection address of the execution state task is set in the SUR 13 each time, so that the stack underflow of each task can be detected.

【0038】また、OS処理実行中もしくは割り込みプ
ログラム終了直後にシステムスタックのアンダーフロー
が発生した場合もSUR13はシステム用スタックアン
ダーフロー検出アドレスに設定されているので、アンダ
ーフロー割り込みが発生し、プログラムは即時にブレー
クする。デバッグ工程でプログラムを修正したためにス
タックアンダーフロー検出アドレスが変化しても、スタ
ックアンダーフロー検出アドレスはOSの管理下にある
ので、ユーザのデバッグ時の再設定は不要である。
Also, when an underflow of the system stack occurs during the execution of the OS process or immediately after the end of the interrupt program, the SUR 13 is set to the stack underflow detection address for the system. Break immediately. Even if the stack underflow detection address changes due to the program being modified in the debugging process, the stack underflow detection address is under the control of the OS, so that the user does not need to reset the address at the time of debugging.

【0039】以上のように、この実施の形態4によれ
ば、マルチタスクプログラムにおいても、デバッガのハ
ードウェアブレーク機能によるスタックアンダーフロー
検出とは違い、検出機能使用時のデバッガ設定が不要で
あり、またデバッグ時の頻繁なプログラム修正によるブ
レーク条件(ここではスタックアンダーフロー検出アド
レス)の変更があった場合もブレーク条件の更新は不要
であり、さらに命令の実行前ブレークが可能であるとい
う効果が得られる。
As described above, according to the fourth embodiment, unlike the stack underflow detection by the hardware break function of the debugger, the debugger setting when using the detection function is unnecessary even in the multitask program. Also, when the break conditions (here, the stack underflow detection address) are changed due to frequent program modification at the time of debugging, the break conditions need not be updated, and a break before instruction execution is possible. Can be

【0040】[0040]

【発明の効果】以上のように、この発明によれば、プロ
グラムの初期設定段階でスタックにデータが過剰に退避
された場合にオーバーフローするスタックオーバーフロ
ー検出アドレスを第1のレジスタに設定しておき、プロ
グラムの初期設定段階でスタックポインタアドレスを第
2のレジスタに設定し、プログラムの実行直前にブレー
ク処理の先頭アドレスを割り込みベクタ領域に設定し、
プログラムが実行する際に、第1のレジスタのスタック
オーバーフロー検出アドレスと第2のレジスタのスタッ
クポインタアドレスとを比較して一致した場合、割り込
み要求を発生し、デバッガがブレーク処理の先頭アドレ
スを使ってブレーク処理を実行するように構成したの
で、検出機能使用時のデバッガ設定が不要であり、また
デバッグ時の頻繁なプログラム修正によるブレーク条件
の変更があった場合もブレーク条件の更新は不要であ
り、さらに命令の実行前ブレークが可能となるという効
果がある。
As described above, according to the present invention, a stack overflow detection address that overflows when data is excessively saved on the stack at the initial setting stage of a program is set in the first register, At the initial setting stage of the program, the stack pointer address is set in the second register, and immediately before the execution of the program, the start address of the break processing is set in the interrupt vector area,
When the program is executed, if the stack overflow detection address of the first register is compared with the stack pointer address of the second register and they match, an interrupt request is generated, and the debugger uses the start address of the break processing to execute the interrupt request. Since the break processing is configured to be executed, the debugger setting when using the detection function is unnecessary, and even when the break condition is changed due to frequent program modification during debugging, the break condition does not need to be updated. Further, there is an effect that a break before execution of an instruction can be performed.

【0041】この発明によれば、オペレーティングシス
テムのシステム記憶領域に各タスクのスタックオーバー
フロー検出アドレスを第2のレジスタに設定しておき、
ディスパッチ時に次に実行状態にするタスクのスタック
オーバーフロー検出アドレスをシステム記憶領域から読
み出して第1のレジスタに設定するように構成したの
で、マルチタスクプログラムにおいても、検出機能使用
時のデバッガ設定が不要であり、またデバッグ時の頻繁
なプログラム修正によるブレーク条件の変更があった場
合もブレーク条件の更新は不要であり、さらに命令の実
行前ブレークが可能となるという効果がある。
According to the present invention, the stack overflow detection address of each task is set in the second register in the system storage area of the operating system.
Since the stack overflow detection address of the task to be executed next at the time of dispatch is read from the system storage area and set in the first register, the debugger setting when using the detection function is unnecessary even in the multitask program. In addition, when the break condition is changed due to frequent program modification at the time of debugging, it is not necessary to update the break condition, and it is possible to perform a break before executing an instruction.

【0042】この発明によれば、プログラムの初期設定
段階でスタックからデータが過剰に復帰された場合にア
ンダーフローするスタックアンダーフロー検出アドレス
を第1のレジスタに設定しておき、プログラムの初期設
定段階でスタックポインタアドレスを第2のレジスタ設
定しておき、プログラムの実行直前にブレーク処理の先
頭アドレスを割り込みベクタ領域に設定し、プログラム
が実行する際に、第1のレジスタのスタックアンダーフ
ロー検出アドレスと第2のレジスタのスタックポインタ
アドレスとを比較して一致した場合、割り込み要求を発
生し、デバッガがブレーク処理の先頭アドレスを使って
ブレーク処理を実行するように構成したので、検出機能
使用時のデバッガ設定が不要であり、またデバッグ時の
頻繁なプログラム修正によるブレーク条件の変更があっ
た場合もブレーク条件の更新は不要であり、さらに命令
の実行前ブレークが可能であるという効果がある。
According to the present invention, a stack underflow detection address which underflows when data is excessively returned from the stack at the initial setting stage of the program is set in the first register, and the program is initialized. Sets the stack pointer address in the second register, sets the start address of break processing in the interrupt vector area immediately before execution of the program, and sets the stack underflow detection address of the first register to the stack underflow address when the program is executed. If the stack pointer address of the second register is compared with and matches, an interrupt request is generated and the debugger is configured to execute the break processing using the start address of the break processing. No setting required, and frequent programs for debugging Updating the even break conditions when there is a change in the break condition by positive is unnecessary, there is an effect that it is possible to further break before execution of the instruction.

【0043】この発明によれば、オペレーティングシス
テムのシステム記憶領域に各タスクのスタックアンダー
フロー検出アドレスを設定しておき、ディスパッチ時に
次に実行状態にするタスクのスタックアンダーフロー検
出アドレスをシステム記憶領域から読み出して第1のレ
ジスタに設定するように構成したので、マルチタスクプ
ログラムにおいても、検出機能使用時のデバッガ設定が
不要であり、またデバッグ時の頻繁なプログラム修正に
よるブレーク条件の変更があった場合もブレーク条件の
更新は不要であり、さらに命令の実行前ブレークが可能
であるという効果がある。
According to the present invention, the stack underflow detection address of each task is set in the system storage area of the operating system, and the stack underflow detection address of the task to be executed next at the time of dispatching is set from the system storage area. Since it is configured to read and set to the first register, it is not necessary to set the debugger when using the detection function even in a multitask program, and when the break condition is changed due to frequent program modification during debugging. Also, there is an effect that the break condition does not need to be updated, and a break before the execution of the instruction is possible.

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

【図1】 この発明の実施の形態1によるスタックオー
バーフロー検出方法の説明図である。
FIG. 1 is an explanatory diagram of a stack overflow detection method according to a first embodiment of the present invention.

【図2】 この発明の実施の形態2によるスタックオー
バーフロー検出方法の説明図である。
FIG. 2 is an explanatory diagram of a stack overflow detection method according to a second embodiment of the present invention.

【図3】 スタックアンダーフロー発生時の様子を示す
図である。
FIG. 3 is a diagram showing a state when a stack underflow occurs.

【図4】 この発明の実施の形態3によるスタックアン
ダーフロー検出方法の説明図である。
FIG. 4 is an explanatory diagram of a stack underflow detection method according to a third embodiment of the present invention.

【図5】 この発明の実施の形態4によるスタックアン
ダーフロー検出方法の説明図である。
FIG. 5 is an explanatory diagram of a stack underflow detection method according to a fourth embodiment of the present invention.

【図6】 スタックオーバーフロー発生時の様子を示す
図である。
FIG. 6 is a diagram illustrating a state when a stack overflow occurs.

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

1 スタックオーバーフローレジスタ(第1のレジス
タ)、2 スタックポインタレジスタ(第2のレジス
タ)、6a ブレーク処理の先頭アドレス、6bオーバ
ーフロー割り込みベクタ領域(割り込みベクタ領域)。
1 Stack overflow register (first register), 2 stack pointer register (second register), 6a break processing start address, 6b overflow interrupt vector area (interrupt vector area).

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 組み込みプログラムのデバッグ時におけ
るデバッガのスタックオーバーフロー検出方法におい
て、 プログラムの初期設定段階でスタックにデータが過剰に
退避された場合にオーバーフローするスタックオーバー
フロー検出アドレスを第1のレジスタに設定しておき、 プログラムの初期設定段階でスタックポインタアドレス
を第2のレジスタに設定し、 プログラムの実行直前にブレーク処理の先頭アドレスを
割り込みベクタ領域に設定し、 プログラムが実行する際に、前記スタックオーバーフロ
ー検出アドレスと前記スタックポインタアドレスとを比
較し、 前記スタックオーバーフロー検出アドレスと前記スタッ
クポインタアドレスとが一致した場合、割り込み要求を
発生し、デバッガが前記ブレーク処理の先頭アドレスを
使ってブレーク処理を実行する工程を備えたスタックオ
ーバーフロー検出方法。
In a method for detecting a stack overflow of a debugger at the time of debugging an embedded program, a stack overflow detection address which overflows when data is excessively saved on a stack in an initial setting stage of a program is set in a first register. The stack pointer address is set in the second register in the initial setting stage of the program, the start address of the break processing is set in the interrupt vector area immediately before the program is executed, and the stack overflow detection is performed when the program is executed. The stack address is compared with the stack pointer address. If the stack overflow detection address matches the stack pointer address, an interrupt request is generated, and the debugger uses the start address of the break processing. Stack overflow detection method comprising a step of executing a break processing Te.
【請求項2】 オペレーティングシステムのシステム記
憶領域に各タスクのスタックオーバーフロー検出アドレ
スを設定しておき、 ディスパッチ時に次に実行状態にするタスクのスタック
オーバーフロー検出アドレスを前記システム記憶領域か
ら読み出して前記第1のレジスタに設定することを特徴
とする請求項1記載のスタックオーバーフロー検出方
法。
2. A stack overflow detection address of each task is set in a system storage area of an operating system, and a stack overflow detection address of a task to be executed next at the time of dispatch is read out from the system storage area to read the first stack overflow address. 2. The stack overflow detection method according to claim 1, wherein the stack overflow is set in the register.
【請求項3】 組み込みプログラムのデバッグ時におけ
るデバッガのスタックアンダーフロー検出方法におい
て、 プログラムの初期設定段階でスタックからデータが過剰
に復帰された場合にアンダーフローするスタックアンダ
ーフロー検出アドレスを第1のレジスタに設定してお
き、 プログラムの初期設定段階でスタックポインタアドレス
を第2のレジスタに設定し、 プログラムの実行直前にブレーク処理の先頭アドレスを
割り込みベクタ領域に設定し、 プログラムが実行する際に、前記スタックアンダーフロ
ー検出アドレスと前記スタックポインタアドレスとを比
較し、 前記スタックアンダーフロー検出アドレスと前記スタッ
クポインタアドレスとが一致した場合、割り込み要求を
発生し、デバッガが前記ブレーク処理の先頭アドレスを
使ってブレーク処理を実行する工程を備えたスタックア
ンダーフロー検出方法。
3. A method for detecting a stack underflow of a debugger at the time of debugging an embedded program, wherein a stack underflow detection address which underflows when data is excessively returned from the stack in a program initialization stage is stored in a first register. The stack pointer address is set in the second register at the initial setting stage of the program, the start address of the break processing is set in the interrupt vector area immediately before the execution of the program, and when the program is executed, The stack underflow detection address is compared with the stack pointer address, and when the stack underflow detection address matches the stack pointer address, an interrupt request is generated, and the debugger sets the start address of the break processing. Stack underflow detection method which includes a step of executing a break processing I.
【請求項4】 オペレーティングシステムのシステム記
憶領域に各タスクのスタックアンダーフロー検出アドレ
スを設定しておき、 ディスパッチ時に次に実行状態にするタスクのスタック
アンダーフロー検出アドレスを前記システム記憶領域か
ら読み出して前記第1のレジスタに設定することを特徴
とする請求項3記載のスタックアンダーフロー検出方
法。
4. A stack underflow detection address of each task is set in a system storage area of an operating system, and a stack underflow detection address of a task to be executed next at the time of dispatch is read from the system storage area. 4. The method according to claim 3, wherein the first register is set.
JP10190761A 1998-07-06 1998-07-06 Stack overflow detecting method and stack underflow detecting method Pending JP2000020352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10190761A JP2000020352A (en) 1998-07-06 1998-07-06 Stack overflow detecting method and stack underflow detecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10190761A JP2000020352A (en) 1998-07-06 1998-07-06 Stack overflow detecting method and stack underflow detecting method

Publications (1)

Publication Number Publication Date
JP2000020352A true JP2000020352A (en) 2000-01-21

Family

ID=16263297

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10190761A Pending JP2000020352A (en) 1998-07-06 1998-07-06 Stack overflow detecting method and stack underflow detecting method

Country Status (1)

Country Link
JP (1) JP2000020352A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007148529A (en) * 2005-11-24 2007-06-14 Nippon Telegr & Teleph Corp <Ntt> Buffer overflow detection device, buffer overflow detection method, and buffer overflow detection program
KR20080036733A (en) * 2006-10-24 2008-04-29 한국오므론전장주식회사 Mcu of embedded system and stack management method for preventing error
JP2009157542A (en) * 2007-12-26 2009-07-16 Nec Electronics Corp Information processing apparatus and method of updating stack pointer
JP2009301259A (en) * 2008-06-12 2009-12-24 Fujitsu Microelectronics Ltd Information processing system, method for detecting occurrence of stack overflow, and program
US8392643B2 (en) 2010-03-05 2013-03-05 Renesas Electronics Corporation Data processing device, semiconductor integrated circuit device, and abnormality detection method
JP2017162135A (en) * 2016-03-09 2017-09-14 三菱電機株式会社 Information processing device, debug system, and stack overflow detection method
CN112783652A (en) * 2021-01-25 2021-05-11 珠海亿智电子科技有限公司 Method, device and equipment for acquiring running state of current task and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007148529A (en) * 2005-11-24 2007-06-14 Nippon Telegr & Teleph Corp <Ntt> Buffer overflow detection device, buffer overflow detection method, and buffer overflow detection program
KR20080036733A (en) * 2006-10-24 2008-04-29 한국오므론전장주식회사 Mcu of embedded system and stack management method for preventing error
JP2009157542A (en) * 2007-12-26 2009-07-16 Nec Electronics Corp Information processing apparatus and method of updating stack pointer
US8234476B2 (en) 2007-12-26 2012-07-31 Renesas Electronics Corporation Information processing apparatus and method of updating stack pointer
JP2009301259A (en) * 2008-06-12 2009-12-24 Fujitsu Microelectronics Ltd Information processing system, method for detecting occurrence of stack overflow, and program
US8392643B2 (en) 2010-03-05 2013-03-05 Renesas Electronics Corporation Data processing device, semiconductor integrated circuit device, and abnormality detection method
JP2017162135A (en) * 2016-03-09 2017-09-14 三菱電機株式会社 Information processing device, debug system, and stack overflow detection method
CN112783652A (en) * 2021-01-25 2021-05-11 珠海亿智电子科技有限公司 Method, device and equipment for acquiring running state of current task and storage medium
CN112783652B (en) * 2021-01-25 2024-03-12 珠海亿智电子科技有限公司 Method, device, equipment and storage medium for acquiring running state of current task

Similar Documents

Publication Publication Date Title
US6292888B1 (en) Register transfer unit for electronic processor
US8176489B2 (en) Use of rollback RCU with read-side modifications to RCU-protected data structures
US20050240701A1 (en) Interrupt control apparatus
US5471620A (en) Data processor with means for separately receiving and processing different types of interrupts
US6865636B1 (en) Multitasking processor system for monitoring interrupt events
JP2000020352A (en) Stack overflow detecting method and stack underflow detecting method
US20060053350A1 (en) Semiconductor circuit device and method of detecting runaway
US20100293314A1 (en) Computer system and method of controlling computer system
JP2004326331A (en) Unauthorized memory access detection method and program of the same
JPH09198258A (en) Task stack overflow detecting circuit
JP3585510B2 (en) Program execution management device and program execution management method
JPH0895798A (en) Data processor
JP2000076081A (en) Task manager and program recording medium
JPH0922369A (en) Illicit operation detection method in kernel of multi-tasking system
US20040268368A1 (en) Methods and apparatus to protect a protocol interface
JP7276755B2 (en) Processing speed matching circuit and microprocessor
US5778207A (en) Assisting operating-system interrupts using application-based processing
JPH06223047A (en) Exclusive control system
JPH11265284A (en) Data processor
JP2003256219A (en) Program execution method in incorporated equipment
JPH06139084A (en) Information processor
JPH01251142A (en) Program trace system
JP3414579B2 (en) Programmable controller
JPH11134202A (en) Task switching device
JPH11316691A (en) Execution method for operating system and information processor using the method