JPH03129439A - Debugging system - Google Patents

Debugging system

Info

Publication number
JPH03129439A
JPH03129439A JP2156853A JP15685390A JPH03129439A JP H03129439 A JPH03129439 A JP H03129439A JP 2156853 A JP2156853 A JP 2156853A JP 15685390 A JP15685390 A JP 15685390A JP H03129439 A JPH03129439 A JP H03129439A
Authority
JP
Japan
Prior art keywords
function
program
address
level
debugger
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
JP2156853A
Other languages
Japanese (ja)
Inventor
Hirohiko Ono
洋彦 小野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Publication of JPH03129439A publication Critical patent/JPH03129439A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To accelerate the response time of a command in the execution of one step of a function level by setting an address trap with respect to the present function range. CONSTITUTION:A debugger program 102 sends the command to set a range address trap at two memory ranges; the memory range from the leading address to one preceding address of the leading address of the present function of a memory on target equipment 107, and the one from the completion address of the function to the last address of the memory on the target equipment 107, to an in-circuit emulator 106. Next, the debugger program 102 transmits the execution command of a program to be debugged on the target equipment 107 on which the range address trap is set to the in-circuit emulator 106. Thereby, the response time in the execution of the command at the function level can be accelerated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、デバッグ方式に関し、特にターゲットシステ
ムを有するデバッグ方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a debugging method, and particularly to a debugging method having a target system.

〔従来の技術〕[Conventional technology]

ターゲットシステムを有するデバッグ方式は、クロスデ
バッグ方式と呼ばれる。クロスデバッグ方式は、通常、
デバッガプログラムの存在するホスト計算機と通信回線
により接続され、デバッグプログラムから制御されるイ
ンサーキントエミュレータ及びデバッグ対象のターゲッ
ト機器から構成される。
A debugging method that has a target system is called a cross-debugging method. Cross-debugging methods are usually
It is connected to the host computer where the debugger program resides via a communication line, and consists of an insert emulator controlled by the debug program and a target device to be debugged.

クロスデバッグ方式とホスト計算機上のデバッガプログ
ラムは、ホスト計算機の端末等から人間がターゲット機
器上の被デバツグプログラムの動作の流れを監視するた
め、デバッガ使用者からのターゲット機器上のプログラ
ムのソースレベル1行や機械語の1命令を実行するコマ
ンドを受取り、1行の実行後、現在のターゲット機器上
のプログラムの位置をソースレベルや機械語レベルで表
示する機能を有している。
The cross-debugging method and the debugger program on the host computer allow humans to monitor the flow of operations of the program to be debugged on the target device from the host computer's terminal, etc., so that the source level of the program on the target device is monitored by the debugger user. It has the function of receiving a command to execute one line or one instruction in machine language, and after executing one line, displays the current location of the program on the target device at the source level or machine language level.

ターゲットシステムとは、インサーキットエミュレータ
等のCPU動作を監視する機能とデバッグの対象となる
CPUとメモリ装置等から構成されるターゲット機器の
ことである。そしてデバッガプログラムとターゲットシ
ステムは、R3232Cインターフエース等の通信回線
を通じて、デバッガプログラムからターゲットシステム
へのコマンドや、ターゲットシステムからデバッガプロ
グラムへターゲット上の被デバツグプログラムの状態の
情報な転送している。例えば、前記デバッガプログラム
は、ターゲット機器上の被デバツグプログラムの機械語
の1命令実行を行うため、ターゲットシステム内のイン
サーキットエミュレータへR8232Cインタフエイス
等の通信回線を通じて機械語の1命令実行コマンドを転
送し、インサーキットエミュレータは、ターゲット機器
上の被デバツグプログラムの1機械語命令の実行を行い
、次に実行を行うプログラムのアドレス情報をデバッガ
プログラムに通信回線を通して転送する。
The target system is a target device that includes a function to monitor CPU operation such as an in-circuit emulator, a CPU to be debugged, a memory device, and the like. The debugger program and target system transfer commands from the debugger program to the target system and information about the state of the debugged program on the target from the target system to the debugger program through a communication line such as an R3232C interface. For example, the debugger program sends a single machine language instruction execution command to an in-circuit emulator in the target system through a communication line such as an R8232C interface in order to execute a single machine language instruction of the debugged program on the target device. The in-circuit emulator executes one machine language instruction of the program to be debugged on the target device, and transfers the address information of the program to be executed next to the debugger program through the communication line.

