JPH08161195A - Address trace storing device and method for generating address trace - Google Patents

Address trace storing device and method for generating address trace

Info

Publication number
JPH08161195A
JPH08161195A JP6301063A JP30106394A JPH08161195A JP H08161195 A JPH08161195 A JP H08161195A JP 6301063 A JP6301063 A JP 6301063A JP 30106394 A JP30106394 A JP 30106394A JP H08161195 A JPH08161195 A JP H08161195A
Authority
JP
Japan
Prior art keywords
address
trace
instruction
memory
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
JP6301063A
Other languages
Japanese (ja)
Inventor
Shoji Nagata
昭二 永田
Akira Miyoshi
明 三好
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP6301063A priority Critical patent/JPH08161195A/en
Publication of JPH08161195A publication Critical patent/JPH08161195A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide an address trace storing device capable of storing an address trace for a long period by the use of smaller capacity. CONSTITUTION: In an address trace generating device for storing execution addresses for a central processing unit (CPU) 101 of a computer in a trace memory 104, an address supplying means 102 receives the information of an execution address 105 from the CPU 101 and supplies the received address to a control means 103. The means 103 receives the sort 106 of an address instruction from the CPU 101 and commands the memory 104 to selectively store an address in accordance with the sort 106 of the instruction. Since an address trace for a long period is stored in the trace memory 104 whose capacity is limited, an exclusive trace memory is made unnecessary.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、計算機処理装置に関
し、特に中央処理装置でのプログラムデバッグに供する
ためのアドレストレース格納装置及びアドレストレース
生成方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer processor, and more particularly to an address trace storage device and an address trace generation method for use in program debugging in a central processing unit.

【0002】[0002]

【従来の技術】従来のアドレストレース格納装置の第1
の方式は、中央処理装置における処理に障害が発生した
ときの解析用に専用のトレースメモリが設置され、該ト
レースメモリに中央処理装置の動作履歴、具体的には実
行アドレスを命令実行毎に記録するものであった。
2. Description of the Related Art A first conventional address trace storage device.
In this method, a dedicated trace memory is installed for analysis when a failure occurs in the processing in the central processing unit, and the operation history of the central processing unit, specifically, the execution address is recorded in the trace memory for each instruction execution. It was something to do.

【0003】また、第2の方式は特開平4−42331
号公報に記載のように、実行アドレスのみを観察し、実
行アドレスが非連続のときトレースメモリへ記録指示す
るようにし、連続的に実行しているときはアドレス記録
を行なわないことで比較的少ない容量のトレースメモリ
で長い期間にわたってのトレースを格納を可能とするも
のである。
The second method is Japanese Patent Laid-Open No. 4-42331.
As described in Japanese Patent Publication, only the execution address is observed, and when the execution address is discontinuous, the recording instruction is given to the trace memory, and when the execution is continuously performed, the address recording is not performed, which is relatively small. The capacity of the trace memory enables the trace to be stored for a long period of time.

【0004】第3の方式は、専用のトレースメモリを持
たない計算機においてデバッガが主記憶装置に対しアド
レストレースを格納することを目的とし、かつ、関数ト
レースを実現することを目的のため、関数の入口点への
到達のみを主記憶装置にトレースするものである。具体
的には、特開平4−42331号公報に記載のように関
数の入口点にブレークポイント設定すなわちトラップ命
令を埋め込み、デバッガがトラップを捕捉し、中断点の
アドレスを主記憶装置に格納することにより関数アドレ
ストレースを実現するものである。
The third method is for the purpose of the debugger to store the address trace in the main memory in a computer that does not have a dedicated trace memory and to realize the function trace. Only the arrival at the entry point is traced to the main memory. Specifically, as described in JP-A-4-42331, a breakpoint setting, that is, a trap instruction is embedded at the entry point of the function, the debugger captures the trap, and the address of the interruption point is stored in the main storage device. The function address trace is realized by.

