JPH05204710A - Event tracer - Google Patents

Event tracer

Info

Publication number
JPH05204710A
JPH05204710A JP4034526A JP3452692A JPH05204710A JP H05204710 A JPH05204710 A JP H05204710A JP 4034526 A JP4034526 A JP 4034526A JP 3452692 A JP3452692 A JP 3452692A JP H05204710 A JPH05204710 A JP H05204710A
Authority
JP
Japan
Prior art keywords
event
event processing
processing address
address
trace
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
JP4034526A
Other languages
Japanese (ja)
Inventor
Kazuya Hashimoto
一也 橋本
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
Priority to JP4034526A priority Critical patent/JPH05204710A/en
Publication of JPH05204710A publication Critical patent/JPH05204710A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize an event trace function reducing influences exerted upon the performance or quality of a program itself subject to debugging. CONSTITUTION:When a user does not activates the trace function, while referring to an event processing address 201, an event processing address recognizing means 101 executes a normal processing by moving execution control to an event processing program 301. When activating the trace function, an event processing address changing means 103 saves the contents of the event processing address 201 to an event processing address 202 before change, and the execution control is moved to an event trace information output means 102 at the time point of generating an event by setting an entry address to the event trace information output means 102. After trace information is outputted, an event processing address recognizing means 104 before change moves the execution control to the contents of the event processing address 202 before change so that event trace information can be collected.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プログラムのデバッグ
方式に関し、特にそのイベントトレース機能に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program debugging method, and more particularly to its event trace function.

【0002】[0002]

【従来の技術】従来、OSのシステムコール等のOSが
サービスする機能を使用して動作するOS状のプログラ
ムや、割込みなどの外部イベントに対して動作するプロ
グラムを含めたシステム全体のプログラムの動作を確認
する方法として、エミュレータ等の高価なハードウェア
でシステムコールの発行履歴や外部イベントの発生状況
などの実行トレースデータを収集し、そのデータをもと
に解析をする方法が公知であった。ところが、この方法
には、実行トレースデータの収集に量的な制約があり、
また、実行トレースデータ中に余分な情報も収集されて
いるため、その中から必要な情報を検索するのは困難で
あった。特に上述のようなシステム全体のプログラムの
動作を確認するためには収集されるデータ量が十分では
なく、効率的ではなかった。
2. Description of the Related Art Conventionally, an operation of a program of the entire system including an OS-like program that operates by using a function provided by the OS such as an OS system call and a program that operates in response to an external event such as an interrupt As a method for confirming the above, there has been known a method of collecting execution trace data such as a history of system call issuance and a situation of occurrence of an external event with expensive hardware such as an emulator, and analyzing based on the data. However, this method has a quantitative limitation in collecting execution trace data,
Further, since extra information is collected in the execution trace data, it is difficult to search for necessary information from the extra information. In particular, the amount of data collected was not sufficient to confirm the operation of the program of the entire system as described above, which was not efficient.

【0003】一方、上述の収集機能をソフトウェアで実
現するためには、OSのシステムコール発行や外部イベ
ント等のイベントが発生した時点と、発生したイベント
に対する終了時点とを捕らえ、次の方法によっていた。
すなわち、第1にその時点に、トレースメッセージを表
示するプログラムを埋め込むか、第2にデバッグシステ
ムを利用し、その時点にブレーク機能を活性化し(ブレ
ークポイントの設定)、該ブレークポイントでブレーク
した後にデバッガコマンドを利用することにより情報を
表示する事で、上述の収集機能を実現していた。
On the other hand, in order to realize the above-mentioned collection function by software, the following method is used by grasping the time when an event such as the issuance of an OS system call or an external event occurs and the time when the event occurs. ..
That is, first, at that point, a program that displays a trace message is embedded, or secondly, the debug system is used to activate the break function (set a breakpoint) at that point, and after a break at the breakpoint, By displaying information by using a debugger command, the above-mentioned collection function was realized.