従来、この種のデバッグ方式では、プログラム作成をホ
スト計算機上で行い、ホスト計算機上のデバッガプログ
ラムを通してインサーキットエミュレータへ作成したプ
ログラムのオブジェクトデータをダウンロードし、イン
サーキットエミュレータのデバッグを使用してデバッグ
を行っていた。
Conventionally, in this type of debugging method, a program is created on a host computer, the object data of the created program is downloaded to an in-circuit emulator through a debugger program on the host computer, and debugging is performed using the debugging function of the in-circuit emulator. I was going.

またデバッグするプログラムは機械語レベルで行ってい
たため、インサーキットエミュレータの持つ機械語レベ
ルのデバッグ機能を利用するだけで、デバッグが可能で
あった。インサーキラ)wミュレータに機械語レベルの
デバッグ機能をもたせ、ホスト計算機上のデバッガプロ
グラムは、インサーキットエミュレータからの情報の表
示とインサーキットエミュレータへのキーボードからの
デバッガ使用者の入力コマンドの転送を行う程度の機能
を持つだけで十分であった。
Furthermore, since the program to be debugged was executed at the machine language level, debugging was possible simply by using the machine language level debugging function of the in-circuit emulator. In-circuit emulator) W The debugger program on the host computer displays information from the in-circuit emulator and transfers commands input by the debugger user from the keyboard to the in-circuit emulator. It was sufficient to have the following functions.

しかし、最近では、プログラムはC言語やパスカル言語
等の高級言語のソースレベルで記述され、そのソースレ
ベルでのプログラムのデバッグを行う必要があり、その
ためにホスト計算機上のデバッガプログラムは、ソース
レベルのプログラム上のシンボルの処理やソースレベル
の行情報をもとにソース行での実行機能等のソースレベ
ルでのデバッグのための機能を持つようになっている。
However, these days, programs are written at the source level in high-level languages such as C or Pascal, and it is necessary to debug programs at the source level. It has functions for debugging at the source level, such as processing symbols on the program and executing functions at source lines based on source-level line information.

さらに、関数レベルのステップ実行等の高機能のデバッ
グ機能の要求がある。
Furthermore, there is a demand for advanced debugging functions such as step execution at the function level.

関数は、翻訳プログラム(コンパイラ)により、複数の
機械語に変換される。その場合、関数の先頭の機械語の
アドレスと関数の終わりの機械語のアドレスがデバッグ
情報としてホスト計算機上にファイルとして出力される
A function is translated into multiple machine languages by a translation program (compiler). In this case, the machine language address at the beginning of the function and the machine language address at the end of the function are output as debug information to a file on the host computer.

従来の関数レベルのステップ実行の方式を示す。A conventional function-level stepping method is shown.

現在のターゲットシステム上の被デバツグプログラムの
停止アドレスと前記の翻訳プログラムにより出力される
前述の関数とアドレスの情報をもとに現在の関数をホス
ト計算機上でデバッガプログラムが検索する。
The debugger program searches for the current function on the host computer based on the stop address of the program to be debugged on the current target system and the above-mentioned function and address information outputted by the translation program.

次に現在のアドレスから機械語レベルで1命令ステップ
実行を行い、停止後被デバツグプログラムの停止アドレ
ス情報をターゲットシステムから得る。そのアドレスと
前述の関数とアドレスの情報から、再びデバッガプログ
ラムが関数を検索し、初めに検索していた関数名と比較
し異なっている場合、関数レベルでの1ステップ実行が
完了したとして、デバッガプログラムは、ユーザに1関
数ステップ実行の終了を通知する。初めに検索していた
関数名と再び検索した関数名が同じ場合は、まだ同一の
関数内を実行しているとして、再び機械語レベルの1命
令のステップ実行を行い、停止アドレスから関数名を検
索し、初めの関数名との比較する。デバッガプログラム
は、関数名が異なるまで、この手順を繰り返す。
Next, one instruction step execution is performed at the machine language level from the current address, and after stopping, information on the stop address of the program to be debugged is obtained from the target system. The debugger program searches for the function again from that address and the above-mentioned function and address information, and compares it with the function name it was initially searching for. If it is different, it is assumed that one step execution at the function level has been completed, and the debugger program searches for the function again. The program notifies the user of the end of one function step execution. If the function name that was originally searched is the same as the function name that was searched again, it is assumed that the same function is still being executed, and step execution of one instruction at the machine language level is performed again, and the function name is retrieved from the stop address. Search and compare with the first function name. The debugger program repeats this procedure until the function names are different.