【0005】なお、第1、第2の方式が第3の方式に比
べ優れている点は、高速なトレースメモリを用いること
によって、被デバッグプログラムをリアルタイム動作さ
せながらアドレストレースを行なうことが可能な点であ
り、第1、第2、第3のいずれの方式も現在は多用され
ている。
Note that the first and second methods are superior to the third method, and by using a high-speed trace memory, it is possible to perform address tracing while operating the program to be debugged in real time. This is a point, and the first, second, and third methods are currently widely used.

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記第
1、第2の方式の課題は、クロック毎または実行アドレ
スの非連続発生毎の実行命令アドレスをすべてトレース
していくため、非常に長い期間にわたってのトレースを
格納することができないという問題点を有していること
であった。あるいは長期間のトレースを格納するために
は極めて大容量のトレースメモリを備える必要が生じる
問題点があった。
However, the problems with the first and second methods are that the execution instruction address is traced every clock or every non-sequential occurrence of the execution address, so that it takes a very long period of time. It has a problem that the trace cannot be stored. Alternatively, there is a problem in that it is necessary to provide an extremely large-capacity trace memory to store the trace for a long period of time.

【0007】また、第1、第2の方式におけるもう一つ
課題は、プログラムのテストの際、初期のテストにおい
ては命令レベルで細かいトレース情報が必要とされる
が、ある程度テストが進み、効率良くテストを行なうた
め関数単位でのトレースを行なう必要があるが、命令実
行毎または、実行アドレス非連続発生毎のアドレストレ
ースが行なわれるため、大容量のトレースメモリが必要
とされる問題点があった。
Another problem with the first and second methods is that in the initial testing of program testing, detailed trace information at the instruction level is required. Although it is necessary to perform tracing in function units to perform the test, there is a problem that a large-capacity trace memory is required because address tracing is performed every time an instruction is executed or each execution address is discontinuously generated. .

【0008】従って本発明は上記問題点に鑑み、その目
的はより小容量で長期間のアドレストレースの格納を可
能ならしめるアドレストレース格納装置を提供すること
にある。
SUMMARY OF THE INVENTION Therefore, in view of the above problems, an object of the present invention is to provide an address trace storage device having a smaller capacity and capable of storing an address trace for a long period of time.

【0009】第3の方式においては関数トレースを実現
することで関数の入口点アドレス以外のアドレスが格納
されることを防いでいる。しかしながら、被デバッグプ
ログラムの全関数にわたっての入口点アドレスを常にデ
バッガが保持する必要があり、主記憶装置を圧迫する問
題点があった。
In the third method, the function trace is realized to prevent the address other than the entry point address of the function from being stored. However, the debugger must always hold the entry point address over all the functions of the program to be debugged, which causes a problem of squeezing the main memory.

【0010】従って本発明は、デバッガが予め被デバッ
グプログラムの入口点アドレスを保持することを不要と
することを可能ならしめるアドレストレース格納装置を
提供するものである。
Therefore, the present invention provides an address trace storage device that makes it unnecessary for the debugger to hold the entry point address of the program to be debugged in advance.

【0011】[0011]

【課題を解決するための手段】前記の目的を達成するた
め、本発明のアドレストレース格納装置は、アドレスト
レースの格納を行なうタイミングを選択的に制御し、ア
ドレストレースの格納を削減するものである。
In order to achieve the above object, the address trace storage device of the present invention selectively controls the timing for storing the address trace, and reduces the storage of the address trace. .

【0012】具体的に請求項1の発明が講じた解決手段
は、計算機中央処理装置の実行アドレスを一時格納し、
記憶手段へのアドレスを供給するアドレス供給手段と、
前記トレースメモリに対し前記アドレス供給手段から供
給されるアドレスを命令の種別によって選択的に格納指
示する制御手段を備える構成とするものである。
Specifically, the solution means taken by the invention of claim 1 temporarily stores the execution address of the computer central processing unit,
Address supply means for supplying an address to the storage means,
A control means is provided for selectively storing and instructing the address supplied from the address supply means to the trace memory according to the type of instruction.

