JPH05313941A - Computer program debugging method - Google Patents

Computer program debugging method

Info

Publication number
JPH05313941A
JPH05313941A JP4116461A JP11646192A JPH05313941A JP H05313941 A JPH05313941 A JP H05313941A JP 4116461 A JP4116461 A JP 4116461A JP 11646192 A JP11646192 A JP 11646192A JP H05313941 A JPH05313941 A JP H05313941A
Authority
JP
Japan
Prior art keywords
debug
program
debugging
application program
monitor
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
JP4116461A
Other languages
Japanese (ja)
Inventor
Takao Shimada
隆夫 島田
Masami Ogino
正実 荻野
Takao Hagiwara
隆生 萩原
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP4116461A priority Critical patent/JPH05313941A/en
Publication of JPH05313941A publication Critical patent/JPH05313941A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize the function of a source level debugger in an on-line way. CONSTITUTION:An example using a monitor device 10 and three tasks 20, 30 and 40 is shown as follows. That is, the device 10 is provided with a display part 11 and a window function which displays the executing contents of an application program and inputs the commands. The tasks 20-40 serve as the test subject programs and consist of the user coding parts 21, 31 and 41 and the debugging support parts 22, 32 and 42. The parts 22-42 are separated from a conventional source level debugger and connected to the remaining debugging monitor part via a communication circuit. The debugging monitor part belongs to the device 10 and functions as a man-machine interface. Only the parts 21-41 usually start when the instructions are inputted to a specific task through the input window of the part 11 for the tracing, the display of a variable, etc.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ユーザが作成したアプ
リケーションプログラムのデバッグ方法に関し、特に、
ソースレベルデバッガを用いて行うデバッグ方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of debugging an application program created by a user, and in particular,
The present invention relates to a debugging method using a source level debugger.

【0002】[0002]

【従来の技術】近年、コンピュータプログラムの生産性
が重要視され、種々のソフトウェアツールやユーティリ
ティソフトが提供されている。デバッグの分野において
も、シンボリックデバッガやソースレベルデバッガ等の
優れたデバッグ支援プログラムが考案されている。
2. Description of the Related Art In recent years, the productivity of computer programs has been emphasized, and various software tools and utility software have been provided. Also in the field of debugging, excellent debug support programs such as symbolic debuggers and source level debuggers have been devised.

【0003】これらデバッグ支援プログラムは、一般
に、ユーザが作成したアプリケーションプログラムの実
機デバッグを、コンピュータ装置のタスク管理を行うデ
バッグサポート部とマンマシンインターフェースたるデ
バッグモニタ部とで一体に構成される。
[0003] Generally, these debug support programs are integrally configured by a debug support unit for managing a task of a computer and a debug monitor unit as a man-machine interface for actual machine debugging of an application program created by a user.

【0004】これら支援プログラムのうち、ソースレベ
ルデバッガは現在最も広く使用されており、機械語レベ
ルや高級言語レベルで一行毎に実行したり、希望する箇
所でアプリケーションプログラムの実行を止めながら動
作を確認できるので、初期段階でのプログラム試験には
大いに有用なものとなっている。このソースレベルデバ
ッガの最大の利点としては、アプリケーションプログラ
ムにデバッグコードを埋め込む作業が不要になることが
挙げられる。
Of these support programs, the source-level debugger is most widely used at present, and is executed line by line at the machine language level or high-level language level, or the operation is checked while stopping the execution of the application program at a desired position. This makes it very useful for early program testing. The greatest advantage of this source-level debugger is that it eliminates the need to embed debug code in application programs.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、ソース
レベルデバッガをプログラム試験の最終段階やその保守
段階で使用する場合には問題が多い。
However, there are many problems when the source level debugger is used at the final stage of the program test or its maintenance stage.

【0006】つまり、このツールは実行中のアプリケー
ションプログラムを止めないと解析できないので、タイ
ミング関連の不具合や長時間連続運転により初めて発生
する不具合を解析、修正することが極めて困難となる。
また、保守段階では、システム運用中に簡単にプログラ
ムを止めることができない欠点もある。
In other words, this tool cannot be analyzed unless the application program being executed is stopped, so that it becomes extremely difficult to analyze and correct a timing-related defect or a defect that occurs for the first time due to long-term continuous operation.
In addition, at the maintenance stage, there is a drawback that the program cannot be easily stopped during system operation.

