JP2000089977A - Debugging system - Google Patents

Debugging system

Info

Publication number
JP2000089977A
JP2000089977A JP10257032A JP25703298A JP2000089977A JP 2000089977 A JP2000089977 A JP 2000089977A JP 10257032 A JP10257032 A JP 10257032A JP 25703298 A JP25703298 A JP 25703298A JP 2000089977 A JP2000089977 A JP 2000089977A
Authority
JP
Japan
Prior art keywords
function
return address
circuit
program
match
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
JP10257032A
Other languages
Japanese (ja)
Inventor
Koji Oishi
宏治 大石
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP10257032A priority Critical patent/JP2000089977A/en
Publication of JP2000089977A publication Critical patent/JP2000089977A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To make debugging operation efficient by receiving the start address of a function to be debugged and the program counter value of a target processor which executes a target program, compairing them with each other and outputting a matching result when they are matched with each other. SOLUTION: The start address of the function to be debugged is set and registered in an address comparing circuit 2 and at the same time, error condition of the function are set and registered in a function error condition comparing circuit 5. In this state, an MCU 1 executes the target program including the function to be debugged. The target program is executed, and the program counter value is compared with the start address of the function. When they match each other, a return address acquiring circuit 3 acquires a return address according to specific register rewrite information or register rewrite information of the MCU 1, etc.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、高級言語による
プログラム開発設計時に特定の処理単位として設定され
た関数を関数単位でデバッグするデバッグシステムに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging system for debugging a function set as a specific processing unit at the time of developing and designing a program in a high-level language.

【0002】[0002]

【従来の技術】従来、高級言語によるプログラムの開発
設計を行う手順として例えば、プログラムの内容に応じ
て開発設計者が任意に設定可能な特定の処理単位、例え
ば所定の処理を開始する前にその処理に必要なメモリ領
域を確保するための処理や表計算といった処理を関数と
して定義しプログラムを構築していく手法が採られてい
た。このような手法で開発設計されたプログラムをデバ
ッグする従来のデバッグシステムでは、ターゲットプロ
グラムを認識する際に関数単位という概念が定義されて
いなかった。すなわち、従来のデバッグシステムは関数
として定義されたそれぞれの特定の処理を関数単位とし
てとらえて認識することができなかった。このようなデ
バッグシステムにおいて、プログラムを構成する関数を
デバッグする場合には、関数が例えばサブルーチンとし
て含まれるプログラム全体を実行することによりデバッ
グする関数を実行し、関数の実行が終了して得られる関
数のリターン値が正常であるか否かを、コンパイラの構
造を意識しながらデバッグ作業者が手作業により適当な
位置でプログラムを一旦停止させて確認するといった作
業を行っていた。また、関数の実行中に収集されたトレ
ースデータで確認する場合には、全ての実行結果を取得
し、その中からエラー発生時のトレースデータを拾い出
して上記確認をデバッグ作業者が手作業で行っていた。
2. Description of the Related Art Conventionally, as a procedure for developing and designing a program in a high-level language, for example, a specific processing unit that can be arbitrarily set by a development designer in accordance with the contents of the program, for example, before starting a predetermined process, A method of defining a process for securing a memory area necessary for the process and a process such as a spreadsheet as a function and constructing a program has been adopted. In a conventional debugging system for debugging a program developed and designed by such a method, the concept of a function unit is not defined when recognizing a target program. That is, the conventional debugging system cannot recognize each specific process defined as a function as a function unit. In such a debugging system, when debugging a function that constitutes a program, the function executes the function to be debugged by executing the entire program included as a subroutine, for example, and the function obtained after the execution of the function is completed The debugger has to manually stop the program at an appropriate position and check whether the return value of the program is normal or not while paying attention to the structure of the compiler. Also, when checking with the trace data collected during the execution of the function, obtain all execution results, pick up the trace data at the time of error occurrence from among them, and perform the above check manually by the debug worker. I was going.

【0003】[0003]