関数は、機械語命令の数百命令から、多い場合は数千命
令に展開されることがある。
A function may be expanded from hundreds of machine language instructions to thousands of instructions in some cases.

それ故、関数レベルの従来方式のステップ実行では、タ
ーゲットシステムに数百回から数千回の機械語レベルの
l命令のステップ実行コマンドを送り、その停止アドレ
ス情報を得る通信を行う必要があった。
Therefore, in conventional step execution at the function level, it is necessary to send hundreds to thousands of step execution commands at the machine language level to the target system and perform communication to obtain the stop address information. .

以前の機械語レベルのみのデバッガプログラムに比べ、
現在の高級言語を処理できるデバッガプログラムでは、
ソースレベルの処理、関数レベルの処理が増加しており
、またインサーキットエミュレータとの通信量の増加の
ためデバッガ使用者へのコマンドの応答時間が増加して
おり、コマンドの応答時間の高速化の要求がある。
Compared to previous debugger programs that were only at the machine language level,
In debugger programs that can handle current high-level languages,
Source-level processing and function-level processing are increasing, and the amount of communication with in-circuit emulators is increasing, so the response time for commands to debugger users is increasing. I have a request.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したデバッグ方式は、ターゲットシステム上の被デ
バツグフログラムの関数レベルのステップ実行を行う場
合、1関数内に含まれる機械語レベルの機械語命令のス
テップ実行のためのデバッガプログラムとターゲットシ
ステムとの通信を必要としているので、デバッガプログ
ラムの使用者への関数レベルの1ステップ実行コマンド
時の応答時間が多大となる欠点がある。
In the debugging method described above, when performing step execution at the function level of the debugged program on the target system, the debugger program and the target system for step execution of machine language instructions included in one function are used. Since communication is required, there is a drawback that the response time when issuing a one-step execution command at the function level to the user of the debugger program is long.

〔課題を解決するための手段〕[Means to solve the problem]

アドレストラップ機能を有するターゲットシステムとの
通信を行い、ホスト計算機上のデバッグ手段を用いて、
プログラムの関数レベルのステップ実行を行うデバッグ
方式において、前記デバッグ手段からソースブpグラム
のl関数に対応するターゲットシステム上の機械語命令
の範囲に対して、実行させる1行の範囲外にアドレスト
ラップを設定、あるいは、実行させる1関数の範囲に対
して、実行可能とするステップアウト・アドレストラッ
プを設定し、関数レベルのステップ実行を行う機能を有
する。
Communicate with the target system that has an address trap function, and use debugging means on the host computer.
In a debugging method that performs step execution at the function level of a program, the debugging means sends an address trap to a range of machine language instructions on the target system corresponding to the l function of the source program p-gram outside the range of one line to be executed. It has the function of setting a step-out address trap to enable execution for a range of one function to be set or executed, and performing step execution at the function level.