【0007】そこで、オンラインライン状態でアプリケ
ーションプログラムの動作を監視したり、変数の内容を
観察、変更する手段が必要となるが、従来は、以下の理
由によりその実現が困難であった。
Therefore, a means for observing the operation of the application program in the online line state and observing and changing the contents of the variables is required, but conventionally, it was difficult to realize it for the following reasons.

【0008】(1)アプリケーションプログラム自身にデ
バッグコードを埋め込めば、実行を止めずに当該プログ
ラムの監視が可能になることは周知であるが、そうする
と当該プログラムの振る舞いが変化する場合がある。ま
た、何よりも面倒な作業を伴う欠点がある。
(1) It is well known that if a debug code is embedded in the application program itself, it becomes possible to monitor the program without stopping the execution, but if this happens, the behavior of the program may change. Moreover, there is a drawback in that the work is more troublesome than anything else.

【0009】(2)メインメモリの内容をダンプしたり、
OS(Operating System)の管理情報を解析すること
で、アプリケーションプログラムを止めずにある程度の
監視情報が得られるが、専門知識を必要とし、一般的な
手段とはいえない。
(2) Dump the contents of the main memory,
By analyzing the management information of the OS (Operating System), some monitoring information can be obtained without stopping the application program, but it requires specialized knowledge and is not a general method.

【0010】本発明は、かかる背景のもとになされたも
ので、その目的とするところは、アプリケーションプロ
グラムへの特別な仕掛けを必要とせずにその動作状態の
監視や変数の表示観察、変更をオンラインで行い得る方
法を提供することにある。
The present invention has been made under such a background, and its purpose is to monitor the operating state, display observation and change of variables without requiring any special mechanism for the application program. It is about providing a method that can be done online.

【0011】[0011]

【課題を解決するための手段】本発明は、上記目的を達
成するため、ユーザが作成したアプリケーションプログ
ラムの実機デバッグを、コンピュータ装置のタスク管理
を行うデバッグサポート部とマンマシンインターフェー
スたるデバッグモニタ部とで構成される非オンライン型
のデバッグ支援プログラムを用いて行う方法において、
前記デバッグ支援プログラムからデバッグサポート部と
デバッグモニタ部とを分離して、デバッグモニタ部から
のプログラム割込指令を契機に実行中のアプリケーショ
ンプログラムへデバッグサポート部を付加し、このデバ
ッグサポート部にて当該アプリケーションプログラムの
オンラインデバッグを実行するとともに、実行後は抽出
した監視情報を前記デバッグモニタ部に転送するように
した。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention comprises a debug support unit for performing actual machine debugging of an application program created by a user and a debug monitor unit for man-machine interface management. In the method of using a non-online type debug support program consisting of
The debug support unit and the debug monitor unit are separated from the debug support program, and the debug support unit is added to the application program being executed upon the program interrupt command from the debug monitor unit. Online debugging of the application program is executed, and after execution, the extracted monitoring information is transferred to the debug monitor unit.

【0012】[0012]

【作用】従来のこの種デバッグ支援プログラムは、デバ
ッグサポート部とデバッグモニタ部とが一体となってい
るので、デバッグサポート部を実行する際には必然的に
デバッグモニタ部を止め、アプリケーションプログラム
の実行を停止する必要があった。また、アプリケーショ
ンプログラム側では現在のモードがデバッグモードか否
かを常時チェックする必要があった。そこで、両者を分
離独立のものとし、プログラム割込指令を契機にアプリ
ケーションプログラムにデバッグサポート部を付加して
多重実行するようにした。デバッグサポート部で抽出し
た監視情報はデバッグモニタ部に転送されることで、従
来のデバッグ支援プログラムの機能が踏襲され、オンラ
イン状態でのデバッグが実現される。
In the conventional debug support program of this type, the debug support unit and the debug monitor unit are integrated. Therefore, when the debug support unit is executed, the debug monitor unit is necessarily stopped and the application program is executed. Had to stop. Further, it is necessary for the application program side to constantly check whether or not the current mode is the debug mode. Therefore, the two are separated and independent, and triggered by the program interrupt command, a debug support unit is added to the application program so that multiple execution is performed. The monitoring information extracted by the debug support unit is transferred to the debug monitor unit, so that the function of the conventional debug support program is followed and the debugging in the online state is realized.

【0013】[0013]