【0013】請求項2の発明は、具体的には、請求項1
の発明の構成に、前記制御手段はCALL命令の分岐先
アドレスのみを選択し格納指示する制御手段を有してい
る構成を付加するものである。
The invention of claim 2 is, specifically, claim 1
In addition to the configuration of the invention described above, the control means adds a configuration having a control means for selecting only a branch destination address of a CALL instruction and instructing storage.

【0014】請求項3の発明は、具体的には、請求項1
の発明の構成に、前記記憶手段はキャッシュオフモード
でアドレス格納されるキャッシュメモリを有している構
成を付加するものである。
The invention of claim 3 is, specifically, claim 1
In addition to the configuration of the invention described above, the storage means has a configuration including a cache memory in which addresses are stored in a cache-off mode.

【0015】また、具体的に請求項4の発明が講じた解
決手段は、被デバッグプログラムの関数呼び出し毎でブ
レークするようプロセッサ状態レジスタを設定し、ブレ
ーク毎にデバッガが主記憶装置に対しアドレストレース
を格納する構成とするものである。
Further, specifically, the solving means devised by the invention of claim 4 sets the processor status register so as to break at every function call of the program to be debugged, and the debugger traces an address to the main memory device at each break. Is configured to be stored.

【0016】[0016]

【作用】請求項1の発明の構成により、アドレストレー
ス格納装置において生成されるアドレストレースがすべ
ての命令実行に対しては行なわなくなり、格納容量は削
減される。
According to the structure of the first aspect of the present invention, the address trace generated in the address trace storage device is not performed for all instruction executions, and the storage capacity is reduced.

【0017】請求項2の発明の構成により、CALL命
令実行においてのみアドレストレースが行なわれるよう
になり、格納容量が削減される。
According to the configuration of the second aspect of the present invention, the address trace is performed only when the CALL instruction is executed, and the storage capacity is reduced.

【0018】請求項3の発明の構成により、アドレスト
レース格納装置において生成されるアドレストレースは
キャッシュオフモードにおけるキャッシュメモリに対し
行なわれるようになり、専用のトレースメモリは不要と
なる。
According to the third aspect of the present invention, the address trace generated in the address trace storage device is performed on the cache memory in the cache off mode, and the dedicated trace memory is unnecessary.

【0019】請求項4の発明の構成により、入口点アド
レス毎にブレークのためのトラップ命令を置く必要はな
いため、このためのデバッガのコード領域及び入口点ア
ドレステーブルのための領域を削減することができるこ
ととなる。
According to the invention of claim 4, it is not necessary to place a trap instruction for a break for each entry point address, and therefore the code area of the debugger for this purpose and the area for the entry point address table are reduced. Will be possible.

【0020】[0020]

【実施例】以下本発明の一実施例のアドレストレース格
納装置について、図面を参照しながら説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An address trace storage device according to an embodiment of the present invention will be described below with reference to the drawings.

【0021】(実施例1)図1は本発明の第1の実施例
におけるアドレストレース格納装置の構成図である。本
実施例のアドレストレース格納装置は、専用のトレース
メモリを用いて命令種別により選択的なアドレストレー
スを行なうものである。
(Embodiment 1) FIG. 1 is a block diagram of an address trace storage device in a first embodiment of the present invention. The address trace storage device of the present embodiment uses a dedicated trace memory to perform selective address trace according to the instruction type.

【0022】101は中央処理装置であり、実行アドレ
ス105をアドレス供給手段102に対し通知する。1
02はアドレス供給手段であり、実行アドレス107を
出力する。104はトレースメモリであり、実行アドレ
ス108を入力し、容量限界まで逐次格納し、容量限界
に達すると先頭に帰って格納する。109、111はア
ドレスバス、110、112はデータバスである。
Reference numeral 101 denotes a central processing unit that notifies the address supply means 102 of the execution address 105. 1
Reference numeral 02 denotes an address supply means, which outputs the execution address 107. Reference numeral 104 denotes a trace memory which inputs the execution address 108 and sequentially stores it up to the capacity limit. When the capacity limit is reached, the trace memory returns to the beginning and is stored. Reference numerals 109 and 111 are address buses, and 110 and 112 are data buses.