(実施例〕 次に、本発明について図面を参照して説明する。(Example〕 Next, the present invention will be explained with reference to the drawings.

第1図は、本発明の一実施例の構成国である。FIG. 1 shows the constituent countries of an embodiment of the present invention.

第1図は、計算機装置101、デバッガプログラム10
2、関数−アドレス情報対応ファイル103、コンソー
ル104、R3232C通信回線105.インサーキッ
ト・エミュレータ106、ターゲット機器107から構
成される。
FIG. 1 shows a computer device 101 and a debugger program 10.
2. Function-address information correspondence file 103, console 104, R3232C communication line 105. It consists of an in-circuit emulator 106 and a target device 107.

第1図において、ターゲットシステムは、インサーキッ
ト・エミュレータlO6及びターゲット機器107に相
当し、通信手段は、R3232C通信回線105に、デ
バッグ手段は、デバッガプログラム102に、それぞれ
相当する。
In FIG. 1, the target system corresponds to the in-circuit emulator IO6 and the target device 107, the communication means corresponds to the R3232C communication line 105, and the debug means corresponds to the debugger program 102.

第2図は、ターゲットシステム上の被デバツグフログラ
ムの関数レベルの1ステップ実行の手段の機能の詳細を
示すフローチャートである。
FIG. 2 is a flowchart showing the details of the function of the means for one-step execution at the function level of the program to be debugged on the target system.

第3図は、ソースプログラムを翻訳する翻訳プログラム
が出力する関数の先頭アドレスと終了アドレスの情報が
設定されている関数−アドレス情報ファイルの内部構造
を示す図である。
FIG. 3 is a diagram showing the internal structure of a function-address information file in which information about the start address and end address of a function output by a translation program that translates a source program is set.

関数−アドレス情報ファイルは、関数の名前と先頭アド
レスと終了アドレスの表の集合でアドレス昇順に並んで
いる。
The function-address information file is a set of tables of function names, start addresses, and end addresses arranged in ascending order of addresses.

デバッガプログラム102は、デバッガプログラム10
2のユーザからコマンドの受取りや、その他のデバッグ
機能を行うプログラムであり、ソースレベルのステップ
実行の制御も行う。
The debugger program 102 is the debugger program 10
This is a program that receives commands from user 2 and performs other debugging functions, and also controls step execution at the source level.

デバッガプログラム102は、デバッガプログラム10
2の使用者からのターゲットシステム上の被デバツグプ
ログラムの関数レベルでの1ステップ実行コマンドを受
取り、インサーキットエミュレータへ各種インサーキッ
トエミュレータ用コマンドを送りその結果を受取りその
旨をデバッガプログラム102の使用者へ通知する。
The debugger program 102 is the debugger program 10
2 receives a one-step execution command at the function level of the program to be debugged on the target system from the user 2, sends various in-circuit emulator commands to the in-circuit emulator, receives the results, and uses the debugger program 102 to that effect. Notify the person.

関数レベルの1ステップ実行は、第2図のフローチャー
トに従って、ステップ実行を行う。関数レベルの1ステ
ップ実行方法を第2図のフローチャートを元に説明する
One-step execution at the function level is performed in accordance with the flowchart in FIG. The one-step execution method at the function level will be explained based on the flowchart in FIG.

はじめに現在のターゲットシステム上の被デバツグプロ
グラムの停止位置のアドレス情報をインサーキットエミ
ュレータから取得し、Xに設定する。(201) 次に、停止アドレス(X)とアドレス昇順に並んでいる
関数−アドレス情報ファイル301から、停止アドレス
(X)に対応するソースファイルの関数名を検索し、L
に設定する。(202)停止アドレスから関数名の検索
は、関数−アドレス情報ファイル内の各関数の先頭アド
レスと終了アドレスの範囲内に停止アドレスが入ってい
る関数が現在の関数である。
First, the address information of the stop position of the program to be debugged on the current target system is obtained from the in-circuit emulator and set to X. (201) Next, search for the function name of the source file corresponding to the stop address (X) from the function-address information file 301 arranged in ascending order of the stop address (X) and L
Set to . (202) Searching for a function name from a stop address indicates that the function whose stop address is within the range of the start address and end address of each function in the function-address information file is the current function.

現在の関数の先頭アドレス(Y)終了アドレス情報(Z
)を関数−アドレス情報ファイル301から検索する。
Start address (Y) and end address information (Z) of the current function
) is searched from the function-address information file 301.

(203) デバッガプログラム102は、ターゲット機器上のメモ
リの先頭アドレスから現在の関数の先頭アドレス(Y)
の1番地前のアドレスまでのメモリ範囲と、関数の終了
アドレスの2番地から、ターゲット機器上のメモリの最
終アドレスまでのメモリ範囲の2つのメモリ範囲に範囲
アドレストラップを設定するコマンド″をR9232C
通信回線105を使用して、インサーキットエミュレー
タに送信する。(204) 範囲アドレストラップとは、プルグラム内のあるメモリ
の範囲を指定し、プログラム実行の範囲アドレストラッ
プを設定しておきプログラムを実行すると、指定したメ
モリ範囲内に、プログラムの実行が移動してプログラム
を実行するとトラップが発生しプログラムが停止する様
なアドレストラップのことである。
(203) The debugger program 102 moves from the start address of the memory on the target device to the start address (Y) of the current function.
R9232C command to set a range address trap in two memory ranges: the memory range up to the address 1 before the end address of the function, and the memory range from the end address 2 of the function to the final address of the memory on the target device.
It is sent to the in-circuit emulator using the communication line 105. (204) Range address trap means that if you specify a certain memory range within a program, set a range address trap for program execution, and then execute the program, the program execution will move within the specified memory range. This is an address trap that occurs when a program is executed and causes the program to stop.

次に、デバッガプログラムは、範囲アドレストラップの
設定されたターゲット機器上の被デバツグプログラムの
実行コマンドをR8232C通M回線105を使用して
、インサーキットエミュレータに送信する。(205) インサーキットエミュレータは、指定された範囲アドレ
ストラップに従い、被デバツグプログラムを停止させ、
被デバツグプログラムが停止したことをR8232C通
信回線105を使用して、ホスト計算機上のデバッガプ
ログラム102へ送信し、デバッガプログラム102が
、この停止情報を受は取る。(206) デバッガプログラム102は、この停止情報を受は取る
ことにより、関数レベルのステップ実行前の関数とは異
なる関数に被デバツグプログラムの実行が移動したとし
て、デバッガプログラム102の使用者に関数レベルの
lステップ実行の終了したことをコンソール104に通
知スる。
Next, the debugger program uses the R8232C M line 105 to send an execution command for the program to be debugged on the target device in which the range address trap has been set to the in-circuit emulator. (205) The in-circuit emulator stops the debugged program according to the specified range address trap,
The fact that the program to be debugged has stopped is transmitted to the debugger program 102 on the host computer using the R8232C communication line 105, and the debugger program 102 receives and receives this stop information. (206) By receiving this stop information, the debugger program 102 informs the user of the debugger program 102 that the execution of the debugged program has moved to a function different from the function before step execution at the function level. The console 104 is notified that the l-step execution of the level has been completed.

本方式では、ソース行中に関数コールやジャンプ命令が
存在しても、ジャンプ先でプログラムが停止するため、
被デバツグプログラムの関数内での動作の流れが、連続
的でない場合においても関数レベルの1ステップ実行が
可能である。
In this method, even if there is a function call or jump instruction in a source line, the program stops at the jump destination.
Even if the flow of operations within a function of the program to be debugged is not continuous, one-step execution at the function level is possible.

次に、本発明の他の実施例について説明する。Next, other embodiments of the present invention will be described.

本実施例では、その基本的構成は第1図と同じであるが
、その機能が以下のように異なっである。
In this embodiment, the basic configuration is the same as that in FIG. 1, but the functions are different as follows.

すなわち、第4図は、ターゲットシステム上の被デバツ
グプログラムの関数レベルの1ステップ実行の手段の機
能の詳細を示すフローチャートである。
That is, FIG. 4 is a flowchart showing the details of the function of the means for one-step execution at the function level of the program to be debugged on the target system.

第3図は、ソースプログラムを翻訳する翻訳プログラム
が出力する関数名とその先頭アドレスと終了アドレス情
報が設定されている関数−アドレス情報ファイルの内部
構成を示す。
FIG. 3 shows the internal structure of a function-address information file in which function names, their start addresses, and end address information output by a translation program that translates a source program are set.

関数−アドレス情報ファイルは、関数の名前と先頭アド
レスと終了アドレスの表の集合でアドレス昇順に並んで
いる。デバッガプログラム102は、デバッガプログラ
ム102のユーザからのコマンドの受取りや、その他の
デバッグ機能を行うプログラムであり、関数レベルのス
テップ実行の制御も行う。
The function-address information file is a set of tables of function names, start addresses, and end addresses arranged in ascending order of addresses. The debugger program 102 is a program that receives commands from the user of the debugger program 102 and performs other debugging functions, and also controls step execution at the function level.

デバッガプログラム102は、デバッガプログラムlO
2の使用者からのターゲットシステム上の被デバツグプ
ログラムの関数レベルでの1ステップ実行コマンドを受
取り、インサーキットエミュレータへ各種インサーキッ
トエミュレータ用コマンドを送りその結果を受取りその
旨をデバッガプログラム102の使用者へ通知する。
The debugger program 102 is a debugger program lO
2 receives a one-step execution command at the function level of the program to be debugged on the target system from the user 2, sends various in-circuit emulator commands to the in-circuit emulator, receives the results, and uses the debugger program 102 to that effect. Notify the person.

関数レベルの1ステップ実行は、第4図のフローチャー
トに従って、ステップ実行を行う。関数レベルの1ステ
ップ実行方法を第4図のフローチャートを元に説明する
One-step execution at the function level is performed in accordance with the flowchart in FIG. The one-step execution method at the function level will be explained based on the flowchart in FIG.

はじめに現在のターゲットシステム上の被デバツグプロ
グラムの停止位置のアドレス情報をインサーキットエミ
ュレータから取得し、Xに設定する。(401) 次に、停止アドレス(X)とアドレス昇順に並んでいる
関数−アドレス情報ファイル301から、停止アドレス
(X)に対応する関数名を検索し、Lに設定する。(4
02) 停止アドレスから関数名の検索は、関数−アドレス情報
ファイル内の各関数の先頭アドレスと終了アドレスの範
囲内に停止アドレスが入っている関数が現在の関数であ
る。
First, the address information of the stop position of the program to be debugged on the current target system is obtained from the in-circuit emulator and set to X. (401) Next, the function name corresponding to the stop address (X) is searched from the function-address information file 301 arranged in ascending order of the stop address (X) and set to L. (4
02) When searching for a function name from a stop address, the function whose stop address is within the range of the start address and end address of each function in the function-address information file is the current function.

現在の関数の先頭アドレス(Y)終了アドレス情報(Z
)を関数−アドレス情報ファイル301かも検索する。
Start address (Y) and end address information (Z) of the current function
) is also searched in the function-address information file 301.