【0004】しかし、上述の方式には、以下の問題点が
ある。第1の方式では、デバッグが完了した時点で埋め
込んだトレースメッセージ表示用のプログラムを取り外
し、再度、コードを生成する必要があり、そのため再検
査も必要となる。また、トレースメッセージ表示用のプ
ログラム分だけトレース対象プログラム中のメモリ容量
を消費する。一方、第2の方式でひとつのトレース情報
を得るためには、ブレークポイントの設定を行った後、
実行コマンドにより実行再開、ブレークポイントにより
実行停止および表示コマンドによりトレース情報表示を
繰り返す手順でデバッガコマンドを実行する必要があ
る。従って、トレース情報を必要な時点から必要な分だ
け得たい場合にはその必要な時点まで到達するのに時間
がかかったり、あるいはデバッガコマンドの起動回数が
多くなる。また、第2の方式では、トレース情報を収集
するための処理時間が大きく、トレース機能を使用して
いるときの実行速度はトレース機能を使用していないと
きの実行速度と比べ大きい。
However, the above method has the following problems. In the first method, it is necessary to remove the embedded program for displaying the trace message at the time when the debugging is completed, and generate the code again, so that the recheck is also required. Also, the memory capacity in the trace target program is consumed by the program for displaying the trace message. On the other hand, in order to obtain one trace information by the second method, after setting the breakpoint,
It is necessary to execute the debugger command in the sequence of resuming the execution by the execution command, stopping the execution by the breakpoint and displaying the trace information by the display command. Therefore, when it is desired to obtain the required amount of trace information from the required time, it takes a long time to reach the required time, or the debugger command is activated many times. In the second method, the processing time for collecting trace information is long, and the execution speed when the trace function is used is higher than the execution speed when the trace function is not used.

【0005】[0005]

【解決しようとする課題】解決しようとする問題点は、
第1の方法で一つのトレース情報を得るためには、ブレ
ークポイントの設定を行った後、複数の手順を繰り返す
必要があるため、処理時間が長く、かつデバッガコマン
ドの起動回数が多くなるという点であり、第2の方法で
は処理時間が長く、かつ、実行速度が低下する点であ
る。
[Problems to be solved] The problems to be solved are
In order to obtain one trace information by the first method, it is necessary to repeat a plurality of steps after setting a breakpoint, resulting in a long processing time and a large number of debugger command invocations. In the second method, the processing time is long and the execution speed is low.

【0006】[0006]

【課題を解決するための手段】本発明のイベントトレー
ス装置は、デバッグ機能としてデバッグ対象プログラム
のイベント発生状況をトレースする機能を具備するデバ
ッグシステムにおいて、イベントが発生した時点で、イ
ベント処理アドレス認識手段は該イベントに対するイベ
ント処理プログラムのエントリアドレスを示すイベント
処理アドレスを保持し、該イベント処理アドレスを認識
し、該イベント処理アドレスに実行制御を移し、イベン
ト処理アドレス変更手段は変更する以前のイベント処理
アドレスを保存し、該イベント処理アドレスをイベント
トレース情報出力プログラムへのエントリアドレスに変
更し、変更前イベント処理アドレス認識手段はイベント
トレース情報出力プログラムを実行した後、該イベント
処理アドレス変更手段で保存された変更前イベント処理
アドレスを認識し、該変更前イベント処理アドレスに実
行制御を移すことを制御することを特徴とする。
The event trace device of the present invention is a debug system having a function of tracing the event occurrence status of a program to be debugged as a debug function, and when an event occurs, an event processing address recognition means is provided. Holds an event processing address indicating the entry address of the event processing program for the event, recognizes the event processing address, transfers execution control to the event processing address, and the event processing address changing means changes the event processing address before the change. Is stored, the event processing address is changed to an entry address to the event trace information output program, and the pre-change event processing address recognition means executes the event trace information output program and then changes the event processing address. Recognizes the conserved pre-change event processing address stage, and controlling the transfer of the execution control to the pre-change event processing addresses.

【0007】[0007]