【0023】以上構成要素は周知の技術により構成され
ている。以下、本発明の特徴部分について説明する。
The above components are configured by a well-known technique. The features of the present invention will be described below.

【0024】103は、実行アドレス107及び中央処
理装置より命令種別の通知106を受け、命令の種別に
よって実行アドレス108を出力する制御手段である。
命令の種別としては分岐命令、もしくはCALL命令を
特に対象とする。
Reference numeral 103 is a control means for receiving the instruction address notification 106 from the execution address 107 and the central processing unit and outputting the execution address 108 according to the instruction type.
A branch instruction or a CALL instruction is specifically targeted as the instruction type.

【0025】以上のように構成されたアドレストレース
格納装置について、以下図1及び図4を用いてその動作
を説明する。
The operation of the address trace storage device configured as described above will be described below with reference to FIGS. 1 and 4.

【0026】図4(a)はトレースを採取する被デバッ
グプログラムの一例を示すものであって、ロード命令
(LD)、分岐命令(B)、CALL命令、NOP命
令、及びSAVE、RESTORE、RET命令(合計
8命令)が含まれていることが示されている。図4
(b)は、図4(a)の命令列の内、分岐命令の分岐先
アドレスのみをトレースした結果を示す図である。図4
(c)はCALL命令に分岐先アドレスのみをトレース
した結果を示す図である。ここで、分岐命令のみアドレ
スを採取しても、プログラムの実行軌跡は追跡可能であ
る。この場合、実行命令数が8に対しアドレストレース
は3エントリで済むこととなる。
FIG. 4A shows an example of a program to be debugged for collecting a trace, and includes load instruction (LD), branch instruction (B), CALL instruction, NOP instruction, and SAVE, RESTORE, RET instructions. It is shown that (8 instructions in total) are included. FIG.
4B is a diagram showing the result of tracing only the branch destination address of the branch instruction in the instruction sequence of FIG. FIG.
(C) is a diagram showing the result of tracing only the branch destination address in the CALL instruction. Here, the execution locus of the program can be traced even if the address of only the branch instruction is collected. In this case, the number of executed instructions is 8 and the address trace is only 3 entries.

【0027】CALL命令のみのアドレス採取は、関数
アドレストレースを実現することを目的として行なう。
この場合はアドレストレースは1エントリで済むことと
なる。
The address collection of only the CALL instruction is performed for the purpose of realizing the function address trace.
In this case, one address trace is sufficient.

【0028】以上のように本実施例によれば、トレース
メモリに格納されるアドレストレースの量を削減するこ
とができる。
As described above, according to this embodiment, the amount of address traces stored in the trace memory can be reduced.

【0029】(実施例2)図2は本発明の第2の実施例
におけるアドレストレース格納装置の構成図である。本
実施例のアドレストレース生成装置は、専用のトレース
メモリの代わりにキャッシュオフモードでのキャッシュ
メモリを用いて、命令種別により選択的なアドレストレ
ースを行なうものである。図1と異るのは、専用のトレ
ースメモリに代えてキャッシュメモリ204を使用する
点である。図1と同一の機能を有するものには同一の番
号を付してその説明を省略する。
(Second Embodiment) FIG. 2 is a block diagram of an address trace storage device according to a second embodiment of the present invention. The address trace generation device of the present embodiment uses a cache memory in the cache-off mode instead of a dedicated trace memory to perform selective address trace depending on the instruction type. The difference from FIG. 1 is that the cache memory 204 is used instead of the dedicated trace memory. Those having the same functions as those in FIG. 1 are designated by the same reference numerals and the description thereof will be omitted.

【0030】周知のとおり、キャッシュメモリ204は
中央処理装置101と主記憶装置(非図示)の間におか
れる小容量の高速メモリであるが、キャッシュオフモー
ドにおいてキャッシュメモリのメモリセルは通常の高速
メモリと同等であり、制御回路によってトレースメモリ
として動作させることができる。
As is well known, the cache memory 204 is a small-capacity high-speed memory that is placed between the central processing unit 101 and the main memory (not shown). However, in the cache-off mode, the memory cells of the cache memory are normally high-speed. It is equivalent to a memory and can be operated as a trace memory by a control circuit.