(403) デバッガプログラム102は、現在の関数の先頭アドレ
ス(Y)から現在の関数の終了アドレス(Z)までのメ
モリ範囲までの機械語命令列のみを実行可能とするステ
ップアウト・アドレストラップのコマンドをR8232
C通信回線105を使用して、インサーキットエミュレ
ータに送信する。(404) 上述のステップアウト・アドレストラップとは、プログ
ラム内の指定したアドレス範囲のみを実行可能とするア
ドレストラップであり、このアドレストラップを設定し
たプログラムを実行すると、指定アドレス外にプログラ
ムの実行が移動すると、トラップが発生しプログラムが
停止する。
(403) The debugger program 102 uses a step-out address trap command that allows execution of only a sequence of machine language instructions within the memory range from the start address (Y) of the current function to the end address (Z) of the current function. R8232
C communication line 105 to send to the in-circuit emulator. (404) The above-mentioned step-out address trap is an address trap that allows execution of only a specified address range within a program. When a program with this address trap set is executed, the program is executed at addresses other than the specified address. If you move, a trap will occur and the program will stop.

次に、デバッガプログラムは、ステップアウト・アドレ
ストラップの設定されたターゲット機器上の被デバツグ
プログラムの実行コマンドをR8232C通信回線10
5を使用して、インサーキットエミュレータに送信する
。(405)インサーキットエミュレータは、指定され
たステップアウト・アドレストラップに従い、被デバツ
グプログラムを停止させ、被デバツグプログラムが停止
したことをR8232C通信回線105を使用して、ホ
スト計算機上のデバッガプログラム102へ送信し、デ
バッガプログラム102が、この停止情報を受は取る。
Next, the debugger program sends the execution command of the program to be debugged on the target device for which the step-out address trap has been set to the R8232C communication line 10.
5 to send to the in-circuit emulator. (405) The in-circuit emulator stops the debugged program according to the specified step-out address trap, and uses the R8232C communication line 105 to notify the debugger program on the host computer that the debugged program has stopped. 102, and the debugger program 102 receives this stop information.