【発明が解決しようとする課題】以上説明したように、
従来のでバッグシステムにおいては、関数単位という概
念がないためデバッグしようとするターゲットプログラ
ムに含まれる関数のデバッグ作業では、デバッグを行う
作業者の手作業に負うところが多く、デバッグ作業に手
間と時間がかかり、非効率であるという不具合を招いて
いた。
As described above,
In a conventional bag system, since there is no concept of a function unit, debugging of a function included in a target program to be debugged often depends on the manual work of a debugger, and the debugging work takes time and effort. , Resulting in inefficiency.

【0004】そこで、この発明は、上記に鑑みてなされ
たものであり、その目的とするところは、関数のデバッ
グを容易にして、デバッグ作業の効率化を図ったデバッ
グシステムを提供することにある。
Accordingly, the present invention has been made in view of the above, and an object of the present invention is to provide a debugging system which facilitates debugging of a function and improves the efficiency of debugging work. .

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、プログラム開発設計時に特
定の処理単位として設定された関数を含み、該関数のデ
バッグ作業が関数単位で行われるターゲットプログラム
を実行するターゲットプロセッサと、デバッグ対象とな
る関数のスタートアドレスとターゲットプロセッサのプ
ログラムカウンタ値を受けて両者を比較し、両者が一致
した時に一致結果を出力し、かつ予め入力された指示に
したがってトレースデータの収集を指示する第1の比較
回路と、第1の比較回路から出力される一致結果を受け
て、ターゲットプロセッサの所定のレジスタ書き換え情
報、アドレスバス値、データバス値に基づいて、デバッ
グ対象の関数の実行終了後の戻りアドレスとなるリター
ンアドレスを取得するリターンアドレス取得回路と、リ
ターンアドレス取得回路で取得されたリターンアドレス
とターゲットプロセッサのプログラムカウンタ値を受け
て両者を比較し、両者が一致した時に一致結果を出力
し、かつトレースデータ収集の停止を指示する第2の比
較回路と、第2の比較回路から出力される一致結果を受
けて、予め入力されたエラー条件に基づいて実行が終了
したデバッグ対象の関数のエラーを判別し、エラーが発
生した場合にはトレースデータの保存を指示するエラー
判別回路とを有することを特徴とする。
In order to achieve the above object, the invention according to claim 1 includes a function set as a specific processing unit at the time of program development design, and debugging of the function is performed in function units. The target processor that executes the target program to be executed and the start address of the function to be debugged and the program counter value of the target processor are compared, and the two are compared. When they match, a match result is output, and the match is output. A first comparison circuit instructing collection of trace data in accordance with the instruction, and receiving a match result output from the first comparison circuit, based on predetermined register rewrite information, an address bus value, and a data bus value of the target processor. To obtain the return address that is the return address after the execution of the function to be debugged Receiving the return address obtained by the return address obtaining circuit and the program counter value of the target processor, comparing the two, outputting a match result when the two match, and stopping the trace data collection. In response to the instructed second comparison circuit and the matching result output from the second comparison circuit, an error of the debug target function whose execution has been completed is determined based on a previously input error condition, and an error occurs. And an error discriminating circuit for instructing the storage of the trace data in the case where the error has occurred.