【0031】(実施例3)図3は本発明の第3の実施例
におけるアドレストレース格納装置の構成を示す構成図
である。本実施例のアドレストレース生成装置は、主記
憶装置及びデバッガを用いて、関数アドレストレースを
行なうものである。
(Third Embodiment) FIG. 3 is a block diagram showing the arrangement of an address trace storage device according to the third embodiment of the present invention. The address trace generation device of this embodiment performs a function address trace using a main memory device and a debugger.

【0032】301は外部記憶装置であり、被デバッグ
プログラムの入口点アドレステーブル304及び関数群
305を含むロードモジュール306を格納する。
An external storage device 301 stores a load module 306 including an entry point address table 304 of the program to be debugged and a function group 305.

【0033】302は主記憶装置であり、デバッガ30
3によってダウンロードされ関数群本体のコピー307
から成るロードモジュール310を格納する。308は
関数群本体307内の関数であり、入口点アドレステー
ブル304によりその開始アドレスが示される。
Reference numeral 302 denotes a main storage device, which is a debugger 30.
Copy of function group body 307 downloaded by 3
A load module 310 consisting of A function 308 is a function in the function group main body 307, and the start address is indicated by the entry point address table 304.

【0034】デバッガ303は主記憶装置302上のロ
ードモジュール310を起動し、トレース採取のため、
その実行が中断(中断方法については後述する)された
ならば、中断点アドレスをデバッガ内主記憶装置に順次
格納するものである。中断点アドレスは例えばSPAR
Cアーキテクチャであれば、%r15レジスタにその内
容が自動格納される。またインテル8086アーキテク
チャであれば、スタックにその内容が自動格納される。
デバッガはその内容を中断点アドレスとして記憶し、再
開及び中断を順次繰り返し、中断点アドレスを蓄積する
ことで、アドレストレースの機能を実現する。
The debugger 303 activates the load module 310 on the main memory 302 and collects a trace.
When the execution is interrupted (the interrupting method will be described later), the interrupt point address is sequentially stored in the main memory in the debugger. The breakpoint address is, for example, SPAR
With the C architecture, the contents are automatically stored in the% r15 register. Further, in the case of Intel 8086 architecture, the contents are automatically stored in the stack.
The debugger stores the content as an interruption point address, sequentially repeats restart and interruption, and accumulates the interruption point address, thereby realizing the function of the address trace.

【0035】ここで、プロセッサ状態を制御して中断発
生させる方法について説明する。プロセッサ(非図示)
は一般にロードモジュール内の関数308の命令1命令
ずつをフェッチし実行する。フェッチした命令がCAL
L命令の場合は命令のオペランドで示される関数アドレ
スへ分岐する。関数の入口コード309には通常プロロ
ーグコードと呼ばれる定式のコード列が含まれる。プロ
セッサによって方法は異るが、例えばSPARCアーキ
テクチャのプロセッサにおいては必ずSAVE命令がそ
の中に含まれる。そしてWIMレジスタ(状態レジス
タ)を設定することによって、SAVE命令実行時にト
ラップ発生させることができる。このように、関数の入
口すべてにトラップ命令を埋め込む従来方法の代わり
に、プロセッサの状態レジスタを設定することで、関数
の入口点でトラップ発生させることができるようにな
る。
Now, a method of controlling the processor state to generate interruption will be described. Processor (not shown)
Generally fetches and executes each instruction of the function 308 in the load module. The fetched instruction is CAL
In the case of L instruction, it branches to the function address indicated by the operand of the instruction. The function entry code 309 includes a formal code string usually called a prologue code. Although the method differs depending on the processor, for example, in a processor of the SPARC architecture, the SAVE instruction is always included in it. Then, by setting the WIM register (status register), a trap can be generated when the SAVE instruction is executed. Thus, instead of the conventional method of embedding a trap instruction at every entry point of a function, it becomes possible to generate a trap at the entry point of a function by setting the state register of the processor.