(40B) デバッガプログラム102は、この停止情報を受けとる
ことにより、関数レベルのステップ実行前の関数名とな
異なる関数に被デバツグプログラムの実行が移動したと
して1、デバッガプログラム102の使用者に関数レベ
ルの1ステップ実行の終了したことをコンソール104
に通知する。
(40B) By receiving this stop information, the debugger program 102 informs the user of the debugger program 102 that the execution of the debugged program has been moved to a function whose name is different from the function name before step execution at the function level. The console 104 indicates that one step of the level has been executed.
to notify.

本方式では、ソース行中に関数コールやジャンプ命令が
存在しても、ジャンプ先でプログラムが停止するため、
被デバツグプログラムの関数内での動作の流れが、連続
的でない場合においても関数レベルの1ステップ実行が
可能である。
In this method, even if there is a function call or jump instruction in a source line, the program stops at the jump destination.
Even if the flow of operations within a function of the program to be debugged is not continuous, one-step execution at the function level is possible.

第5図に本発明のデバッグ方式の効果を示すタイムチャ
ートを示す。
FIG. 5 shows a time chart showing the effects of the debugging method of the present invention.

従来方式では、関数レベルの1行のステップ実行を行う
場合、1関数内に数百命令から数千命令の機械語が含ま
れる場合、インサーキットエミュレータに対して、1命
令の機械語レベルのステップ実行コマンドを送信し、そ
の停止後、プログラムの停止位置のアドレスをインサー
キットエミュレータから取得し、そのアドレスから現在
の関数名を検索し、関数レベルのステップ実行前の関数
と異なるまで、つまり1関数内に含まれる機械語命令の
ステップ分(数百命令から数千命令分)もしくは、途中
でプログラムのジャンプがある場合は、そのジャンプ命
令まで、その機械語レベルのステップ実行と関数名検索
を行う必要があり、ステップ実行のコマンドの応答時間
が遅くなっていた(501)。
In the conventional method, when performing step execution of one line at the function level, if one function contains machine language instructions of hundreds to thousands of instructions, the machine language level step of one instruction is executed for the in-circuit emulator. After sending an execution command and stopping, obtain the address of the program's stopping position from the in-circuit emulator, search for the current function name from that address, and continue until it differs from the function before step execution at the function level, that is, by one function. If there is a step of machine language instructions included in the program (several hundred to several thousand instructions) or if there is a jump in the program, perform step execution and function name search at the machine language level up to that jump instruction. As a result, the response time of the step execution command was slow (501).