【0006】請求項2記載の発明は、プログラム開発設
計時に特定の処理単位として設定された関数を含み、該
関数のデバッグ作業が関数単位で行われるターゲットプ
ログラムを実行するターゲットプロセッサと、デバッグ
対象となる関数のスタートアドレスとターゲットプロセ
ッサのプログラムカウンタ値を受けて両者を比較し、両
者が一致した時に一致結果を出力する第1の比較回路
と、第1の比較回路から出力される一致結果を受けて、
ターゲットプロセッサの所定のレジスタ書き換え情報、
アドレスバス値、データバス値に基づいて、デバッグ対
象の関数の実行終了後の戻りアドレスとなるリターンア
ドレスを取得するリターンアドレス取得回路と、リター
ンアドレス取得回路で取得されたリターンアドレスとタ
ーゲットプロセッサのプログラムカウンタ値を受けて両
者を比較し、両者が一致した時に一致結果を出力する第
2の比較回路と、第2の比較回路から出力される一致結
果を受けて、予め入力されたエラー条件に基づいて実行
が終了したデバッグ対象の関数のエラーを判別し、エラ
ーが発生した場合には予め入力された指示にしたがって
ターゲットプロセッサのプログラムの実行を停止させる
エラー判別回路とを有することを特徴とする。
According to a second aspect of the present invention, there is provided a target processor for executing a target program which includes a function set as a specific processing unit at the time of program development and design, and the debug operation of the function is performed in function units. A first comparison circuit that receives a start address of a function and a program counter value of a target processor, compares the two, and outputs a match result when they match, and receives a match result output from the first comparison circuit. hand,
Predetermined register rewrite information of the target processor,
A return address acquisition circuit for acquiring a return address which is a return address after execution of the function to be debugged based on the address bus value and the data bus value; a return address acquired by the return address acquisition circuit; The second comparison circuit receives the counter value, compares the two, and outputs a match result when the two match, and receives a match result output from the second comparison circuit, and based on the error condition input in advance. An error determining circuit that determines an error of the debug target function whose execution has been completed and stops the execution of the program of the target processor according to a previously input instruction when an error occurs.

【0007】[0007]

【発明の実施の形態】以下、図面を用いてこの発明の実
施形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0008】図1は請求項1又は2記載の発明の一実施
形態に係るデバッグシステムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a debugging system according to an embodiment of the present invention.

【0009】図1において、デバッグシステムは、プロ
グラム開発設計時に特定の処理単位として設定された関
数を含み、この関数が関数単位でデバッグされるターゲ
ットプログラムを実行するターゲットプロセッサとなる
MCU1と、デバッグ対象となる関数のスタートアドレ
ス(B)とMCU1のプログラムカウンタ(PC)値
(C)を受けて両者を比較し、比較結果(G)として両
者が一致した時に一致結果のパルス信号を出力し、かつ
予め入力された指示にしたがってトレースデータの収集
を行う場合には収集を指示するアドレス比較回路2と、
アドレス比較回路2から出力される一致結果を受けて、
MCU1から所定のレジスタ値(F)として出力される
レジスタ書き換え情報、ならびにMUC1から出力され
るアドレスバス値(D)、データバス値(E)を参照し
て、例えばサブルーチンとなっている関数の実行が終了
した時にメインルーチンへの戻りアドレスとなるリター
ンアドレス(J)を取得するリターンアドレス取得回路
3と、リターンアドレス取得回路3で取得されたリター
ンアドレスとMCU1のプログラムカウンタ値を受けて
両者を比較し、比較結果(H)として両者が一致した時
に一致結果のパルス信号を出力し、かつトレースデータ
の収集を行っている場合にはトレースデータ収集の停止
を指示するリターンアドレス比較回路4と、リターンア
ドレス比較回路4から出力される一致結果を受けて、M
CU1から与えられる所定のレジスタのレジスタ書き換
え情報となるレジスタ値(F)、又はこの値とMUC1
のアドレスバス値ならびにデータバス値を参照して求め
られる関数終了後のリターン値と予め入力された関数エ
ラー条件(A)とを比較することにより実行が終了した
デバッグ対象の関数のエラーを判別し、比較結果(I)
としてエラーの発生の有無に応じてトレースデータの保
存/破棄、もしくはプログラム実行のブレークを指示す
る関数エラー条件比較回路5を備えて構成される。
In FIG. 1, a debug system includes a function set as a specific processing unit at the time of program development design, and this function is an MCU 1 serving as a target processor for executing a target program to be debugged in function units; Upon receiving the start address (B) of the function and the program counter (PC) value (C) of the MCU1, the two are compared, and when they match, a pulse signal of the matching result is output when they match, and An address comparing circuit 2 for instructing collection when collecting trace data according to a previously input instruction;
Upon receiving the match result output from the address comparison circuit 2,
Referring to the register rewrite information output from the MCU 1 as the predetermined register value (F) and the address bus value (D) and the data bus value (E) output from the MUC 1, for example, execution of a subroutine function Return address acquisition circuit 3 that acquires a return address (J) that is a return address to the main routine when the process is completed, and receives the return address acquired by the return address acquisition circuit 3 and the program counter value of the MCU 1 and compares them. And a return address comparison circuit 4 for outputting a pulse signal of the coincidence result when the two coincide with each other as the comparison result (H), and instructing to stop the collection of the trace data when the trace data is being collected; In response to the matching result output from the address comparing circuit 4, M
A register value (F) serving as register rewrite information of a predetermined register given from CU1, or this value and MUC1
By comparing the return value after completion of the function, which is obtained by referring to the address bus value and the data bus value, with the function error condition (A) input in advance, the error of the debug target function whose execution has been completed is determined. , Comparison result (I)
And a function error condition comparison circuit 5 for instructing storage / discarding of trace data or a break in program execution according to the presence or absence of an error.