【0036】以上のように構成されたアドレストレース
格納装置について、以下図3及び図5を用いてその動作
を説明する。
The operation of the address trace storage device configured as described above will be described below with reference to FIGS. 3 and 5.

【0037】図5(a)はデバッガの処理を示す流れ図
であり、図5(a)に示すように、まず、外部記憶装置
301に格納されるロードモジュール306から関数群
305を取り出し、主記憶装置302上に関数群本体3
08を作成する(ステップS1)。
FIG. 5A is a flow chart showing the processing of the debugger. As shown in FIG. 5A, first, the function group 305 is extracted from the load module 306 stored in the external storage device 301, and the main storage Function group body 3 on device 302
08 is created (step S1).

【0038】次に、上記した様に関数のプロローグコー
ド(入口コード)でブレークするようプロセッサ状態を
設定する(ステップS2)。続いて、被デバッグプログ
ラムを起動(2回目以降のループでは中断点からの再
開)する(ステップS3)。
Next, as described above, the processor state is set so as to break at the prologue code (entry code) of the function (step S2). Then, the program to be debugged is activated (restarting from the interruption point in the second and subsequent loops) (step S3).

【0039】被デバッグプログラムは、ステップS2で
の設定のため各関数の入口点でブレークし、デバッガへ
復帰する。デバッガに復帰したならば、デバッガは例え
ば%r15レジスタ叉はスタックに格納される中断点ア
ドレスをデバッガ内の主記憶装置に格納する(ステップ
S4)。次に、トレースを終了するかどうかを判断し
(ステップ5)、NOならばステップS2へ戻り、YE
Sならば終了する。
The program to be debugged breaks at the entry point of each function for setting in step S2 and returns to the debugger. When returning to the debugger, the debugger stores, for example, the interrupt point address stored in the% r15 register or the stack in the main memory device in the debugger (step S4). Next, it is judged whether or not the trace is to be ended (step 5). If NO, the process returns to step S2, and YE
If S, end.

【0040】図5(b)は、説明に使用した被デバッグ
プログラムが関数呼び出し(ステップS6、ステップS
7)を含む任意の処理ステップから成ることを示してい
る。
In FIG. 5 (b), the program to be debugged used for the explanation calls the function (steps S6, S6).
7) including any processing step including 7).

【0041】図5(c)は各関数は、前記ステップ2の
設定のため、入口点においてブレーク(中断)し、デバ
ッガに復帰し、次のアドレスから再開されることを示し
ている。
FIG. 5C shows that each function breaks (interrupts) at the entry point, returns to the debugger, and restarts from the next address because of the setting in step 2.

【0042】以上のように、本実施例のようにデバッガ
303と主記憶装置302を用い、関数トレースを実現
することができ、このとき、入口点アドレス毎にブレー
クのためのトラップ命令を置く必要はないため、このた
めのデバッガのコード領域を削減することができる。
As described above, the function trace can be realized by using the debugger 303 and the main memory 302 as in the present embodiment, and at this time, it is necessary to place the trap instruction for the break at each entry point address. This reduces the debugger code area for this.

【0043】さらに、本実施例では予め各関数の入口に
トラップ命令を埋め込むため必要だった入口点アドレス
テーブルが不要となるため、トレースメモリの容量をさ
らに大きく取ることができる。
Further, in the present embodiment, the entry point address table, which was required in advance for embedding the trap instruction at the entry of each function, is unnecessary, so that the capacity of the trace memory can be further increased.

【0044】[0044]

【発明の効果】以上説明したように、請求項1、2の発
明に係るアドレストレース格納装置によると、記憶手段
に格納するアドレストレースの量が少なくて済み、より
長期間にわたってアドレストレースを格納することがで
きる。
As described above, according to the address trace storage device of the first and second aspects of the present invention, the amount of address traces stored in the storage means can be small, and the address traces can be stored for a longer period of time. be able to.

【0045】請求項3の発明に係るアドレストレース格
納装置によると、専用のトレースメモリを不要とするこ
とができ、また、キャッシュメモリに格納するアドレス
トレースの量が少なくて済み、より長期間にわたってア
ドレストレースを格納することができる。
According to the address trace storage device of the third aspect of the present invention, a dedicated trace memory can be dispensed with, and the amount of address traces stored in the cache memory can be small, so that the address can be stored for a longer period of time. Traces can be stored.