【実施例】以下、図面を参照して本発明の一実施例を説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0014】図1は本発明の一実施例に係るデバッグ方
法の概念図であり、一つのモニタ装置10と三つのタス
ク20,30,40の場合の例を示している。モニタ装
置10は、表示部(ディスプレィ)11を具備し、且
つ、アプリケーションプログラムの実行内容の表示とコ
マンド入力のためのウインドウ機能を有している。この
ウインドウ機能はプログラム状態や制御入力情報を視覚
的に表示した周知の技術であり、OSレベルで実現して
も良く、あるいはアプリケーションプログラムを用いて
実現しても良い。
FIG. 1 is a conceptual diagram of a debugging method according to an embodiment of the present invention, and shows an example in the case of one monitor device 10 and three tasks 20, 30, 40. The monitor device 10 includes a display unit (display) 11 and has a window function for displaying execution contents of an application program and command input. This window function is a well-known technique of visually displaying the program state and control input information, and may be realized at the OS level or by using an application program.

【0015】また、各タスク20〜40は試験対象プロ
グラムであり、夫々、ユーザコーディング部(アプリケ
ーションプログラム)21,31,41と後述の割込指
令を契機に付加されるデバッグサポート部22,32,
42とから成る。これらデバッグサポート部22〜42
は、従来のソースレベルデバッガから分離して取り出し
たもので、残部のデバッグモニタ部との間は通信回線に
て接続される。また、デバッグモニタ部はモニタ装置1
0側に置かれてマンマシンインターフェースとして機能
する。
Further, each of the tasks 20 to 40 is a program to be tested, and a user coding unit (application program) 21, 31, 41 and a debug support unit 22, 32, which is added in response to an interrupt command described later, respectively.
And 42. These debug support units 22 to 42
Is taken out separately from the conventional source level debugger, and is connected to the rest of the debug monitor by a communication line. Further, the debug monitor unit is the monitor device 1.
It is placed on the 0 side and functions as a man-machine interface.

【0016】各タスク20〜40は、通常は、ユーザコ
ーディング部21〜41のみが走行しており、例えばB
ASICシステムの場合においては、図2(a)に示す
ように、BASICスーパバイザによって当該ユーザコ
ーディング部21〜41が夫々1行毎に実行されてい
る。
In each of the tasks 20 to 40, normally only the user coding units 21 to 41 are running, for example, B
In the case of the ASIC system, as shown in FIG. 2A, the user coding units 21 to 41 are executed by the BASIC supervisor row by row.

【0017】ここで、表示部11の入力ウインドウか
ら、特定タスクに、トレース、変数の表示、変数値の変
更等の指示を入力すると、デバッグモニタ部が起動し、
モニタ装置10から該当タスクにプログラム割込指令が
出される。
When an instruction for tracing, displaying variables, changing variable values, or the like is input to the specific task from the input window of the display unit 11, the debug monitor unit is activated,
The monitor 10 issues a program interrupt command to the corresponding task.

【0018】このプログラム割込指令を契機として、図
2(b)に示すように、BASICスーパバイザがコー
ド毎にデバッグサポート部として書き換えられる。これ
により当該タスクの制御がデバッグサポート部に移り、
ユーザコーディング部が1行毎に実行される。このと
き、デバッグサポート部は、実行中のユーザコーディン
グ部との間で時分割式に以下の情報の授受を行う。
With this program interrupt command as a trigger, as shown in FIG. 2B, the BASIC supervisor is rewritten as a debug support unit for each code. This transfers control of the task to the debug support section,
The user coding unit is executed line by line. At this time, the debug support unit exchanges the following information with the running user coding unit in a time division manner.

【0019】・実行/停止情報 ・シングルステップ実行情報 ・継続実行情報 ・トレースポイントの設定情報 ・ブレークポイントの設定情報 ・ブレーク条件(ウオッチ)の設定情報 ・変数の表示情報 ・変数値の変更情報 ・ローカル変数のスコープの変更情報 ・トレース速度の変更情報 ここで、ブレークポイントとは、ユーザコーディング部
実行中における変数の値を調べるために実行を一時中断
する箇所を表し、トレースポイントとは、実行中のユー
ザコーディング部の追跡監視箇所を表す。
-Execution / Stop information-Single step execution information-Continuous execution information-Tracepoint setting information-Breakpoint setting information-Break condition (watch) setting information-Variable display information-Variable value change information- Local variable scope change information-Trace speed change information Here, a breakpoint is a point at which execution is suspended to check the value of a variable during execution of the user coding section, and a tracepoint is during execution. Represents the tracking and monitoring point of the user coding unit of.

