JPH0310339A - Debugging method with functional step function - Google Patents

Debugging method with functional step function

Info

Publication number
JPH0310339A
JPH0310339A JP1144672A JP14467289A JPH0310339A JP H0310339 A JPH0310339 A JP H0310339A JP 1144672 A JP1144672 A JP 1144672A JP 14467289 A JP14467289 A JP 14467289A JP H0310339 A JPH0310339 A JP H0310339A
Authority
JP
Japan
Prior art keywords
function
debugger
break
breakpoint
circuit emulator
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
JP1144672A
Other languages
Japanese (ja)
Inventor
Tsutomu Yanagawa
力 柳川
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP1144672A priority Critical patent/JPH0310339A/en
Publication of JPH0310339A publication Critical patent/JPH0310339A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a functional step function by outputting arguments of functions and function values (return values) while executing steps with a function as the unit. CONSTITUTION:A host machine 1 is provided with a debugger and a user object file, and an incircuit emulator 2 is connected to the host machine 1 by a bus 3. The debugger transfers information of all functions corresponding to object modules to the incircuit emulator 2, and break points are set to heads of functions in the incircuit emulator 2 based on this information. At the time of break, the break point is set to the return address of a function and the argument is returned to the debugger in case of the head of the function, and the break point is reset and the function value is returned to the debugger when the break point is the return address. Thus, the step operation is apparent ly performed with a function as the unit when an execution command GO is issued from the debugger.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明は、C言語で記述したプログラムをデバッグする
方法に関し、詳しくはインサーキットエミュレータを用
いてプログラムをデバッグする際にプログラムを関数単
位てステップ動作させる方法に関する。
[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to a method for debugging a program written in C language. Regarding how to make it work.

〈従来の技術〉 マイクロプロセッサ用インサーキットエミュレータは、
マイクロプロセッザ応用機器の開発およびデバッグを行
なう際に用いられる。このインサーキットエミュレータ
は、ターゲラ1〜マイク1コプロセツサを1命令ごとに
停止さぜながら実行さぜターゲラ1へプログラムのデパ
ックを行なう機能を持っている。そして近年の高級言語
(例えば、C言語)の普及により、高級言語でのソース
行ごとに停止さぜながら実行さぜ、高級言語レベルのデ
パックを行なうことができる機能を持つものも出現して
いる(例えは、出願人が出願しな特願昭63  12’
1675 号)。
<Conventional technology> In-circuit emulators for microprocessors are
It is used when developing and debugging microprocessor application equipment. This in-circuit emulator has the function of depacking a program to the Targetera 1 by executing it while stopping the Targetera 1 to Mike 1 coprocessors for each instruction. In recent years, with the spread of high-level languages (such as the C language), some programs have appeared that have the ability to perform depacking at a high-level language level by stopping and running each source line in the high-level language. (For example, if the applicant did not apply for a patent application in 1983,
No. 1675).

〈発明が解決しようとする課題〉 ところて、Cプログラムを開発するプログラマはデパッ
ク時の基本単位として行と関数を注目点として扱うか、
上記この柿のインサーキットエミュレータを用いたデバ
ッガでは、行に対するデパック機能としてラインステッ
プという概念はあったものの、関数単位のステップ機能
という概念はなかっな。
<Problem to be solved by the invention> By the way, do programmers who develop C programs treat lines and functions as the basic units when depacking?
In the debugger using Kaki's in-circuit emulator mentioned above, there was a concept of line stepping as a depacking function for lines, but there was no concept of a step function for each function.

また、草体デバッグの基本単位は行であるが、システム
デバッグ時の基本単位は関数の場合が多く、関数の入出
力条件値の正当性のチエツクが、バク要因解析の第一フ
ェーズであり、関数単位のデバッグ機能か強く望まれて
いる。
Furthermore, while the basic unit in system debugging is a line, the basic unit in system debugging is often a function, and checking the validity of the input/output condition values of a function is the first phase of bug factor analysis. Unit debugging functionality is highly desired.

従来のインサーキットエミュレータでは、この関数単位
のデパックか充実していないという問題があった。
Conventional in-circuit emulators have had the problem of not being able to fully depack each function.

本発明の目的は、このような点に鑑みてなされたもので
、インサーキットエミュレータを用い、C言語て記述さ
れたプログラムごデパックする際、ノー 関数単位にステップ実行しながら関数のアーギュメント
(引数)および関数値(あるいは返値ともいう)を出力
するような関数ステップ機能を持−ノだデバッグ方法を
提供することにある。
The purpose of the present invention has been made in view of the above points, and when depacking a program written in C language using an in-circuit emulator, the function argument (argument) is The object of the present invention is to provide a debugging method that has a function step function that outputs a function value (also called a return value).

く課題を解決するための手段〉 第1図は本発明のデバッグ方法の原理フローである。本
発明においては、インサーキットエミュレータがポス1
−マシン上のインサーキットエミル−タ制御ツール(い
わゆるデバッガ)により制御される構成で、すべてのデ
パック機能は上位のデバッガとインサーキラI・エミュ
レータが結びついて初めて可能となる。
Means for Solving the Problems> FIG. 1 is a flowchart of the principle of the debugging method of the present invention. In the present invention, the in-circuit emulator
- It is a configuration controlled by an in-circuit emulator control tool (so-called debugger) on the machine, and all depacking functions are possible only when the upper debugger and in-circuit emulator are combined.

■ます、インサーキットエミュレータはデバッガからオ
ブジェクトモジュールに対応する全関数の情報(アドレ
ス、アーギュメン1−3関数値)を受は取る。
(1) First, the in-circuit emulator receives information on all functions (address, arguments 1-3 function values) corresponding to the object module from the debugger.

■インサーキラI・エミュレータではこの情報をブレー
クRAMにセットする。
■In the Incircler I emulator, set this information in the break RAM.

■インサーキットエミュレータはセットシた情報を基に
、ブレーク管理テーブルに、ブレーク成立後にインサー
キットエミュレータ内で行なう処理に関する情報を情報
テーブルに設定する。
-Based on the set information, the in-circuit emulator sets information on the processing to be performed within the in-circuit emulator after the break is established in the break management table in the information table.

■インサーキットエミュレータは、」−位デバッカから
の実行コマンドGoにより実行し、ブレークした時、 (1)ブレークポインl−が関数ヘッドの時は、戻り番
地にブレークポイン)〜をセットしてアーギュメントと
現在プログラムカウンタをデバッガに転送する。
■When the in-circuit emulator is executed by the execution command Go from the debugger and breaks, (1) If the breakpoint l- is the function head, set the breakpoint) to the return address and set the argument Transfer the current program counter to the debugger.