【0010】このような構成において、デバッグを行う
前にまず、例えば図2に示すように、デバッガによりデ
バッグ情報に記述されている関数一覧表を画面に表示
し、デバッグ作業者がデバッグしようとするそれぞれの
関数単位でエラーの条件、トレースデータ取得の有無、
ブレークの有無を入力する。図2において、デバッガに
より画面に表示されたそれぞれのサブルーチン名の関
数、sub1、sub2、sub3に対して、例えば関
数sub1では、トレースデータを取得し、エラー条件
としてリターン値(sub1)<0とし、エラー発生時
にブレークは行わないと入力設定し、関数sub2で
は、トレースデータは取得せず、エラー条件としてリタ
ーン値(sub2)=NULLとし、エラー発生時にブ
レークすると入力設定し、関数sub3では、トレース
データを取得し、エラー条件としてグローバル変数(g
Int)<0とし、エラー発生時にブレークは行わない
と入力設定する。
In such a configuration, before debugging, first, as shown in FIG. 2, for example, a function list described in the debug information is displayed on a screen by a debugger, and the debugger attempts to debug. Error conditions for each function, whether or not to acquire trace data,
Enter whether there is a break. In FIG. 2, with respect to the functions of subroutines sub1, sub2, and sub3 displayed on the screen by the debugger, for example, the function sub1 acquires trace data, and sets a return value (sub1) <0 as an error condition, An input is set so that a break is not performed when an error occurs. In the function sub2, no trace data is acquired. As an error condition, a return value (sub2) = NULL is set. And the global variable (g
Int) <0, and an input is set so that a break is not performed when an error occurs.

【0011】このような入力設定が終了した後、トレー
スデータの取得が入力設定された場合のデバッガ及びシ
ミュレータによる上記デバッグシステムの動作を図3に
示す出力信号タイミングチャートを参照して説明する。
The operation of the debug system by the debugger and the simulator when the acquisition of the trace data is set after the input setting is completed will be described with reference to an output signal timing chart shown in FIG.

【0012】まず、デバッグしようとする関数のスター
ト(先頭)アドレスがアドレス比較回路2に設定登録さ
れ、同時に関数のエラー条件が関数エラー条件比較回路
5に設定登録される。このような状態で、デバッグしよ
うとする関数を含むターゲットプログラムがMCU1で
実行され、ターゲットプログラムの実行が進みプログラ
ムカウンタ値がアドレス比較回路2に設定登録された関
数のスタートアドレスと比較されて両者が一致すると、
MCU1の所定のレジスタ書き換え情報、又はMCU1
のレジスタ書き換え情報、アドレスバス値及びデータバ
ス値に基づいてリターンアドレス取得回路3によりリタ
ーンアドレスが取得される。またこれと同時に、トレー
スデータの収集開始が図3に示すようなパルス信号とし
てトレース回路(図示せず)に与えられて指示される。
First, the start (head) address of the function to be debugged is set and registered in the address comparison circuit 2, and at the same time, the error condition of the function is set and registered in the function error condition comparison circuit 5. In such a state, the target program including the function to be debugged is executed by the MCU 1, the execution of the target program proceeds, and the program counter value is compared with the start address of the function set and registered in the address comparison circuit 2. If they match,
Predetermined register rewrite information of MCU1, or MCU1
The return address is obtained by the return address obtaining circuit 3 based on the register rewriting information, the address bus value and the data bus value. At the same time, the start of the trace data collection is given as a pulse signal as shown in FIG. 3 to a trace circuit (not shown) and instructed.