【0020】図3はデバッグサポート部に制御が移行し
た後の処理手順を表すフローチャートであり、トレース
要求があるときは、まずこれを実行し(ステップ10
0)、ブレーク要求があるときはブレーク処理、即ち当
該プログラムの実行を停止する(ステップ101)。そし
て、上記その他の処理要求があればこれら処理を実行し
(ステップ102)、アプリケーションプログラムの制御
を終える。
FIG. 3 is a flow chart showing the processing procedure after control is transferred to the debug support section. When a trace request is made, this is first executed (step 10).
0) If there is a break request, break processing, that is, execution of the program is stopped (step 101). Then, if there is a request for processing other than the above, these processings are executed (step 102) and the control of the application program ends.

【0021】このデバッグサポート部で抽出したユーザ
コーディング部の監視情報は、通信回線を介してデバッ
グモニタ部に渡される。情報を受け取ったデバッグモニ
タ部はこれら情報を表示部11のウインドウに表示す
る。これにより、操作者がユーザコーディング部の内容
を視覚的に観察することができる。
The monitoring information of the user coding unit extracted by the debug support unit is passed to the debug monitor unit via the communication line. The debug monitor unit that has received the information displays the information in the window of the display unit 11. This allows the operator to visually observe the contents of the user coding unit.

【0022】[0022]

【発明の効果】以上説明したように、従来のソースレベ
ルデバッガ等のデバッグ支援プログラムでは、デバッグ
サポート部とデバッグモニタ部とが一体になっていたた
め、デバッグを実行するときは必然的にアプリケーショ
ンプログラムを停止せざるを得なかったが、本発明で
は、デバッグサポート部とデバッグモニタ部とを分離す
るとともに、デバッグモニタ部からのプログラム割込指
令を契機にアプリケーションプログラムへデバッグサポ
ート部を付加するようにしたので、当該アプリケーショ
ンプログラムを停止することなく、しかも当該プログラ
ム側に特別な仕掛けを必要とせずとも、そのトレースや
変数の表示、変数値の変更等を行うことができるように
なった。これにより、タイミング関連の不具合解析や、
長時間連続運転により生じる不具合の解析、修正が容易
になる。保守段階では、システムを停止する必要が無く
なる。
As described above, in the conventional debug support program such as the source level debugger, the debug support unit and the debug monitor unit are integrated, so that the application program is inevitably executed when the debug is executed. Although there was no choice but to stop, in the present invention, the debug support unit and the debug monitor unit are separated, and the debug support unit is added to the application program triggered by the program interrupt command from the debug monitor unit. Therefore, it is possible to perform tracing, display of variables, change of variable values, etc. without stopping the application program and without requiring any special mechanism on the program side. This enables timing-related defect analysis,
This makes it easy to analyze and correct defects caused by long-term continuous operation. At the maintenance stage, it is not necessary to stop the system.

【0023】また、デバッグ実行後は、抽出した監視情
報をデバッグモニタ部に転送するようにしたので、従来
のデバッグ支援プログラム(ソースレベルデバッガ)の
機能をそのまま踏襲することができる。
Further, since the extracted monitoring information is transferred to the debug monitor unit after the debug execution, the function of the conventional debug support program (source level debugger) can be directly followed.

【0024】更に、本発明のデバッグ方法では、プログ
ラム割込指令を契機にデバッグサポート部が自動起動す
るので、現在のモードがデバッグモードか否かをチェッ
クする必要が無くなり、その都度チェックを要した従来
方法に比べてパフォーマンスが格段に向上する。
Further, in the debugging method of the present invention, since the debug support unit is automatically activated upon the program interrupt command, it is not necessary to check whether the current mode is the debug mode, and it is necessary to check each time. The performance is significantly improved compared to the conventional method.

【0025】なお、このデバッグ方法では、マンマシン
インターフェースとなるモニタ装置の単純操作、即ち、
入力ウインドウの監視/操作により実現できるので、試
験者の特別な知識を不要とし、しかも、任意の時間にモ
ニタリングの開始、終了を行うことができる。必要なら
ば、常時モニタリングすることができる。
According to this debugging method, a simple operation of the monitor device serving as the man-machine interface, that is,
Since it can be realized by monitoring / manipulating the input window, special knowledge of the tester is unnecessary, and the monitoring can be started and ended at any time. If necessary, it can be monitored at all times.

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