(2)ブレークポイントか関数の戻り番地である場合に
は、現在のブレーク点をリセッI〜し、関数値をプログ
ラムカウンタをデバッガに転送する。
(2) If it is a breakpoint or a return address of a function, reset the current breakpoint and transfer the function value from the program counter to the debugger.

(3)ブレークポインl−が関数のヘッドあるいは戻り
番地でない場合は、他のブレーク処理を行なう。
(3) If the break point l- is not the head or return address of the function, perform other break processing.

〈作用〉 デバッガがインサーキットエミュレータに対してオブジ
ェク1−モジュールに対応する全関数の情報を転送し、
インサーキットエミュレータ内でこの情報を基にして関
数のヘッドにブレークポインI・をセラ1へする。
<Operation> The debugger transfers information on all functions corresponding to object 1-module to the in-circuit emulator,
Based on this information in the in-circuit emulator, a break point I is set to cell 1 at the head of the function.

インサーキットエミュレータ内では、ブレークした時、
関数のヘッドの場合はブレークポイントをその関数の戻
り番地に設定してアーギュメントをデバッガに返し、ブ
レークした時ブレークポイン1へが戻り番地である場合
はブレークポイントをリセットして関数値をデバッガに
返す。
In the in-circuit emulator, when a break occurs,
If it is the head of a function, set a breakpoint at the return address of the function and return the argument to the debugger, and if breakpoint 1 is the return address when breaking, reset the breakpoint and return the function value to the debugger. .

