JPH09259004A - Debugging method - Google Patents
Debugging methodInfo
- Publication number
- JPH09259004A JPH09259004A JP8071671A JP7167196A JPH09259004A JP H09259004 A JPH09259004 A JP H09259004A JP 8071671 A JP8071671 A JP 8071671A JP 7167196 A JP7167196 A JP 7167196A JP H09259004 A JPH09259004 A JP H09259004A
- Authority
- JP
- Japan
- Prior art keywords
- control program
- command
- debug
- program
- execution
- 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
Description
【0001】[0001]
【発明の属する技術分野】本発明はデバッグ方法に関
し、特にリモート端末からの操作により装置内の制御プ
ログラムをデバッグするデバッグ方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging method, and more particularly to a debugging method for debugging a control program in a device by operating a remote terminal.
【0002】[0002]
【従来の技術】従来、この種のデバッグ方法は、開発途
中又は開発後に不具合の発生したCPUを組み込んだ装
置内の制御プログラムをデバッグするため、このCPU
の動作をシミュレートするインサーキットエミュレータ
(以後ICEと記述する)をこの装置に設定したり、特
開平02ー186448号公報に開示されているよう
に、デバッグ環境を提供する専用回路を備えた集積回路
と専用ソフトウェアを予めこの装置に組み込み、これら
のICEや専用回路を用いている。このICEや専用回
路を用いた方法は、制御プログラムを停止させてトレー
スポイントを設定し、設定後この制御プログラムを再開
させ、この制御プログラムがトレースポイントの命令を
実行するとこの制御プログラムが停止し、この停止の状
態でデバッグコマンドを実行させ、デバッグコマンドの
実行後、あらためてこの制御プログラムを再開させてい
る。2. Description of the Related Art Conventionally, this type of debugging method is used to debug a control program in a device incorporating a CPU in which a failure has occurred during or after development.
An in-circuit emulator (hereinafter referred to as ICE) for simulating the operation of the device is set in this device, or as disclosed in Japanese Patent Laid-Open No. 02-186448, an integrated circuit having a dedicated circuit for providing a debug environment. A circuit and dedicated software are built in this device in advance, and these ICEs and dedicated circuits are used. The method using this ICE or a dedicated circuit stops the control program, sets a trace point, restarts this control program after setting, and when this control program executes the instruction of the trace point, this control program stops, The debug command is executed in this stopped state, and after the debug command is executed, the control program is restarted again.
【0003】[0003]
【発明が解決しようとする課題】上述した従来のデバッ
グ方法は、制御プログラムを停止させてトレースポイン
トを設定しているので、この設定期間は装置の制御が停
止するため、特にこの装置と他の装置とを連携して稼働
する場合には、この設定期間には他の装置も停止させる
必要があり、自装置の運用が停止するばかりでなく他の
装置の運用も停止するという問題がある。又、デバッグ
コマンドの実行後にこの制御プログラムを再実行させる
ためには、制御プログラムを再開させる操作をあらため
て行う必要があるので、操作者がこの装置を監視しデバ
ッグコマンドの実行の終了を確認する必要があり手間が
掛かると言う問題がある。In the above-described conventional debugging method, the control program is stopped to set the trace point, and therefore the control of the device is stopped during this setting period. When operating in cooperation with the device, it is necessary to stop the other device during this setting period, which causes a problem that not only the operation of the own device but also the operation of the other device is stopped. Also, in order to re-execute this control program after the execution of the debug command, it is necessary to re-execute the operation to restart the control program, so the operator needs to monitor this device and confirm the end of the execution of the debug command. There is a problem that it takes time and effort.
【0004】本発明の目的はこのような従来の欠点を除
去するため、トレースポイントを設定するときに装置の
運用を停止する必要がなく、デバッグコマンドの実行が
終了したときに制御プログラムを再実行させるための操
作を行う必要がないデバッグ方法を提供することにあ
る。The object of the present invention is to eliminate such a drawback of the prior art, so that it is not necessary to stop the operation of the apparatus when setting a trace point, and the control program is re-executed when the execution of the debug command is completed. It is to provide a debugging method that does not require the operation to be performed.
【0005】[0005]
【課題を解決するための手段】本発明のデバッグ方法
は、リモート端末からの操作により装置内の制御プログ
ラムをデバッグするデバッグ方法において、前記制御プ
ログラムを停止させずにデバッグコマンドの設定ができ
るようにしている。The debugging method of the present invention enables a debug command to be set without stopping the control program in a debugging method of debugging a control program in the apparatus by an operation from a remote terminal. ing.
【0006】また、本発明のデバッグ方法の前記デバッ
グコマンドの設定は、前記制御プログラムの実行を中断
させるアドレスをトレースポイントとし、このトレース
ポイントで前記制御プログラムの実行が中断したときに
実行させるデバッグコマンドを複数個指定できるように
している。Further, in the setting of the debug command of the debugging method of the present invention, an address for interrupting the execution of the control program is set as a trace point, and the debug command executed when the execution of the control program is interrupted at the trace point. You can specify more than one.
【0007】また、本発明のデバッグ方法は、リモート
端末からの操作により装置内の制御プログラムをデバッ
グするデバッグ方法において、デバッグコマンドの実行
が終了したとき前記制御プログラムの実行を再開するよ
うにしている。The debugging method of the present invention is a debugging method for debugging a control program in a device by an operation from a remote terminal, wherein the execution of the control program is restarted when the execution of the debug command is completed. .
【0008】また、本発明のデバッグ方法は、前記制御
プログラムの実行により予め制御されている前記装置に
前記リモート端末から前記複数のデバッグコマンドを送
り、この送られた前記複数のデバッグコマンドを前記装
置内に予め格納したデバッグ支援プログラムにより受
け、この受けた前記複数のデバッグコマンドのうちの一
つのデバッグコマンドにより指定されたアドレスをトレ
ースポイントとし、このトレースポイントに予め格納さ
れた前記制御プログラムの命令を読み出し、前記装置内
に予め格納した例外処理プログラムを実行させるための
例外発生命令を前記トレースポイントに設定し、前記読
み出した前記制御プログラムの命令と前記複数のデバッ
グコマンドとを前記装置内の共通領域に格納し、前記制
御プログラムが前記トレースポイントに設定された前記
例外発生命令を実行したときに前記制御プログラムの実
行を中断し、前記例外処理プログラムを実行して、前記
共通領域に格納された前記制御プログラムの命令を読み
出し、この読み出した命令を前記トレースポイントのア
ドレスに格納し、前記共通領域に格納された前記複数の
デバッグコマンドを順次実行してデバッグを行い、前記
複数のデバッグコマンドの実行が終了したときにこの実
行結果と例外処理の終了を示すコマンドとを前記デバッ
グ支援プログラムに通知し、前記デバッグ支援プログラ
ムにより前記実行結果と前記終了を示すコマンドとを受
けてこの実行結果を前記リモート端末に送り、前記中断
中の前記制御プログラムを再実行させ、前記リモート端
末により前記実行結果を受けてこれを表示するようにし
ている。Further, in the debugging method of the present invention, the plurality of debug commands are sent from the remote terminal to the device which is controlled in advance by executing the control program, and the sent plurality of debug commands are sent to the device. Received by a debug support program stored in advance, the address designated by one debug command of the received plurality of debug commands is set as a trace point, and the instruction of the control program stored in advance at this trace point An exception generation instruction for reading and executing an exception processing program stored in advance in the device is set in the trace point, and the read instruction of the control program and the plurality of debug commands are in a common area in the device. And the control program is stored in When the exception generation instruction set at the race point is executed, the execution of the control program is interrupted, the exception processing program is executed, the instruction of the control program stored in the common area is read, and this reading is performed. Stored instructions at the address of the trace point, sequentially execute the plurality of debug commands stored in the common area to perform debugging, and when the execution of the plurality of debug commands ends, the execution result and the exception A command indicating the end of processing is notified to the debug support program, the execution result and the command indicating the end are received by the debug support program, the execution result is sent to the remote terminal, and the control during the interruption is performed. Re-execute the program, receive the execution result by the remote terminal, and execute this It is to Shimesuru so.
【0009】[0009]
【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。Next, embodiments of the present invention will be described with reference to the drawings.
【0010】図3は本発明の実施の形態で使用するシス
テムの一例を示す図であり、このシステムは、端末プロ
グラム5によりデバッグの操作を行う例えばパソコン等
のリモート端末32(以後パソコン32と記載)と、こ
のパソコン32からの操作によりデバッグされる装置3
1とにより構成している。この装置31は、CPU33
と、この装置31を制御する制御プログラム1と,この
制御プログラム1のデバッグを支援するデバッグ支援プ
ログラム2と,複数のデバッグコマンドを連続して実行
する例外処理プログラム3とを予め格納した例えばRO
M等の第1のメモリ34(以後ROM34と記載)と、
この装置31の起動時にROM34から転送された制御
プログラム1と,デバッグ支援プログラム2と,例外処
理プログラム3とを格納しデバッグ支援プログラム2か
ら例外処理プログラム3へデータを伝達するための共通
領域4を有する例えばRAM等の第2のメモリ35(以
後RAM35と記載)と、この装置31の機能を実現す
るための各種デバイス36と、パソコン32と通信する
ためのシリアルIO37(以後SIO37と記載)とに
より構成している。FIG. 3 is a diagram showing an example of a system used in the embodiment of the present invention. This system is a remote terminal 32 such as a personal computer (hereinafter referred to as a personal computer 32) for performing a debugging operation by a terminal program 5. ) And the device 3 debugged by the operation from the personal computer 32
It is composed of 1 and 1. This device 31 includes a CPU 33
A control program 1 for controlling the device 31, a debug support program 2 for assisting debugging of the control program 1, and an exception handling program 3 for continuously executing a plurality of debug commands are stored in advance, for example, RO
A first memory 34 such as M (hereinafter referred to as ROM 34),
A common area 4 for storing the control program 1, the debug support program 2, and the exception handling program 3 transferred from the ROM 34 when the device 31 is activated and transmitting data from the debug support program 2 to the exception handling program 3 is provided. By a second memory 35 such as a RAM (hereinafter referred to as RAM 35), various devices 36 for realizing the function of the device 31, and a serial IO 37 (hereinafter referred to as SIO 37) for communicating with the personal computer 32. I am configuring.
【0011】図1は、本発明のデバッグ方法の一つの実
施の形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the debugging method of the present invention.
【0012】図1に示す本実施の形態のデバッグ方法
は、パソコン32と装置31との電源を投入し、装置3
1内のROM34に予め格納した制御プログラム1と,
デバッグ支援プログラム2と,例外処理プログラム3と
をRAM35に転送し、この制御プログラム1を実行し
てこの装置31の制御を開始する。In the debugging method of the present embodiment shown in FIG. 1, the personal computer 32 and the device 31 are turned on and the device 3 is turned on.
The control program 1 stored in advance in the ROM 34 in
The debug support program 2 and the exception handling program 3 are transferred to the RAM 35, the control program 1 is executed, and the control of the device 31 is started.
【0013】パソコン32は端末プログラム5により、
装置31にこの装置31の制御プログラム1をデバッグ
するための複数のデバッグコマンドを送り(S1)、こ
の装置31は、パソコン32から送られた複数のデバッ
グコマンドをこの装置31内のRAM35に格納したデ
バッグ支援プログラム2により受け、この複数のデバッ
グコマンドのうちの一つのデバッグコマンドにより指定
されたアドレスをトレースポイントとし(S2)、この
トレースポイントに予め格納された制御プログラム1の
命令を読み出し(S3)、装置31内のRAM35に格
納した例外処理プログラム3を実行させるための例外発
生命令をこのトレースポイントに設定し(S4)、前記
読み出した制御プログラム1の命令と前記複数のデバッ
グコマンドとを装置31内の共通領域4に格納する(S
5)。The personal computer 32 uses the terminal program 5 to
A plurality of debug commands for debugging the control program 1 of the device 31 are sent to the device 31 (S1), and the device 31 stores the plurality of debug commands sent from the personal computer 32 in the RAM 35 in the device 31. An address designated by one of the plurality of debug commands received by the debug support program 2 is set as a trace point (S2), and an instruction of the control program 1 stored in advance at this trace point is read (S3). An exception generating instruction for executing the exception processing program 3 stored in the RAM 35 in the device 31 is set at this trace point (S4), and the read instruction of the control program 1 and the plurality of debug commands are set in the device 31. Stored in the common area 4 (S
5).
【0014】トレースポイントに設定した例外発生命令
が制御プログラム1により実行されたとき、この制御プ
ログラム1は実行が中断され前記例外処理プログラム3
が実行を開始する。そして、この例外処理プログラム3
により共通領域4に格納された制御プログラム1の命令
を読み出し(S6)、この読み出した命令を前記トレー
スポイントのアドレスに格納し(S7)、共通領域4に
格納された複数のデバッグコマンドを順次実行してデバ
ッグを行い(S8)、複数のデバッグコマンドの実行が
終了したときにこの実行結果と例外処理の終了を示すコ
マンドとをデバッグ支援プログラム2に通知する(S
9)。When the exception generating instruction set at the trace point is executed by the control program 1, the execution of the control program 1 is interrupted and the exception processing program 3 is executed.
Starts executing. And this exception handling program 3
The instruction of the control program 1 stored in the common area 4 is read by (S6), the read instruction is stored in the address of the trace point (S7), and the plurality of debug commands stored in the common area 4 are sequentially executed. Then, the debug support program 2 is notified of the execution result and the command indicating the end of the exception processing when the execution of the plurality of debug commands is completed (S8) (S8).
9).
【0015】デバッグ支援プログラム2は、前記実行結
果と例外処理の終了を示すコマンドとを受けてこの実行
結果をパソコン32に送る(S10)。The debug support program 2 receives the execution result and the command indicating the end of the exception processing and sends the execution result to the personal computer 32 (S10).
【0016】パソコン32はこの実行結果受けこれを表
示する(S11)。The personal computer 32 receives this execution result and displays it (S11).
【0017】前記ステップS10でパソコン32への実
行結果の転送が終了すると前記中断中の制御プログラム
1が実行を再開する(S12)。When the transfer of the execution result to the personal computer 32 is completed in step S10, the suspended control program 1 resumes execution (S12).
【0018】次に、本実施の形態のデバッグ方法の動作
を図2、図3、図4、図5、図6、図7、および図8を
参照して詳細に説明する。Next, the operation of the debugging method of this embodiment will be described in detail with reference to FIG. 2, FIG. 3, FIG. 4, FIG. 5, FIG. 6, FIG.
【0019】図2は、本発明の実施の形態の動作の一例
を示す流れ図であり、パソコン32内の端末プログラム
5と装置31内の複数のプログラムとが並行して動作す
る様子を示している。FIG. 2 is a flow chart showing an example of the operation of the embodiment of the present invention, showing how the terminal program 5 in the personal computer 32 and a plurality of programs in the device 31 operate in parallel. .
【0020】図4は、デバッグ支援プログラムの動作の
一例を示す流れ図であり、この動作の例は、パソコン3
2又は例外処理プログラム3から送られてくるコマンド
を受信するまでウエイトしコマンドが送られてきたとき
このコマンドを受信し(S41)、受信したコマンドが
デバッグコマンドか否かを調査し(S42)、調査した
結果がデバッグコマンドを示す場合にはこのデバッグコ
マンドを実行するコマンド実行処理プログラムを実行し
(S43)、このコマンド実行処理プログラムの実行終
了後にステップS45へ続き制御を続行する。前記ステ
ップS42で調査した結果がデバッグコマンドを示さな
い場合には、前記受信したコマンドが例外処理プログラ
ム3の実行の終了を示す例外処理終了コマンドか否かを
調査し(S44)、調査した結果が例外処理終了コマン
ドを示す場合は、前記例外処理終了コマンドおよびこの
コマンドと共に受信するデバッグコマンドの実行結果又
はステップS43で実行したコマンド実行処理プログラ
ムでのデバッグコマンドの実行結果をパソコン32に送
信し(S45)、ステップS41へ続き制御を続行す
る。ステップS44で調査した結果が例外処理終了コマ
ンドを示さない場合には前記ステップS41へ続き制御
を続行する。FIG. 4 is a flow chart showing an example of the operation of the debug support program. An example of this operation is the personal computer 3
2 or wait until the command sent from the exception handling program 3 is received, and when this command is sent, this command is received (S41), and it is investigated whether the received command is a debug command (S42), If the result of the examination indicates the debug command, the command execution processing program for executing this debug command is executed (S43), and after the execution of this command execution processing program is completed, control continues to step S45. If the result checked in step S42 does not indicate a debug command, it is checked whether the received command is an exception processing end command indicating the end of execution of the exception processing program 3 (S44), and the checked result is In the case of indicating the exception processing end command, the execution result of the exception processing end command and the debug command received together with this command or the execution result of the debug command in the command execution processing program executed in step S43 is transmitted to the personal computer 32 (S45). ), The control is continued following step S41. If the result of the examination in step S44 does not indicate an exception processing end command, control is continued following step S41.
【0021】図5は、コマンド実行処理プログラムの動
作の一例を示す流れ図であり、この動作の例は、実行す
べきコマンドを識別し(S51)、この識別した結果が
メモリセットコマンドを示す場合はこのコマンドにより
指定されたアドレスにこのコマンドにより指定された命
令や情報等のデータを設定し(S52)、コマンド実行
処理プログラムを終了する。前記ステップS51で識別
した結果がメモリフィルコマンドを示す場合はこのコマ
ンドにより指定されたアドレスからこのコマンドにより
指定されたアドレスまでこのコマンドにより指定された
データを設定し(S53)、コマンド実行処理プログラ
ムを終了する。前記ステップS51で識別した結果がメ
モリダンプコマンドを示す場合はこのコマンドにより指
定されたアドレスに格納してあるデータをパソコン32
に表示するために読み出し(S54)、コマンド実行処
理プログラムを終了する。前記ステップS51で識別し
た結果がメモリムーブコマンドを示す場合はこのコマン
ドにより指定されたアドレスに格納されたデータをこの
コマンドにより指定されたアドレスに格納し(S5
5)、コマンド実行処理プログラムを終了する。前記ス
テップS51で識別した結果がトレースポイント設定コ
マンドを示す場合はトレースポイント設定処理プログラ
ムを実行し(S56)、このトレースポイント設定処理
プログラムの実行終了後にこのコマンド実行処理プログ
ラムを終了する。FIG. 5 is a flow chart showing an example of the operation of the command execution processing program. In this example of operation, a command to be executed is identified (S51), and when the identified result indicates a memory set command. Data such as the instruction and information designated by this command are set in the address designated by this command (S52), and the command execution processing program is terminated. If the result identified in step S51 indicates a memory fill command, the data specified by this command is set from the address specified by this command to the address specified by this command (S53), and the command execution processing program is executed. finish. If the result identified in step S51 indicates a memory dump command, the data stored in the address designated by this command is transferred to the personal computer 32.
(S54), and the command execution processing program ends. If the result identified in step S51 indicates a memory move command, the data stored in the address designated by this command is stored in the address designated by this command (S5
5), the command execution processing program ends. If the result identified in step S51 indicates a trace point setting command, the trace point setting processing program is executed (S56), and after the execution of this trace point setting processing program is completed, this command execution processing program is ended.
【0022】図6は、トレースポイント設定処理プログ
ラムの動作の一例を示す流れ図であり、このプログラム
はコマンド実行処理プログラムがトレースポイント設定
コマンドを識別したときに起動される。このトレースポ
イント設定処理プログラムの動作の例は、制御プログラ
ム1のトレースポイントに予め格納された制御プログラ
ム1の命令を取り出し、この命令を装置31内の共通領
域4に格納して保存し(S61)、装置31内に予め格
納した例外処理プログラム3を実行させるための例外発
生命令を制御プログラム1のトレースポイントに設定し
(S62)、前記トレースポイント設定コマンドの受信
時にこのコマンドに続けてパソコン32から読み込んだ
デバッグコマンドを、これらのコマンド内から終了コマ
ンドを検出するまでパソコン32から読み込んだ順に共
通領域4に格納する。FIG. 6 is a flow chart showing an example of the operation of the trace point setting processing program. This program is started when the command execution processing program identifies the trace point setting command. As an example of the operation of the trace point setting processing program, the instruction of the control program 1 stored in advance at the trace point of the control program 1 is taken out, and this instruction is stored and saved in the common area 4 in the device 31 (S61). An exception generation instruction for executing the exception processing program 3 stored in advance in the device 31 is set to a trace point of the control program 1 (S62), and when the trace point setting command is received, the command is sent from the personal computer 32 following this command. The read debug commands are stored in the common area 4 in the order in which they are read from the personal computer 32 until the end command is detected from these commands.
【0023】すなわち、トレースポイント設定コマンド
に続けてパソコン32から読み込んだデバッグコマンド
を調べ(S63)、この調べた結果がメモリセットコマ
ンドを示す場合はメモリセットコマンドを共通領域4に
設定し(S64)、前記ステップS63へ続き制御を続
行する。前記ステップS63で調べた結果がメモリフィ
ルコマンドを示す場合はメモリフィルコマンドを共通領
域4に設定し(S65)、前記ステップS63へ続き制
御を続行する。前記ステップS63で調べた結果がメモ
リダンプコマンドを示す場合はメモリダンプコマンドを
共通領域4に設定し(S66)、前記ステップS63へ
続き制御を続行する。前記ステップS63で調べた結果
がメモリムーブコマンドを示す場合はメモリムーブコマ
ンドを共通領域4に設定し(S67)、前記ステップS
63へ続き制御を続行する。前記ステップS63で識別
した結果が終了コマンドを示す場合は終了コマンドを共
通領域4に設定し(S68)、トレースポイント設定処
理プログラムを終了する。That is, the debug command read from the personal computer 32 after the trace point setting command is checked (S63), and if the checked result indicates a memory set command, the memory set command is set in the common area 4 (S64). The control is continued following step S63. If the result checked in step S63 indicates a memory fill command, the memory fill command is set in the common area 4 (S65), and control is continued following step S63. If the result checked in step S63 indicates a memory dump command, the memory dump command is set in the common area 4 (S66), and control is continued following step S63. If the result checked in step S63 indicates a memory move command, the memory move command is set in the common area 4 (S67), and the step S67 is executed.
Control is continued following 63. When the result identified in step S63 indicates an end command, the end command is set in the common area 4 (S68), and the trace point setting processing program is ended.
【0024】図7は、共通領域の構造の一例を示す図で
あり、共通領域4に制御プログラム1のトレースポイン
トの命令とメモリセット,メモリダンプ,終了等の複数
のデバッグコマンドとが格納されていることを示してい
る。FIG. 7 is a diagram showing an example of the structure of the common area. In the common area 4, the instruction of the trace point of the control program 1 and a plurality of debug commands such as memory set, memory dump, and end are stored. It indicates that
【0025】図8は、例外処理プログラムの動作の一例
を示す流れ図であり、このプログラムは制御プログラム
1がトレースポイントに設定された例外発生命令を実行
したときに起動される。この例外処理プログラム3の動
作の例は、共通領域4に格納して保存されているこのト
レースポイントの制御プログラム1の命令を読み出しこ
のトレースポイントに設定し(S81)、共通領域4に
格納してある複数のデバッグコマンドを終了コマンドが
検出されるまで格納順に読み出し、デバッグコマンドの
機能に従ってデバッグする。FIG. 8 is a flow chart showing an example of the operation of the exception handling program, which is started when the control program 1 executes the exception generating instruction set at the trace point. As an example of the operation of the exception processing program 3, the instruction of the control program 1 of this trace point stored and saved in the common area 4 is read and set to this trace point (S81) and stored in the common area 4. A certain plurality of debug commands are read in the storage order until the end command is detected, and debugging is performed according to the function of the debug command.
【0026】すなわち、共通領域4から読み出したデバ
ッグコマンドを調べ(S82)、この調べた結果がメモ
リセットコマンドを示す場合はこのコマンドにより指定
されたアドレスにこのコマンドにより指定された命令や
情報等のデータを設定し(S83)、前記ステップS8
2へ続き制御を続行する。前記ステップS82で調べた
結果がメモリフィルコマンドを示す場合はこのコマンド
により指定されたアドレスからこのコマンドにより指定
されたアドレスまでこのコマンドにより指定されたデー
タを設定し(S84)、前記ステップS82へ続き制御
を続行する。前記ステップS82で調べた結果がメモリ
ダンプコマンドを示す場合はこのコマンドにより指定さ
れたアドレスに格納してあるデータをパソコン32に表
示するために読み出し(S85)、前記ステップS82
へ続き制御を続行する。前記ステップS82で調べた結
果がメモリムーブコマンドを示す場合はこのコマンドに
より指定されたアドレスに格納されたデータをこのコマ
ンドにより指定されたアドレスに格納し(S86)、前
記ステップS82へ続き制御を続行する。前記ステップ
S82で識別した結果が終了コマンドを示す場合は例外
処理終了コマンドと前記デバッグコマンドの実行結果と
をデバッグ支援プログラム2に通知し(S87)、例外
処理プログラム3を終了する。That is, the debug command read from the common area 4 is checked (S82), and if the check result indicates a memory set command, the command, information, etc. specified by this command is stored at the address specified by this command. Data is set (S83), and the step S8 is performed.
Continue to 2 and continue control. If the result checked in step S82 indicates a memory fill command, the data specified by this command is set from the address specified by this command to the address specified by this command (S84), and the process continues to step S82. Continue control. If the result checked in step S82 indicates a memory dump command, the data stored at the address designated by this command is read out for displaying on the personal computer 32 (S85), and the step S82 is executed.
Continue to control. If the result checked in step S82 indicates a memory move command, the data stored in the address designated by this command is stored in the address designated by this command (S86), and control is continued following step S82. To do. If the result identified in step S82 indicates an end command, the exception processing end command and the execution result of the debug command are notified to the debug support program 2 (S87), and the exception processing program 3 ends.
【0027】図2において、パソコン32と装置31と
の電源を投入すると、装置31内のROM34に予め格
納した制御プログラム1と,デバッグ支援プログラム2
と,例外処理プログラム3とがRAM35に転送され、
この転送された制御プログラム1が実行されこの装置3
1の制御が開始される(S21)。In FIG. 2, when the personal computer 32 and the device 31 are turned on, the control program 1 and the debug support program 2 stored in advance in the ROM 34 in the device 31.
And the exception handling program 3 are transferred to the RAM 35,
This transferred control program 1 is executed and this device 3
The control of 1 is started (S21).
【0028】パソコン32は端末プログラム5により、
装置31にこの装置31の制御プログラム1をデバッグ
するための例えばトレースポイント設定コマンド以外の
デバッグコマンドを送る(S22)。The personal computer 32 uses the terminal program 5 to
For example, a debug command other than the trace point setting command for debugging the control program 1 of the device 31 is sent to the device 31 (S22).
【0029】この装置31の制御プログラム1は実行を
中断し、デバッグ支援プログラム2により、図4および
図5に示すように、パソコン32から送られたデバッグ
コマンドを受信し、このデバッグコマンドの種類を識別
して実行しデバッグコマンドの実行結果をパソコン32
に送る(S23)。The control program 1 of this device 31 suspends execution, and the debug support program 2 receives the debug command sent from the personal computer 32 as shown in FIGS. 4 and 5, and determines the type of this debug command. The PC 32 identifies and executes the debug command execution result.
To (S23).
【0030】パソコン32はこの結果を受けて表示し
(S24)、制御プログラム1は制御を再開する(S2
5)。The personal computer 32 receives the result and displays it (S24), and the control program 1 restarts the control (S2).
5).
【0031】次に、例えばトレースポイント設定コマン
ドとこのコマンド以外の複数のデバッグコマンドとをパ
ソコン32から送ると(S26)、この装置31の制御
プログラム1は実行を中断し、デバッグ支援プログラム
2により図4に示すように、パソコン32から送られた
デバッグコマンドを受け、図5で示すように、このデバ
ッグコマンドの種類を識別しトレースポイント設定処理
プログラムを起動し図6で示すように、トレースポイン
トの制御プログラム1の命令を共通領域4に格納して保
存しこのトレースポイントに例外発生命令を設定し、ト
レースポイント設定コマンドに続く複数のデバッグコマ
ンドを共通領域4に順次格納する(S27)。Next, for example, when a trace point setting command and a plurality of debug commands other than this command are sent from the personal computer 32 (S26), the control program 1 of this device 31 suspends execution and the debug support program 2 causes 4, the debug command sent from the personal computer 32 is received, and as shown in FIG. 5, the type of the debug command is identified, the trace point setting processing program is started, and as shown in FIG. The instruction of the control program 1 is stored and saved in the common area 4, an exception generation instruction is set at this trace point, and a plurality of debug commands following the trace point setting command are sequentially stored in the common area 4 (S27).
【0032】デバッグコマンドの共通領域4への格納が
終了すると、制御プログラム1は制御を再開し、前記ス
テップS27で設定したトレースポイントの例外発生命
令を実行すると、この制御プログラム1は制御を中断
し、例外処理プログラム3が起動する(S28)。When the storage of the debug command in the common area 4 is completed, the control program 1 resumes the control, and when the exception generating instruction of the trace point set in step S27 is executed, the control program 1 suspends the control. The exception handling program 3 is activated (S28).
【0033】起動した例外処理プログラム3は図8で示
すように、共通領域4に格納して保存したトレースポイ
ントの制御プログラム1の命令をこのトレースポイント
に設定し、共通領域4に格納された複数のデバッグコマ
ンドを終了コマンドを検出するまで格納順に実行し、例
外処理終了コマンドとデバッグコマンド実行結果とをデ
バッグ支援プログラム2に通知する(S29)。As shown in FIG. 8, the started exception handling program 3 sets the instruction of the control program 1 of the trace point stored and saved in the common area 4 to this trace point, and stores a plurality of instructions stored in the common area 4. Are executed in the storage order until the end command is detected, and the exception processing end command and the debug command execution result are notified to the debug support program 2 (S29).
【0034】デバッグ支援プログラム2は、図4に示す
ように、この例外処理終了コマンドとデバッグコマンド
の実行結果とを受けて、この実行結果をパソコン32に
送る(S30)。As shown in FIG. 4, the debug support program 2 receives the exception processing end command and the execution result of the debug command, and sends the execution result to the personal computer 32 (S30).
【0035】パソコン32は前記実行結果受けこれを表
示する(S31)。The personal computer 32 receives the execution result and displays it (S31).
【0036】前記ステップS30のパソコン32への実
行結果の転送が終了すると前記中断中の制御プログラム
1が実行を再開する(S32)、以上の説明では、デバ
ッグコマンドを、トレースポイント設定コマンドやメモ
リセットコマンド等の基本的な数種類のコマンドに限定
して記述したが、これらのコマンドにこだわる必要はな
い。又、デバッグコマンドの機能はその一例を記述した
ものでありこの機能にこだわる必要はない。さらに、ト
レースポイントが一つの場合について記述したが、複数
のトレースポイントの場合も同様である。When the transfer of the execution result to the personal computer 32 in step S30 is completed, the suspended control program 1 resumes execution (S32). In the above description, the debug command is changed to the trace point setting command or the memory set. Although the description has been limited to a few basic commands such as commands, it is not necessary to stick to these commands. Also, the function of the debug command is an example of the description, and it is not necessary to stick to this function. Furthermore, the case where there is one trace point has been described, but the same applies to the case where there are multiple trace points.
【0037】[0037]
【発明の効果】以上説明したように、本発明のデバッグ
方法によれば、制御プログラム1を停止させずにデバッ
グコマンドの設定ができるので、この設定期間に自装置
31や他の装置31の運用を停止さる必要がない。As described above, according to the debugging method of the present invention, it is possible to set the debug command without stopping the control program 1. Therefore, the operation of the own device 31 and the other device 31 during this setting period. You don't have to stop.
【0038】又、デバッグコマンドの実行が終了したと
き制御プログラム1の実行を再開するようにしたので、
制御プログラム1を再開させる操作をあらためて行う必
要がないため、操作者がこの装置31を監視しデバッグ
コマンドの実行の終了を確認する手間が掛からない。Further, since the execution of the control program 1 is restarted when the execution of the debug command is completed,
Since it is not necessary to newly perform the operation of resuming the control program 1, the operator does not need to monitor the device 31 and confirm the end of execution of the debug command.
【0039】さらに、トレースポイントで実行させるデ
バッグコマンドを複数個指定できるようにしたので、デ
バッグ対象プログラムの任意のアドレスで複数のデバッ
グ処理を連続して行えるため、必要なデバッグ情報を短
時間で得ることができる。Further, since a plurality of debug commands to be executed at the trace points can be specified, a plurality of debug processes can be continuously performed at any address of the program to be debugged, so that necessary debug information can be obtained in a short time. be able to.
【図1】本発明のデバッグ方法の一つの実施の形態を示
すブロック図である。FIG. 1 is a block diagram showing an embodiment of a debugging method of the present invention.
【図2】本発明の実施の形態の動作の一例を示す流れ図
である。FIG. 2 is a flowchart illustrating an example of an operation according to the exemplary embodiment of the present invention.
【図3】本発明の実施の形態で使用するシステムの一例
を示す図である。FIG. 3 is a diagram showing an example of a system used in the embodiment of the present invention.
【図4】デバッグ支援プログラムの動作の一例を示す流
れ図である。FIG. 4 is a flowchart showing an example of the operation of a debug support program.
【図5】コマンド実行処理プログラムの動作の一例を示
す流れ図である。FIG. 5 is a flowchart showing an example of operation of a command execution processing program.
【図6】トレースポイント設定処理プログラムの動作の
一例を示す流れ図である。FIG. 6 is a flowchart showing an example of the operation of a trace point setting processing program.
【図7】共通領域の構造の一例を示す図である。FIG. 7 is a diagram showing an example of a structure of a common area.
【図8】例外処理プログラムの動作の一例を示す流れ図
である。FIG. 8 is a flowchart showing an example of the operation of the exception handling program.
1 制御プログラム 2 デバッグ支援プログラム 3 例外処理プログラム 4 共通領域 5 端末プログラム 31 装置 32 リモート端末(パソコン) 33 CPU 34 第1のメモリ(ROM) 35 第2のメモリ(RAM) 36 各種デバイス 37 シリアルIO(SIO) 1 Control Program 2 Debug Support Program 3 Exception Handling Program 4 Common Area 5 Terminal Program 31 Device 32 Remote Terminal (Personal Computer) 33 CPU 34 First Memory (ROM) 35 Second Memory (RAM) 36 Various Devices 37 Serial IO ( SIO)
Claims (4)
制御プログラムをデバッグするデバッグ方法において、 前記制御プログラムを停止させずにデバッグコマンドの
設定ができるようにしたことを特徴とするデバッグ方
法。1. A debugging method for debugging a control program in a device by an operation from a remote terminal, wherein a debug command can be set without stopping the control program.
御プログラムの実行を中断させるアドレスをトレースポ
イントとし、このトレースポイントで前記制御プログラ
ムの実行が中断したときに実行させるデバッグコマンド
を複数個指定できるようにしたことを特徴とする請求項
1記載のデバッグ方法。2. The setting of the debug command uses an address for interrupting the execution of the control program as a trace point, and at this trace point, a plurality of debug commands to be executed when the execution of the control program is interrupted can be specified. The debugging method according to claim 1, wherein:
制御プログラムをデバッグするデバッグ方法において、 デバッグコマンドの実行が終了したとき前記制御プログ
ラムの実行を再開するようにしたことを特徴とするデバ
ッグ方法。3. A debugging method for debugging a control program in a device by an operation from a remote terminal, wherein the execution of the control program is restarted when the execution of a debug command is completed.
御されている前記装置に前記リモート端末から前記複数
のデバッグコマンドを送り、 この送られた前記複数のデバッグコマンドを前記装置内
に予め格納したデバッグ支援プログラムにより受け、こ
の受けた前記複数のデバッグコマンドのうちの一つのデ
バッグコマンドにより指定されたアドレスをトレースポ
イントとし、このトレースポイントに予め格納された前
記制御プログラムの命令を読み出し、前記装置内に予め
格納した例外処理プログラムを実行させるための例外発
生命令を前記トレースポイントに設定し、前記読み出し
た前記制御プログラムの命令と前記複数のデバッグコマ
ンドとを前記装置内の共通領域に格納し、 前記制御プログラムが前記トレースポイントに設定され
た前記例外発生命令を実行したときに前記制御プログラ
ムの実行を中断し、前記例外処理プログラムを実行し
て、前記共通領域に格納された前記制御プログラムの命
令を読み出し、この読み出した命令を前記トレースポイ
ントのアドレスに格納し、前記共通領域に格納された前
記複数のデバッグコマンドを順次実行してデバッグを行
い、前記複数のデバッグコマンドの実行が終了したとき
にこの実行結果と例外処理の終了を示すコマンドとを前
記デバッグ支援プログラムに通知し、 前記デバッグ支援プログラムにより前記実行結果と前記
終了を示すコマンドとを受けてこの実行結果を前記リモ
ート端末に送り、 前記中断中の前記制御プログラムを再実行させ、 前記リモート端末により前記実行結果を受けてこれを表
示するようにしたことを特徴とする請求項1、2又は3
記載のデバッグ方法。4. Debugging support in which the plurality of debug commands are sent from the remote terminal to the device that is controlled in advance by executing the control program, and the sent plurality of debug commands are stored in the device in advance. The address specified by one of the plurality of debug commands received by the program is used as a trace point, the instruction of the control program stored in advance at the trace point is read, and the address is previously stored in the device. An exception generation instruction for executing the stored exception handling program is set at the trace point, the read instruction of the control program and the plurality of debug commands are stored in a common area in the device, and the control program Was set to the trace point The execution of the control program is interrupted when the exception generating instruction is executed, the exception processing program is executed, the instruction of the control program stored in the common area is read, and the read instruction is used as the trace point. A command indicating the execution result and the end of exception processing when the execution of the plurality of debug commands is completed by executing the plurality of debug commands stored in the common area and sequentially executing the plurality of debug commands. To the debug support program, receives the execution result and a command indicating the end by the debug support program, sends the execution result to the remote terminal, and re-executes the control program that is suspended, The feature is that the remote terminal receives the execution result and displays it. Claim to 1, 2 or 3
Debug method described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8071671A JPH09259004A (en) | 1996-03-27 | 1996-03-27 | Debugging method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8071671A JPH09259004A (en) | 1996-03-27 | 1996-03-27 | Debugging method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH09259004A true JPH09259004A (en) | 1997-10-03 |
Family
ID=13467296
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8071671A Pending JPH09259004A (en) | 1996-03-27 | 1996-03-27 | Debugging method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH09259004A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000076094A (en) * | 1998-09-03 | 2000-03-14 | Ricoh Co Ltd | Simulator |
JP2002534736A (en) * | 1999-01-04 | 2002-10-15 | イーエムシー コーポレイション | Apparatus and method for online debugging and tracking |
JP2008033849A (en) * | 2006-08-01 | 2008-02-14 | Hitachi Ltd | Fault analysis system |
JP2016528650A (en) * | 2013-08-22 | 2016-09-15 | オラクル・インターナショナル・コーポレイション | Cloud-based target debugging |
-
1996
- 1996-03-27 JP JP8071671A patent/JPH09259004A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000076094A (en) * | 1998-09-03 | 2000-03-14 | Ricoh Co Ltd | Simulator |
JP2002534736A (en) * | 1999-01-04 | 2002-10-15 | イーエムシー コーポレイション | Apparatus and method for online debugging and tracking |
JP2008033849A (en) * | 2006-08-01 | 2008-02-14 | Hitachi Ltd | Fault analysis system |
JP2016528650A (en) * | 2013-08-22 | 2016-09-15 | オラクル・インターナショナル・コーポレイション | Cloud-based target debugging |
JP2020024717A (en) * | 2013-08-22 | 2020-02-13 | オラクル・インターナショナル・コーポレイション | Targeted cloud-based debugging |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH09259004A (en) | Debugging method | |
JP2004302731A (en) | Information processor and method for trouble diagnosis | |
JPH0934518A (en) | Control processor | |
JP2007304972A (en) | Microprocessor system | |
JP2002014709A (en) | Robot controller | |
KR100988669B1 (en) | Program processing unit and program processing method | |
JPH0410081B2 (en) | ||
US20090222633A1 (en) | Information processing system and information processing method capable of performing detailed state notification even in a difficult situation | |
JP6823027B2 (en) | Numerical control device | |
JP2584903B2 (en) | External device control method | |
JP3449812B2 (en) | Control electronics | |
JPH0581065A (en) | Self diagnostic method for programmable controller system | |
JPS5839338B2 (en) | Maintenance panel control method | |
KR101487558B1 (en) | How to save power on your computer and computer | |
JPH01232446A (en) | Computer program development support device | |
JPS62194549A (en) | Cpu-io parallel working simulation system | |
JP3126473B2 (en) | How to set up a computer system | |
JPS6242254A (en) | Channel initialization method | |
JPH02242301A (en) | Process control system having monitor function | |
JPS63109545A (en) | Self-diagnostic system for hardware | |
JPH0227689B2 (en) | ||
JPH02122335A (en) | RAS circuit test method | |
JPS63205758A (en) | Logical simulation device | |
JPH0772874B2 (en) | Interrupt receiving device | |
JPH0934514A (en) | Multitask control system for programmable controller and multitask type programmable controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19981020 |