【図1】本発明に係るデバッグ方法の概念図である。FIG. 1 is a conceptual diagram of a debugging method according to the present invention.

【図2】本発明の一実施例の要部フローチャートであ
り、(a)はデバッグモニタ部起動前、(b)は起動後
の状態を示す。
FIG. 2 is a flowchart of a main part of an embodiment of the present invention, in which (a) shows a state before a debug monitor unit is activated and (b) shows a state after the activation.

【図3】本発明の一実施例に係るデバッグモニタ部の動
作フローチャートである。
FIG. 3 is an operation flowchart of a debug monitor unit according to an embodiment of the present invention.

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

10…モニタ装置(デバッグモニタ部) 11…表示装置 20,30,40…タスク 21,31,41…ユーザコーディング部(アプリケー
ションプログラム) 22,32,42…デバッグモニタ部
10 ... Monitor device (debug monitor unit) 11 ... Display device 20, 30, 40 ... Task 21, 31, 41 ... User coding unit (application program) 22, 32, 42 ... Debug monitor unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ユーザが作成したアプリケーションプロ
グラムの実機デバッグを、コンピュータ装置のタスク管
理を行うデバッグサポート部とマンマシンインターフェ
ースたるデバッグモニタ部とで構成される非オンライン
型のデバッグ支援プログラムを用いて行うデバッグ方法
において、 前記デバッグ支援プログラムからデバッグサポート部と
デバッグモニタ部とを分離して、デバッグモニタ部から
のプログラム割込指令を契機に実行中のアプリケーショ
ンプログラムへデバッグサポート部を付加し、このデバ
ッグサポート部にて当該アプリケーションプログラムの
オンラインデバッグを実行するとともに、実行後は抽出
した監視情報を前記デバッグモニタ部に転送するように
したことを特徴とするコンピュータプログラムのデバッ
グ方法。
1. A user-created application program
Gram's real machine debugging
Debug support department and man-machine interface
Non-online consisting of the debug monitor part
Method using a type debug support program
In the above, from the debug support program to the debug support unit
Separated from the debug monitor part,
Application being executed triggered by the program interrupt command of
Add a debug support section to the
Of the application program
Perform online debugging and extract after execution
To transfer the monitored information to the debug monitor section.
Debugging a computer program characterized by
How to go.
JP4116461A 1992-05-11 1992-05-11 Computer program debugging method Pending JPH05313941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4116461A JPH05313941A (en) 1992-05-11 1992-05-11 Computer program debugging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4116461A JPH05313941A (en) 1992-05-11 1992-05-11 Computer program debugging method

Publications (1)

Publication Number Publication Date
JPH05313941A true JPH05313941A (en) 1993-11-26

Family

ID=14687691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4116461A Pending JPH05313941A (en) 1992-05-11 1992-05-11 Computer program debugging method

Country Status (1)

Country Link
JP (1) JPH05313941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000132424A (en) * 1998-06-19 2000-05-12 Lucent Technol Inc Software instrumentation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000132424A (en) * 1998-06-19 2000-05-12 Lucent Technol Inc Software instrumentation method

Similar Documents

Publication Publication Date Title
JP2749528B2 (en) Tracer system for error analysis
KR20080095528A (en) Test device of embedded software using the emulator and method thereof
JPH05313941A (en) Computer program debugging method
JPH05265802A (en) Software debugging device
JPS62139050A (en) Instruction test system by control of maintenance and diagnosis processor
JPH02220145A (en) Program tracing system
US20050015677A1 (en) Method of executing a computer program
JP4569011B2 (en) Programmable controller and peripheral device thereof
JPH06242943A (en) Source code level debugging device
JPH05265801A (en) Program monitor device
JPS63289654A (en) Program branching instruction monitoring system
JPH0465729A (en) Symbolic debugger
JPH06175882A (en) Program debugging method
DE102013217793A1 (en) Animation and debugging of vehicle systems
JPH04307636A (en) Program test system
JPH01261735A (en) Debugging device for distributed processing program
JPS6019245A (en) Program analyzer
JPH11306042A (en) Software development support device and debugging method
JPH10207737A (en) Emulator and emulation system
JPH0245836A (en) Automatic advancement control system for test diagnosing program
JPH03209534A (en) Back-up device for development of program
JPH0310339A (en) Debugging method with functional step function
JPH01244547A (en) Program development debugging backup system
JPH04310139A (en) Debug support tool for compiler language
JPH04162151A (en) Step trace debugging system