本発明のデバッグ方式では、現在の一個数の範囲に関し
てアドレスアドレストラップを設定することにより、機
械語レベルのステップ実行と比較処理のループを行わな
いため、関数レベルでのステップ実行コマンドでのコマ
ンドの応答時間が早くなる(502)。
In the debugging method of the present invention, by setting an address trap for the current number range, a loop of step execution and comparison processing at the machine language level is not performed. The response time becomes faster (502).

通信時間として問題となるのは、デバッガプログラム1
02とインサーキットエミュレータ107がハンドシェ
ーク通信を行っているため、通信回数が多いほど、多く
の通信時間が必要となる。これは、ハンドシェーク通信
が情報の伝達とともに、通信の手段の確立のための情報
を含んで通信を行っているためである0通信回数が少1
.ければ、少ないほど通信時間は短くなる。
The problem with communication time is debugger program 1.
02 and the in-circuit emulator 107 perform handshake communication, the greater the number of communications, the more communication time is required. This is because handshake communication not only transmits information but also includes information for establishing a means of communication.
.. If there are fewer numbers, the communication time will be shorter.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、関数レベルの1ステップ
実行のコマンドの応答時間を早くすることができ、デバ
ッグ手段の使用者の全体のデバッグ時間の短縮を行うこ
とができる効果がある。
As described above, the present invention has the advantage of being able to speed up the response time of a command for one-step execution at the function level, thereby shortening the overall debugging time for the user of the debugging means.

4、4,

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

第1図は本発明の実施例の構成図である。 101・・・・・・計算機装置、102・・・・・・デ
バッガプログラム、103・・・・・・関数−アドレス
情報ファイル、104・・・・・・コンソール、105
・・・・・・R3232C通信回線、106・・・・・
・インサーキットエミュレータ、107・・・・・・タ
ーゲット機器。 第2図は本発明の一実施例の関数レベルの1ステップ実
行のフローチャートである。 第3図は、関数−アドレス情報ファイル103の内部構
造を示す図である。 第4図は、本発明の他の実施例の関数レベルの1ステッ
プ実行のフローチャートである。 第5図は、本発明の効果を示すタイムチャートである。 501・・・・・・従来のデバッグ方式における関数レ
ベルの1ステップ実行のコマンドの応答時間、502・
・・・・・本発明のデバッグ方式における関数レベルの
1ステップ実行のコマンドの応答時間。
FIG. 1 is a block diagram of an embodiment of the present invention. 101... Computer device, 102... Debugger program, 103... Function-address information file, 104... Console, 105
......R3232C communication line, 106...
- In-circuit emulator, 107...Target device. FIG. 2 is a flowchart of one step execution at the function level in one embodiment of the present invention. FIG. 3 is a diagram showing the internal structure of the function-address information file 103. FIG. 4 is a flowchart of a function-level one-step execution of another embodiment of the present invention. FIG. 5 is a time chart showing the effects of the present invention. 501...Response time of one-step execution command at function level in conventional debugging method, 502.
...Response time of a function-level one-step execution command in the debugging method of the present invention.