これにより、デバッガから実行コマンドGoを発行する
と、見かけ」二関数単位のスデ・ンプ動作か実現できる
As a result, when the execution command Go is issued from the debugger, it is possible to realize what appears to be a sudump operation in units of two functions.

なお、関数ステップのステップ単位としては、関数のヘ
ッドまたは戻り番地に到達した時点が1ステツプとなる
Note that, as a step unit of a function step, one step is the time when the head or return address of the function is reached.

〈実施例〉 第2図は本発明に係るデパック方法を実施するためのシ
ステムの構成図である。1はホストマシンで、デバッガ
およびユーザオブジェクl−ファイルを有する。2はイ
ンサーキットエミュレータて、バス3によりホス1−マ
シン1に接続されている。
<Example> FIG. 2 is a configuration diagram of a system for implementing the depacking method according to the present invention. 1 is a host machine, which has a debugger and a user object l-file. Reference numeral 2 denotes an in-circuit emulator, which is connected to the host 1 and the machine 1 by a bus 3.

インサーキットエミュレータ2は、各関数に対してブレ
ークポイントを設定することのできるブレークRA M
を持ち、通常の処理機能の他に、ボス1〜マシン1から
転送される関数情報を基にブレークポインl−管理デー
プルを作成し、ブレークアドレスの設定、アーギュメン
ト、プログラムカウンタ、関数値のポス1−マシン1へ
の転送等の機能を有する。
In-circuit emulator 2 has break RAM that allows you to set breakpoints for each function.
In addition to the normal processing functions, it creates a breakpoint l-management table based on the function information transferred from boss 1 to machine 1, and handles break address settings, arguments, program counters, and function value post 1. - Has functions such as transfer to machine 1.

このような構成において、前処理の段階として、インサ
ーキットエミュレータ2はバス3経由でホスl−マシン
1からユーザオブジェクl−ファイルの中のオブジェク
1〜モジユールに対応する全関数の情報(アドレス、ア
ーギュメント、関数値)を受は取り、第3図のブレーク
RAM概念図に示すように各関数のヘッドにブレークポ
イント(黒丸)を設定する。そして同時に、第4図に示
すようなブレークポイン1〜管理テーブルに、ブレーク
成立後にインサーキットエミュレータ内で行なう処理の
情報を情報テーブルに設定する。
In such a configuration, as a preprocessing stage, the in-circuit emulator 2 receives information (address, argument, , function value) and set a break point (black circle) at the head of each function as shown in the conceptual diagram of the break RAM in FIG. At the same time, information on the processing to be performed within the in-circuit emulator after the break is established is set in the information table in the breakpoint 1 to management table as shown in FIG.

上位デバッガから実行コマンドGoが発行されインサー
キラ1−エミュレータ内でプログラムが実行されブレー
クし、な時、ブレークポイン1〜が関数ヘッドである場
合、戻り番地である場合、いずれでもない場合とでイン
サーキットエミュレータの処理は次のように分かれる。
When the execution command Go is issued from the higher-level debugger and the program is executed in the in-circuit killer 1 emulator and breaks, the in-circuit error occurs depending on whether break point 1 is the function head, the return address, or none of the above. The emulator's processing is divided into the following parts.

■関数ヘッドである場合 ブレークポイン1〜管理テーブルを参照し、当該ブレー
ク関数の戻り番地にブレークポインl〜を設定し、アー
ギュメントと現在グログラムカウンタの値をデバッガに
転送する。
(2) If it is a function head, refer to the breakpoint 1~ management table, set breakpoint 1~ at the return address of the break function, and transfer the argument and current program counter value to the debugger.

■ブレークポイン1へか戻り番地である場合インサーキ
ットエミュレータでは当該関数を実行し、現在のブレー
クポイントをリセッ1−すると共に関数値とプログラム
カウンタをデバッガに転送する。
(2) If it is a return address to breakpoint 1, the in-circuit emulator executes the function, resets the current breakpoint, and transfers the function value and program counter to the debugger.