【0013】ここで、リターンアドレスの取得方法は、
ターゲットプロセッサとなるMCU1により異なる。リ
ンクレジスタ方式を採用しているプロセッサでは、特定
のレジスタにリターンアドレスがセットされるので、そ
のレジスタの書き換え情報からリターンアドレスを特定
する。一方、スタック方式を採用しているプロセッサに
あっては、スタックメモリにリターンアドレスがセット
されるので、直前のスタックメモリ書き換え情報ならび
にMCU1のアドレスバス値、データバス値からリター
ンアドレスを特定する。
Here, the method of obtaining the return address is as follows.
It depends on the MCU 1 that is the target processor. In a processor employing the link register method, a return address is set in a specific register, and the return address is specified from the rewrite information of the register. On the other hand, in a processor adopting the stack method, the return address is set in the stack memory. Therefore, the return address is specified from the immediately preceding stack memory rewrite information and the address bus value and data bus value of the MCU 1.

【0014】次に、取得されたリターンアドレスはリタ
ーンアドレス比較回路4に入力され、このリターンアド
レスとプログラムカウンタ値とがリターンアドレス比較
回路4で比較され、デバッグ対象の関数の実行が終了し
て両者が一致すると、トレースデータの収集の停止が図
3に示すようなパルス信号としてトレース回路に与えら
れて指示される。またこれと同時に、上述したように関
数エラー条件比較回路5に設定登録されたエラー条件が
判別され、エラーが発生している場合に、トレースデー
タを保存するためのパルス信号が関数エラー条件比較回
路5から比較結果(I)として出力され、トレースデー
タが一時保持トレースバッファに記憶されるようにして
いる場合は一時保持トレースバッファに記憶されたトレ
ースデータが共通トレースバッファに移し替えられ、又
はトレースデータが最初から共通トレースバッファに記
憶されるようにしている場合には書き換え禁止フラグが
設定され、記憶されたトレースデータが抹消されないよ
うにする。一方、エラーが発生していない場合には、ト
レースバッファに記憶されたトレースデータが破棄され
る。
Next, the obtained return address is input to the return address comparison circuit 4, and the return address and the program counter value are compared by the return address comparison circuit 4, and the execution of the function to be debugged is completed. When they match, the stop of the collection of the trace data is given to the trace circuit as a pulse signal as shown in FIG. At the same time, as described above, the error condition set and registered in the function error condition comparison circuit 5 is determined, and when an error occurs, a pulse signal for storing trace data is output to the function error condition comparison circuit. 5 is output as the comparison result (I), and when the trace data is stored in the temporary holding trace buffer, the trace data stored in the temporary holding trace buffer is transferred to the common trace buffer, or Is stored in the common trace buffer from the beginning, a rewrite inhibition flag is set to prevent the stored trace data from being deleted. On the other hand, if no error has occurred, the trace data stored in the trace buffer is discarded.