【実施例】次に、本発明について図面を参照して説明す
る。図1は、本発明によるイベントトレース装置の一実
施例を示すブロック図である。図1において、101は
イベント処理アドレス認識手段,102はイベント情報
出力手段,103はイベント処理アドレス変更手段,1
04は変更前イベント処理アドレス認識手段,201は
イベント処理アドレス,202は変更前イベント処理ア
ドレス,301はイベント処理プログラムである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of an event trace device according to the present invention. In FIG. 1, 101 is an event processing address recognition means, 102 is an event information output means, 103 is an event processing address changing means, 1
Reference numeral 04 is a pre-change event processing address recognition means, 201 is an event processing address, 202 is a pre-change event processing address, and 301 is an event processing program.

【0008】図1において、イベント処理認識アドレス
認識手段101は、イベント処理アドレス201を認識
し、該イベント処理アドレス201へ実行制御を移す。
イベント情報出力手段102は、イベントが発生したと
いう情報を出力する。イベント処理アドレス変更手段1
03は、イベント処理アドレス201の内容を変更前イ
ベント処理アドレス202に退避し、イベント処理アド
レス認識手段101が参照して、実行制御を移すエント
リアドレスであるイベント処理アドレス201の内容を
変更する。イベント処理アドレス認識手段104は、変
更前イベント処理アドレス202の内容を参照し、該ア
ドレスへ制御を移す。イベント処理プログラム301
は、イベントに対する処理プログラムである。
In FIG. 1, the event processing recognition address recognition means 101 recognizes the event processing address 201 and transfers execution control to the event processing address 201.
The event information output means 102 outputs information that an event has occurred. Event processing address changing means 1
03 saves the contents of the event processing address 201 in the pre-change event processing address 202, and refers to the event processing address recognition means 101 to change the contents of the event processing address 201 which is the entry address to which execution control is transferred. The event processing address recognition unit 104 refers to the contents of the pre-change event processing address 202 and transfers control to the address. Event processing program 301
Is a processing program for an event.

【0009】以下に第1図をもとに本発明の動作を詳細
に説明する。本実施例においては、イベントが発生した
際に、イベントが発生した事をトレースデータとして収
集することとする。まず、トレース機能を活性化しない
場合の処理を説明する。イベントが発生したならば、イ
ベント処理アドレス認識手段101によりイベント処理
アドレス201を参照し、イベント処理301に実行制
御を移す。次に、トレース機能を活性化する場合には、
イベント処理アドレス変更手段103により、イベント
処理アドレス201の内容を変更前イベント処理アドレ
ス202に退避して、イベントトレース情報出力手段1
02のエントリアドレス値をイベント処理アドレス20
1の内容に変更する。
The operation of the present invention will be described in detail below with reference to FIG. In this embodiment, when an event occurs, the occurrence of the event is collected as trace data. First, the processing when the trace function is not activated will be described. When an event occurs, the event processing address recognition means 101 refers to the event processing address 201 and transfers execution control to the event processing 301. Next, when activating the trace function,
The event processing address changing means 103 saves the contents of the event processing address 201 to the pre-change event processing address 202, and the event trace information output means 1
The entry address value of 02 is the event processing address 20
Change to the contents of 1.

【0010】イベントが発生した場合、イベント処理ア
ドレス認識手段101によりイベント処理アドレス20
1を参照する。イベント処理アドレス201には、イベ
ントトレース情報出力手段102へのエントリアドレス
が格納されているので、イベントトレース情報出力手段
102へ実行制御が移り、イベントトレース情報が出力
される。さらに、変更前イベント処理アドレス認識手段
104は、イベント処理アドレス変更手段103により
退避された変更前イベント処理アドレス202を参照し
実行制御を移す。変更前イベント処理アドレス202に
は、イベント処理301へのエントリアドレスが格納さ
れているので、変更前イベント処理アドレス認識手段1
04によりイベント処理301が実行される。
When an event occurs, the event processing address recognition means 101 causes the event processing address 20
Refer to 1. Since the entry address to the event trace information output means 102 is stored in the event processing address 201, execution control is transferred to the event trace information output means 102 and the event trace information is output. Further, the pre-change event processing address recognizing means 104 transfers execution control with reference to the pre-change event processing address 202 saved by the event processing address changing means 103. Since the entry address to the event processing 301 is stored in the pre-change event processing address 202, the pre-change event processing address recognition means 1
Event processing 301 is executed by 04.