【0046】また、請求項4の発明に係るアドレストレ
ース生成方法によると、入口点アドレス毎にブレークの
ためのトラップ命令を置く必要はないため、このための
デバッガのコード領域及び入口点アドレステーブルのた
めの領域を削減することができ、トレースメモリの容量
をより大きくとることができる。
Further, according to the address trace generating method of the present invention, it is not necessary to provide a trap instruction for a break for each entry point address. Therefore, the code area of the debugger and the entry point address table for this purpose are set. Area can be reduced, and the capacity of the trace memory can be increased.

【0047】以上のように、本発明によると、容量の限
られたトレースメモリまたはキャッシュメモリもしくは
主記憶装置に長期間のアドレストレースを格納すること
ができ、その効果は大きい。
As described above, according to the present invention, a long-term address trace can be stored in the trace memory, cache memory, or main memory having a limited capacity, and the effect is great.

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

【図1】本発明の第1の実施例に係るアドレストレース
格納装置を示す構成図
FIG. 1 is a configuration diagram showing an address trace storage device according to a first embodiment of the present invention.

【図2】本発明の第2の実施例に係るアドレストレース
格納装置を示す構成図
FIG. 2 is a configuration diagram showing an address trace storage device according to a second embodiment of the present invention.

【図3】本発明の第3の実施例に係るアドレストレース
方法の装置構成を示す構成図
FIG. 3 is a configuration diagram showing a device configuration of an address tracing method according to a third embodiment of the present invention.

【図4】(a)はトレース採取する被デバッグプログラ
ムの一例を示す図 (b)および(c)はトレース結果を示す図
FIG. 4A is a diagram showing an example of a program to be debugged for trace collection. FIGS. 4B and 4C are diagrams showing trace results.

【図5】(a)はアドレストレース格納装置によるデバ
ッガの処理を示す流れ図 (b)はデバッガから起動される被デバッグプログラム
の処理を示す流れ図 (c)は当該被デバッグプログラムにおいて呼び出され
る各関数の処理を示す流れ図
5A is a flowchart showing processing of a debugger by an address trace storage device, FIG. 5B is a flowchart showing processing of a debugged program activated by the debugger, and FIG. 5C is a flowchart of each function called in the debugged program. Flow chart showing processing

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