【0015】このように、上記デバッグシステムを採用
することにより、ターゲットプログラムが実行されて関
数が実行されると、実行された関数のトレースデータが
取得されて関数の実行トレースや引数に使用されるレジ
スタやメモリの状態が記録され、実行された関数にエラ
ーが発生したか否かが判別されるので、従来のようにデ
バッグ作業者が手作業により関数毎にデバッグする手間
が省け、関数を関数単位で容易にデバッグすることが可
能となり、関数のデバッグ効率を向上させることができ
るようになる。
As described above, by employing the above-mentioned debugging system, when the target program is executed and the function is executed, trace data of the executed function is obtained and used for the execution trace and the argument of the function. The state of registers and memory is recorded, and it is determined whether an error has occurred in the executed function.This eliminates the need for a debug worker to manually debug each function as in the past, and replaces the function with a function. Debugging can be easily performed in units, and the debugging efficiency of functions can be improved.

【0016】次に、エラー発生時にブレークが入力設定
された場合のデバッガ及びシミュレータによる上記デバ
ッグシステムの動作を図3に示す出力信号タイミングチ
ャートを参照して説明する。
Next, the operation of the debug system by the debugger and the simulator when a break is set when an error occurs will be described with reference to an output signal timing chart shown in FIG.

【0017】まず、デバッグしようとする関数のスター
ト(先頭)アドレスがアドレス比較回路2に設定登録さ
れ、同時に関数のエラー条件が関数エラー条件比較回路
5に設定登録される。このような状態で、デバッグしよ
うとする関数を含むターゲットプログラムがMCU1で
実行され、ターゲットプログラムの実行が進みプログラ
ムカウンタ値がアドレス比較回路2に設定登録された関
数のスタートアドレスと比較されて両者が一致すると、
MCU1のレジスタ書き換え情報、又はMCU1のレジ
スタ書き換え情報、アドレスバス値及びデータバス値に
基づいてリターンアドレス取得回路3によりリターンア
ドレスが取得される。なお、リターンアドレスの取得方
法は、上述したと同様にして行われる。
First, the start (head) address of the function to be debugged is set and registered in the address comparison circuit 2, and at the same time, the error condition of the function is set and registered in the function error condition comparison circuit 5. In such a state, the target program including the function to be debugged is executed by the MCU 1, the execution of the target program proceeds, and the program counter value is compared with the start address of the function set and registered in the address comparison circuit 2. If they match,
The return address is obtained by the return address obtaining circuit 3 based on the register rewrite information of the MCU 1 or the register rewrite information of the MCU 1, the address bus value, and the data bus value. The method of obtaining the return address is performed in the same manner as described above.

【0018】次に、取得されたリターンアドレスはリタ
ーンアドレス比較回路4に入力され、このリターンアド
レスとプログラムカウンタ値とがリターンアドレス比較
回路4で比較され、デバッグ対象の関数の実行が終了し
て両者が一致すると、関数エラー条件比較回路5に設定
登録されたエラー条件が判別され、エラーが発生してい
る場合には、ブレーク信号が関数エラー条件比較回路5
から比較結果(I)としてMCU1に出力され、これに
よりMCU1の命令実行は停止される。
Next, the obtained return address is input to the return address comparison circuit 4, and the return address is compared with the program counter value by the return address comparison circuit 4, and the execution of the function to be debugged is completed. Are matched, the error condition set and registered in the function error condition comparison circuit 5 is determined. If an error occurs, a break signal is output to the function error condition comparison circuit 5.
Is output to the MCU 1 as the comparison result (I), whereby the instruction execution of the MCU 1 is stopped.

【0019】このように、上記実施形態においては、エ
ラーが発生した際にターゲットプログラムの実行が停止
され、従来のようにデバッグ作業者が手作業により関数
毎にデバッグする手間が省け、関数を関数単位で容易に
デバッグすることが可能となり、関数のデバッグ効率を
向上させることができるようになる。
As described above, in the above-described embodiment, when an error occurs, the execution of the target program is stopped, so that the debug operator does not have to manually debug each function as in the prior art, and the function is replaced with the function. Debugging can be easily performed in units, and the debugging efficiency of functions can be improved.

【0020】[0020]