■いずれでもない場合は他のブレーク処理を実行する。■If neither is the case, execute another break process.

以」二のステップ動作を図示すると第5図に示すような
説明図となる。すなわち、カレン1〜行らか関数ステッ
プを順次発行すると、■〜■の順にステップ終了する。
The following two step operations are illustrated in an explanatory diagram as shown in FIG. That is, when function steps from Karen 1 to Row are issued in sequence, the steps are completed in the order of ■ to ■.

ただし、■および■は関数のヘッド、■および■は戻り
番地を示す。
However, ■ and ■ indicate the head of the function, and ■ and ■ indicate the return address.

〈発明の効果〉 以上詳細に説明したように、本発明によれば、次のよう
な効果がある。
<Effects of the Invention> As described above in detail, the present invention has the following effects.

■関数を単位としたステップ動作か可能となる。■It is possible to perform step operations using functions as units.

■デバッグのキーポイントとなる関数の入力条件(アー
ギュメント値)と出力条件(関数値)の表示が可能とな
る。
■It is possible to display the input conditions (argument values) and output conditions (function values) of functions, which are key points for debugging.

■本機能をカウント付で連続発行すること(オウンl−
付関数ステップ)により、関数の呼び出し順序、実行遷
移を1〜レースすることがoJ能となる。
■Continuously issue this function with a count (own l-
With the attached function step), it is possible to race the function calling order and execution transition from 1 to 1.

■インサ・−キットエミュレータ内て関数単位のブレー
クポイン)〜を振り、その間の実行は連続的に行なわれ
るので関数間リアルタイム動作か保障できる。
■In the Inser-Kit emulator, breakpoints are set for each function, and execution between them is performed continuously, so real-time operation between functions can be guaranteed.

■インサーキットエミュレータ内に関数情報を備えてい
るので、上位デバッガと炬雑な通信シーケンスを省くこ
とができる。したがって、レスポンスの向上を図ること
ができる。
■Since function information is provided within the in-circuit emulator, complicated communication sequences with the host debugger can be omitted. Therefore, it is possible to improve the response.

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

第1図は本発明のデパック方法の原理フロー第2図は本
発明の方法を実施するためのシステムの構成図、第3図
はブレークRAMの関数ポイン)〜を示す概念的構成図
、第4図はブレークポイント管理テーブルを示す図、第
5図は関数ステップ動作を説明するための図である。 1・・・ホス1〜マシン、2・・・インサーキットエミ
ュレータ、3・・・バス。 第 7 図 嘉 図 フパシー7ffA間 第 図 第 図 関数A
Fig. 1 shows the principle flow of the depacking method of the present invention. Fig. 2 is a block diagram of a system for implementing the method of the present invention. Fig. 3 is a conceptual block diagram showing the function points of the break RAM. The figure shows a breakpoint management table, and FIG. 5 is a diagram for explaining function step operation. 1... Host 1 to machine, 2... In-circuit emulator, 3... Bus. 7th figure function A between 7ff A

Claims (1)