101 中央処理装置 102 アドレス供給手段 103 制御手段 104 トレースメモリ 105,107,108 実行アドレス 106 制御信号 109,111 アドレスバス 110,112 データバス 204 キャッシュメモリ 301 外部記憶装置 302 主記憶装置 303 デバッガ 304 入口点アドレステーブル 305,307 関数群 306,310 ロードモジュール 101 central processing unit 102 address supply means 103 control means 104 trace memory 105, 107, 108 execution address 106 control signal 109, 111 address bus 110, 112 data bus 204 cache memory 301 external storage device 302 main storage device 303 debugger 304 entry point Address table 305,307 Function group 306,310 Load module

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】記憶手段を有し、計算機中央処理装置の実
行アドレスを一定期間にわたって記録するアドレストレ
ース格納装置であって、 計算機中央処理装置の命令実行毎の実行アドレスを一時
格納し、記憶手段へのアドレスを供給するアドレス供給
手段と、 前記記憶手段に対し前記アドレス供給手段から供給され
るアドレスを格納指示する際に、命令種別を監視するこ
とによって特定の命令のみを選別し格納指示する制御手
段とを備えたことを特徴とするアドレストレース格納装
置。
1. An address trace storage device having a storage means for recording an execution address of a computer central processing unit over a fixed period, and temporarily storing an execution address for each instruction execution of the computer central processing device. Address supply means for supplying an address to the storage means, and control for selecting and storing only a specific instruction by monitoring the instruction type when instructing the storage means to store the address supplied from the address supply means. An address trace storage device comprising:
【請求項2】前記制御手段は、CALL命令の分岐先ア
ドレスのみを選別し格納指示するよう制御することを特
徴とする請求項1記載のアドレストレース格納装置。
2. The address trace storage device according to claim 1, wherein said control means controls so as to select only a branch destination address of the CALL instruction and issue a storage instruction.
【請求項3】前記記憶手段は、キャッシュメモリによっ
て構成され、キャッシュオフモードでアドレストレース
格納を行なうことを特徴とする請求項1記載のアドレス
トレース格納装置。
3. The address trace storage device according to claim 1, wherein said storage means is composed of a cache memory and stores the address trace in a cache off mode.
【請求項4】計算機中央処理装置と主記憶装置とデバッ
ガより成るアドレストレース生成方法であって、 デバッガによるアドレストレース生成処理は、 被デバッグプログラムの関数呼び出し毎でブレークせし
めるようプロセッサ状態を設定するステップと、 被デバッグプログラムを起動または再開するステップ
と、 ブレーク毎にデバッガが主記憶装置に対し、アドレスト
レースを格納するステップとを有していることを特徴と
するアドレストレース生成方法。
4. An address trace generation method comprising a computer central processing unit, a main memory unit and a debugger, wherein the address trace generation processing by the debugger sets a processor state so that a break can be made at each function call of a program to be debugged. An address trace generation method comprising: a step of activating or resuming a program to be debugged; and a step of a debugger storing an address trace in a main memory for each break.
JP6301063A 1994-12-05 1994-12-05 Address trace storing device and method for generating address trace Pending JPH08161195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6301063A JPH08161195A (en) 1994-12-05 1994-12-05 Address trace storing device and method for generating address trace

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6301063A JPH08161195A (en) 1994-12-05 1994-12-05 Address trace storing device and method for generating address trace

Publications (1)

Publication Number Publication Date
JPH08161195A true JPH08161195A (en) 1996-06-21

Family

ID=17892424

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6301063A Pending JPH08161195A (en) 1994-12-05 1994-12-05 Address trace storing device and method for generating address trace

Country Status (1)

Country Link
JP (1) JPH08161195A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007052676A (en) * 2005-08-18 2007-03-01 Nec Corp Method for tracing data and trace module
US8464203B2 (en) 2007-11-09 2013-06-11 Denso Corporation System and program product for executing program to thereby test the program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007052676A (en) * 2005-08-18 2007-03-01 Nec Corp Method for tracing data and trace module
US8464203B2 (en) 2007-11-09 2013-06-11 Denso Corporation System and program product for executing program to thereby test the program

Similar Documents

Publication Publication Date Title
JPH06314213A (en) Debugging device
JP4222370B2 (en) Program for causing a computer to execute a debugging support apparatus and a debugging processing method
KR102025078B1 (en) Diagnosing code using single step execution
GB2281986A (en) Logging program counter on reset.
US20090063907A1 (en) Debugging system, debugging apparatus and method
JP2513417B2 (en) Information processing device
JPH10333939A (en) Microprocessor
EP0638864B1 (en) Development support system for microcomputer with internal cache
JP3260083B2 (en) Debug system and debugging method
JPH08161195A (en) Address trace storing device and method for generating address trace
US6615368B1 (en) System and method for debugging highly integrated data processors
JP2010015364A (en) Multiprocessor system and information processor
JP2000181746A (en) Processor with debug support and debug function execution control method
JP2004318658A (en) Debugging control device and control method thereof
JP2001005689A (en) Trace sampling circuit
JP3449812B2 (en) Control electronics
JP2687750B2 (en) Electronic computer processor
JPH07281924A (en) Trace device and emulator using the trace device
JP2005235047A (en) Power source intermittent disconnection debugging device and recording medium with program for realizing the method recorded thereon
JP2007213415A (en) Memory device
JP2004280789A (en) Semiconductor integrated circuit device, and microcomputer development supporting device
JP2007122547A (en) Program implementation method and shared memory type multicore processor
CN113094098A (en) Interrupt real-time processing micro-architecture
JP2007213396A (en) Debugging system, operation system, debugging method, and program
JPH08263324A (en) Debug facilitation device