【発明の効果】以上説明したように、この発明によれ
ば、ターゲットプログラムに含まれる関数を関数単位で
デバッグするデバッグシステムを採用したので、ターゲ
ットプログラムに含まれる関数のデバッグを短時間で容
易に行うことが可能となり、デバッグ作業の効率化を達
成することができる。
As described above, according to the present invention, the debugging system for debugging the functions included in the target program in units of functions is employed, so that the functions included in the target program can be easily debugged in a short time. And the efficiency of the debugging operation can be improved.

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

【図1】請求項1又は2記載の発明の一実施形態に係る
デバッグシステムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a debugging system according to an embodiment of the present invention.

【図2】デバッガによりデバッグ情報に記述された関数
一覧表の画面表示例を示す図である。
FIG. 2 is a diagram showing a screen display example of a function list described in debug information by a debugger.

【図3】図1に示すシステムにおける出力信号のタイミ
ングチャートを示す図である。
FIG. 3 is a diagram showing a timing chart of output signals in the system shown in FIG. 1;

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

1 MCU 2 アドレス比較回路 3 リターンアドレス取得回路 4 リターンアドレス比較回路 5 関数エラー条件比較回路 1 MCU 2 Address comparison circuit 3 Return address acquisition circuit 4 Return address comparison circuit 5 Function error condition comparison circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラム開発設計時に特定の処理単位
として設定された関数を含み、該関数のデバッグ作業が
関数単位で行われるターゲットプログラムを実行するタ
ーゲットプロセッサと、 デバッグ対象となる関数のスタートアドレスとターゲッ
トプロセッサのプログラムカウンタ値を受けて両者を比
較し、両者が一致した時に一致結果を出力し、かつ予め
入力された指示にしたがってトレースデータの収集を指
示する第1の比較回路と、 第1の比較回路から出力される一致結果を受けて、ター
ゲットプロセッサの所定のレジスタ書き換え情報、アド
レスバス値、データバス値に基づいて、デバッグ対象の
関数の実行終了後の戻りアドレスとなるリターンアドレ
スを取得するリターンアドレス取得回路と、 リターンアドレス取得回路で取得されたリターンアドレ
スとターゲットプロセッサのプログラムカウンタ値を受
けて両者を比較し、両者が一致した時に一致結果を出力
し、かつトレースデータ収集の停止を指示する第2の比
較回路と、 第2の比較回路から出力される一致結果を受けて、予め
入力されたエラー条件に基づいて実行が終了したデバッ
グ対象の関数のエラーを判別し、エラーが発生した場合
にはトレースデータの保存を指示するエラー判別回路と
を有することを特徴とするデバッグシステム。
1. A target processor for executing a target program which includes a function set as a specific processing unit at the time of program development design, and a debug operation of the function is performed in function units, a start address of a function to be debugged, A first comparison circuit that receives the program counter value of the target processor, compares the two, outputs a match result when the two match, and instructs to collect trace data according to a previously input instruction; Upon receiving the matching result output from the comparing circuit, a return address to be a return address after the execution of the function to be debugged is obtained based on predetermined register rewrite information, an address bus value, and a data bus value of the target processor. Obtained by return address acquisition circuit and return address acquisition circuit A second comparison circuit that receives the return address and the program counter value of the target processor, compares the two, outputs a match result when they match, and instructs to stop the collection of trace data; Based on the matching result output from the circuit, based on an error condition input in advance, an error of the debug target function that has been executed is determined, and if an error occurs, an error determination instructing saving of trace data is performed. A debugging system, comprising: a circuit;
【請求項2】 プログラム開発設計時に特定の処理単位
として設定された関数を含み、該関数のデバッグ作業が
関数単位で行われるターゲットプログラムを実行するタ
ーゲットプロセッサと、 デバッグ対象となる関数のスタートアドレスとターゲッ
トプロセッサのプログラムカウンタ値を受けて両者を比
較し、両者が一致した時に一致結果を出力する第1の比
較回路と、 第1の比較回路から出力される一致結果を受けて、ター
ゲットプロセッサの所定のレジスタ書き換え情報、アド
レスバス値、データバス値に基づいて、デバッグ対象の
関数の実行終了後の戻りアドレスとなるリターンアドレ
スを取得するリターンアドレス取得回路と、 リターンアドレス取得回路で取得されたリターンアドレ
スとターゲットプロセッサのプログラムカウンタ値を受
けて両者を比較し、両者が一致した時に一致結果を出力
する第2の比較回路と、 第2の比較回路から出力される一致結果を受けて、予め
入力されたエラー条件に基づいて実行が終了したデバッ
グ対象の関数のエラーを判別し、エラーが発生した場合
には予め入力された指示にしたがってターゲットプロセ
ッサのプログラムの実行を停止させるエラー判別回路と
を有することを特徴とするデバッグシステム。
2. A target processor for executing a target program including a function set as a specific processing unit at the time of program development design, and a debug operation of the function is performed on a function basis; a start address of the function to be debugged; A first comparison circuit that receives the program counter value of the target processor and compares the two, and outputs a match result when the two match; a first comparison circuit that receives the match result output from the first comparison circuit; A return address acquisition circuit that acquires a return address that is a return address after the execution of the function to be debugged based on the register rewriting information, the address bus value, and the data bus value of the debugger, and a return address acquired by the return address acquisition circuit. And target processor program counter A second comparison circuit that receives the value and compares the two, and outputs a match result when the two match, and receives a match result output from the second comparison circuit, based on an error condition input in advance. An error discriminating circuit for discriminating an error of the function to be debugged whose execution has been completed and, when an error has occurred, stopping execution of the program of the target processor in accordance with a previously input instruction. .
JP10257032A 1998-09-10 1998-09-10 Debugging system Pending JP2000089977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10257032A JP2000089977A (en) 1998-09-10 1998-09-10 Debugging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10257032A JP2000089977A (en) 1998-09-10 1998-09-10 Debugging system