【特許請求の範囲】 デバッガおよびユーザオブジェクトファイルを有するホ
ストマシンと、 各関数に対してブレークポイントを設定することのでき
るブレークRAMを持ち、ホストマシンから転送される
関数情報を基にブレークポイント管理テーブルを作成し
、ブレークアドレスの設定、アーギュメント、プログラ
ムカウンタ、関数値のホストマシンへの転送等の機能を
有するインサーキットエミュレータで構成され、 すべてのデバッグ機能は上位のデバッガとインサーキッ
トエミュレータが結びついて初めて可能となるように構
成されたシステムにおいて、 インサーキットエミュレータはデバッガからオブジェク
トモジュールに対応する全関数の情報アドレス、アーギ
ュメントおよび関数値を受け取る工程と、 インサーキットエミュレータ内でこの情報をブレークR
AMにセットする工程と、 インサーキットエミュレータで、セットした情報を基に
ブレーク管理テーブルに、ブレーク成立後にインサーキ
ットエミュレータ内で行なう処理に関する情報をテーブ
ルに設定する工程と、インサーキットエミュレータが上
位デバッガからの実行コマンドを実行し、ブレークした
時、 (1)ブレークポイントが関数ヘッドの場合は、戻り番
地にブレークポイントをセットしてアーギュメントと現
在プログラムカウンタをデバッガに転送し、 (2)ブレークポイントが関数の戻り番地である場合に
は、現在のブレーク点をリセットし、関数値をプログラ
ムカウンタをデバッガに転送し、 (3)ブレークポイントが関数のヘッドあるいは戻り番
地でない場合は、他のブレーク処理を行なうようにした 工程からなることを特徴とする関数ステップ機能を有す
るデバッグ方法。
[Claims] A host machine having a debugger and a user object file, and a break RAM capable of setting breakpoints for each function, and a breakpoint management table based on function information transferred from the host machine. It consists of an in-circuit emulator that has functions such as setting break addresses, transferring arguments, program counters, and function values to the host machine, and all debugging functions are only available when the upper debugger and in-circuit emulator are connected. In a system configured to allow this, the in-circuit emulator has the process of receiving from the debugger the information addresses, arguments, and function values of all functions corresponding to the object module, and breaking this information within the in-circuit emulator.
A step in which the in-circuit emulator sets information about the processing to be performed within the in-circuit emulator after a break is established in the break management table based on the set information in the in-circuit emulator, When the execution command is executed and a break occurs, (1) If the breakpoint is at the function head, set the breakpoint at the return address and transfer the arguments and current program counter to the debugger, (2) If the breakpoint is at the function head, (3) If the breakpoint is not the head or return address of the function, reset the current breakpoint and transfer the function value from the program counter to the debugger; (3) If the breakpoint is not the head or return address of the function, perform other break processing. A debugging method having a function step function, characterized by comprising steps as follows.
JP1144672A 1989-06-07 1989-06-07 Debugging method with functional step function Pending JPH0310339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1144672A JPH0310339A (en) 1989-06-07 1989-06-07 Debugging method with functional step function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1144672A JPH0310339A (en) 1989-06-07 1989-06-07 Debugging method with functional step function

Publications (1)

Publication Number Publication Date
JPH0310339A true JPH0310339A (en) 1991-01-17

Family

ID=15367557

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1144672A Pending JPH0310339A (en) 1989-06-07 1989-06-07 Debugging method with functional step function

Country Status (1)

Country Link
JP (1) JPH0310339A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61180344A (en) * 1985-02-06 1986-08-13 Omron Tateisi Electronics Co Step execution system for high level language

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61180344A (en) * 1985-02-06 1986-08-13 Omron Tateisi Electronics Co Step execution system for high level language

Similar Documents

Publication Publication Date Title
JPS634346A (en) Microprocessor debugging apparatus
Cunha et al. A framework to support parallel and distributed debugging
JPH0310339A (en) Debugging method with functional step function
JPS62113244A (en) Program test device
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JP3339708B2 (en) Event recording method
JP2659366B2 (en) Debugging method and device
Boissat et al. MODEL: a software suite for data acquisition
JPH0395638A (en) Debugging device
JPH0695910A (en) Interactive debugging control system for abnormality processing
Olivier Debugging distributed applications using a coordination architecture
KR100205061B1 (en) Driving method of debugger in distributed computing environment
JP3159155B2 (en) Method and apparatus for debugging program
JPH01169546A (en) Multi-task debugger
JPH0465729A (en) Symbolic debugger
JPH0380338A (en) In-circuit emulator for fuzzy chip
KR100194800B1 (en) How to Cross-Debug Multiple Chill Programs Using Connection Manager
JPS61180344A (en) Step execution system for high level language
JP2000250778A (en) Inter-distributed debugger linkage processing method
JPS61296439A (en) Data processing system
JPH06161817A (en) Thread on-line debugging device
JPH0588878A (en) Lisp instruction executing system
JPH0353347A (en) Debugging system
JPH04333146A (en) Program execution control system for debugging
JPS63226741A (en) Symbolic debugging system