【0011】トレース機能を活性化している状態から活
性化しないようにするためには、イベント処理アドレス
変更手段103により、変更前イベント処理アドレス2
02の内容を、イベント処理アドレス201の内容とす
ることにより達成することができ、容易にトレース機能
の制御を行うことができる。
In order to prevent the trace function from being activated from being activated, the event processing address changing means 103 causes the pre-change event processing address 2 to be changed.
The contents of 02 can be achieved by setting the contents of the event processing address 201, and the trace function can be easily controlled.

【0012】[0012]

【発明の効果】以上説明したように本発明は、比較的簡
単な操作により、デバッグ対象プログラム自体の性能や
品質面に大きく影響を与えることなくイベントのトレー
ス機能を提供することができ、システム全体のデバッグ
効率を高めることができる利点がある。また、被デバッ
グ対象プログラムとトレース機能とは独立に存在させる
ことができるため、メモリ容量にも負担をかけず、容易
にトレース機能を取り外すこともできる利点がある。イ
ベント処理アドレス認識手段101を使用し、イベント
処理アドレス201を定義して、イベント処理プログラ
ム301をトレースする対象のプログラム中に存在させ
ることができる。また、イベント情報出力手段102、
変更前イベント処理アドレス認識手段104およびイベ
ント処理アドレス変更手段103を使用し、変更前イベ
ント処理アドレス202を定義してデバッガ内のトレー
ス機能を実現すると、デバッグ対象プログラム自体のプ
ログラム容量や、トレース機能を使用しないときの処理
性能に影響が少ないという利点がある。
As described above, according to the present invention, it is possible to provide an event tracing function without a great influence on the performance and quality of the debug target program by a relatively simple operation. There is an advantage that the debugging efficiency of can be improved. Further, since the program to be debugged and the trace function can exist independently of each other, there is an advantage that the trace function can be easily removed without burdening the memory capacity. The event processing address recognition means 101 can be used to define the event processing address 201 so that the event processing program 301 can be present in the program to be traced. In addition, the event information output means 102,
When the pre-change event processing address recognition means 104 and the event processing address changing means 103 are used to define the pre-change event processing address 202 to realize the trace function in the debugger, the program capacity of the debug target program itself and the trace function are reduced. There is an advantage that the processing performance when not in use is small.

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

【図1】本発明によるイベントトレース装置の一実施例
を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of an event trace device according to the present invention.

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