Publications (1)

Publication Number Publication Date
JP2000089977A true JP2000089977A (en) 2000-03-31

Family

ID=17300804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10257032A Pending JP2000089977A (en) 1998-09-10 1998-09-10 Debugging system

Country Status (1)

Country Link
JP (1) JP2000089977A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271415A (en) * 2002-03-13 2003-09-26 Denso Corp Execution history recording device, brake instruction setting device and program
JP2007249490A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Automatic failure log selection/collection method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271415A (en) * 2002-03-13 2003-09-26 Denso Corp Execution history recording device, brake instruction setting device and program
JP2007249490A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Automatic failure log selection/collection method and apparatus

Similar Documents

Publication Publication Date Title
US6550056B1 (en) Source level debugger for debugging source programs
US20060117224A1 (en) Trace and debug method and system for a processor
US4520440A (en) Test verification of processor architecture having a partial instruction set
JP2000089977A (en) Debugging system
CN114510429B (en) Debugging method, system and medium based on dynamic symbol execution
JPH04310138A (en) Debugging method for data transmitter
JP3645452B2 (en) Program debugging apparatus and recording medium recording program
JP2979553B2 (en) Fault diagnosis method
JP2795332B2 (en) Loop processing error detection device
JPH0581087A (en) Processor monitoring system
JP2754899B2 (en) Return address monitoring circuit of debug device
JPS59183443A (en) Debug device
JPH05204708A (en) Debugger processing system
JPS62109140A (en) Tracing circuit for program processor
JPS6037043A (en) Display device for program state
JPS5977553A (en) Data gathering system
JPH0444973B2 (en)
JPH04134535A (en) Exception information sampling mechanism for multitask program
JPS59161736A (en) Program analyzer
JPS6049442A (en) Microdiagnosis system
JPH01214944A (en) Program traveling information collecting system
JPH04162149A (en) Electronic computer
JP2001265619A (en) Data tracing system
JPS604492B2 (en) calculator
JPH01320547A (en) Program execution information collecting system