Claims (1)

【特許請求の範囲】[Claims] ターゲットシステムと通信を行い、ホスト計算機上のデ
バッグ手段を用いて、ソースプログラムの関数レベルの
ステップ実行を行うデバッグ方式において、前記デバッ
グ手段が、ソースプログラム内の1関数に対応するター
ゲットシステム上の機械語命令の範囲に対して、実行さ
せる1関数に対応する機械語命令の範囲外にアドレスト
ラップを設定、あるいは、実行させる1関数に対応する
機械語命令の範囲に対して、実行可能とするステップア
ウト・アドレストラップを設定し、関数レベルのステッ
プ実行を行うことを特徴とするデバッグ方式。
In a debugging method that communicates with a target system and performs function-level step execution of a source program using debugging means on a host computer, the debugging means communicates with a machine on the target system corresponding to one function in the source program. setting an address trap outside the range of machine language instructions corresponding to one function to be executed for a range of word instructions, or making it executable for a range of machine language instructions corresponding to one function to be executed; A debugging method characterized by setting an out address trap and performing step execution at the function level.
JP2156853A 1989-07-05 1990-06-15 Debugging system Pending JPH03129439A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP17461289 1989-07-05
JP1-174612 1989-07-05

Publications (1)

Publication Number Publication Date
JPH03129439A true JPH03129439A (en) 1991-06-03

Family

ID=15981636

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2156853A Pending JPH03129439A (en) 1989-07-05 1990-06-15 Debugging system

Country Status (1)

Country Link
JP (1) JPH03129439A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57103560A (en) * 1980-12-19 1982-06-28 Mitsubishi Electric Corp Stop controller of central processor
JPS61180344A (en) * 1985-02-06 1986-08-13 Omron Tateisi Electronics Co Step execution system for high level language

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57103560A (en) * 1980-12-19 1982-06-28 Mitsubishi Electric Corp Stop controller of central processor
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
US6412106B1 (en) Graphical system and method for debugging computer programs
US5630049A (en) Method and apparatus for testing software on a computer network
EP0785510B1 (en) Program debugging system for debugging a program having a graphical user interface
JP4901075B2 (en) Computer-readable medium, method and computing device
US5361352A (en) Method for debugging in a parallel computer system and system for the same
CN112579460B (en) Multi-level debugging method based on multi-core embedded system
JPH03129439A (en) Debugging system
JP2861962B2 (en) Computer program simulation apparatus and method
JP2861085B2 (en) Debug method
JP2007004516A (en) Program debugging method of built-in system
KR950012113B1 (en) Improved system and method for detecting cross-domain instruction calls and data referenc especially adapted for code interface jacketing in a multi code execution and debugging syste
JP2003177937A (en) Apparatus and method for improvement of communication between emulator unit and host device
WO2024069730A1 (en) Debugging device and debugging method
JPH02220145A (en) Program tracing system
JPH05274177A (en) Real-time system debugging device
JP2817473B2 (en) Debug system
JP2658982B2 (en) Specific instruction execution detection method
JPH08221277A (en) Emulation device
JPH07319730A (en) Test debugging method
JP3019330B2 (en) Compiling device
CN115309643A (en) Cross-platform UI (user interface) automatic testing method and device, electronic equipment and storage medium
KR930004916B1 (en) Hardware testing operations process method
KR970049557A (en) Server Structure for Cross Debugging and Cross Debugging Operation Method
JPH04333146A (en) Program execution control system for debugging
JPH0758472B2 (en) Software development equipment