101 イベント処理アドレス認識手段 102 イベント情報出力手段 103 イベント処理アドレス変更手段 104 変更前イベント処理アドレス認識手段 201 イベント処理アドレス 202 変更前イベント処理アドレス 301 イベント処理プログラム 101 event processing address recognition means 102 event information output means 103 event processing address changing means 104 pre-change event processing address recognition means 201 event processing address 202 pre-change event processing address 301 event processing program

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 イベントが発生した時点で、前記イベン
トに対するイベント処理プログラムのエントリアドレス
を示すイベント処理アドレスを保持し、前記イベント処
理アドレスを認識し、前記イベント処理アドレスに実行
制御を移すためのイベント処理アドレス認識手段と、 変更する以前のイベント処理アドレスを保存し、前記イ
ベント処理アドレスをイベントトレース情報出力プログ
ラムへのエントリアドレスに変更するためのイベント処
理アドレス変更手段と、 前記イベントトレース情報出力プログラムを実行した
後、前記イベント処理アドレス変更手段で保存された変
更前イベント処理アドレスを認識し、 前記変更前イベント処理アドレスに実行制御を移すよう
に制御するための変更前イベント処理アドレス認識手段
と、 イベントが発生したときに情報を出力するためのイベン
トトレース情報出力手段とを備えたイベントトレース装
置。
1. An event for holding an event processing address indicating an entry address of an event processing program for the event when the event occurs, recognizing the event processing address, and transferring execution control to the event processing address. A processing address recognition means, an event processing address changing means for saving the event processing address before the change and changing the event processing address to an entry address to the event trace information output program, and the event trace information output program After execution, the pre-change event processing address recognition means for recognizing the pre-change event processing address stored by the event processing address changing means, and controlling the execution control to be transferred to the pre-change event processing address, and the event Event tracing device and an event trace information output means for outputting the information when an error occurs.
【請求項2】 前記イベントが発生したときには、前記
イベント処理アドレス認識手段により前記イベント処理
アドレスを参照し、前記イベント処理アドレスに格納さ
れた前記イベントトレース情報出力手段のエントリアド
レスにより前記イベントトレース情報が出力されるよう
に構成した請求項1のイベントトレース装置。
2. When the event occurs, the event processing address is recognized by the event processing address recognition means, and the event trace information is recorded by the entry address of the event trace information output means stored at the event processing address. The event trace device according to claim 1, wherein the event trace device is configured to output.
【請求項3】 トレース機能が活性化されていないとき
には前記イベント処理アドレス認識手段から直接的にイ
ベント処理プログラムに実行制御を移し、前記トレース
機能が活性化されているときには所定のトレース機能を
実行してから前記イベント処理プログラムに実行制御を
移すように構成し、かつ、前記トレース機能を活性化状
態から不活性化状態に転ずるには前記変更前イベント処
理アドレスの値をイベント処理アドレスの値に置換して
行うように構成した請求項1のイベントトレース装置。
3. When the trace function is not activated, the execution control is transferred from the event processing address recognition means directly to the event processing program, and when the trace function is activated, a predetermined trace function is executed. After that, the execution control is transferred to the event processing program, and the value of the pre-change event processing address is replaced with the value of the event processing address in order to shift the trace function from the activated state to the inactivated state. The event trace device according to claim 1, wherein the event trace device is configured to perform.
JP4034526A 1992-01-24 1992-01-24 Event tracer Pending JPH05204710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4034526A JPH05204710A (en) 1992-01-24 1992-01-24 Event tracer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4034526A JPH05204710A (en) 1992-01-24 1992-01-24 Event tracer

Publications (1)

Publication Number Publication Date
JPH05204710A true JPH05204710A (en) 1993-08-13

Family

ID=12416721

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4034526A Pending JPH05204710A (en) 1992-01-24 1992-01-24 Event tracer

Country Status (1)

Country Link
JP (1) JPH05204710A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983453B2 (en) 2001-08-30 2006-01-03 International Business Machines Corporation Method and system for obtaining performance data from software compiled with or without trace hooks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983453B2 (en) 2001-08-30 2006-01-03 International Business Machines Corporation Method and system for obtaining performance data from software compiled with or without trace hooks

Similar Documents

Publication Publication Date Title
JPS63111545A (en) Microprocessor for debug
US5572667A (en) Interrupt processing device for controlling the timing of an interrupt signal initiated by a debugging break point in an instruction code
JPH05204710A (en) Event tracer
JP2808757B2 (en) Microprocessor for debugging
JPS62279438A (en) Tracking circuit
JPH0581087A (en) Processor monitoring system
JPH1165884A (en) Microcomputer and debugging method therefor
JPH0283749A (en) Internal interruption control system for microprocessor
JPH0561717A (en) Program debugging device
JPS58182766A (en) Program tracing device
JP2000181746A (en) Processor with debug support and debug function execution control method
JPH0259829A (en) Microcomputer
JPH11119992A (en) Trace controller for firmware
JPS609294B2 (en) Tracing method in electronic computers
JPS59202546A (en) Debugging device
JP2954006B2 (en) Emulation device and emulation method
JPH01137339A (en) Microprocessor
JPS59202550A (en) Debugging device
JPH0581068A (en) Debugging support device
JPH1083316A (en) Multi cpu system
JPS59180755A (en) Tracing system
JPS59202548A (en) Debugging device
JPH0682323B2 (en) Debug microprocessor
JPH04310138A (en) Debugging method for data transmitter
JPS6349942A (en) Arithmetic processing unit