JPS61196338A - Scope designating device for debugging information output - Google Patents
Scope designating device for debugging information outputInfo
- Publication number
- JPS61196338A JPS61196338A JP60037324A JP3732485A JPS61196338A JP S61196338 A JPS61196338 A JP S61196338A JP 60037324 A JP60037324 A JP 60037324A JP 3732485 A JP3732485 A JP 3732485A JP S61196338 A JPS61196338 A JP S61196338A
- Authority
- JP
- Japan
- Prior art keywords
- debug
- debugging
- instruction
- source program
- call instruction
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、コンパイル時にデバック・オプションが指定
された場合には、デバック・オプションで指定された範
囲のデバック情報を出力するできるようになったプログ
ラムを生成するデバック情報出力の範囲指定装置に関す
るものである。[Detailed Description of the Invention] [Field of Industrial Application] The present invention is capable of outputting debug information within the range specified by the debug option when the debug option is specified at compile time. This invention relates to a range specification device for outputting debugging information for generating programs.
ソース・プログラムを読み込んで文に内部文番号を付加
し、デバック・オプションでデバックが指定されている
場合には指定された範囲についてデバック情報を出力で
きるプログラムを生成するようになったデバック情報出
力の範囲指定装置である。Debug information output now reads a source program, adds internal statement numbers to statements, and generates a program that can output debug information for the specified range if debug is specified in the debug option. It is a range specification device.
プログラムのデバックをする際にデバック情報を取るこ
とは公知である。デバック情報とは例えば次のようなも
のである。いま下記のようなプログラムがあったと仮定
する。It is well known to obtain debug information when debugging a program. For example, the debug information is as follows. Suppose you have a program like the one below.
A=0.0 GOTo 10 1 B=0.0 10 c=o、。A=0.0 GOTo 10 1 B=0.0 10 c=o,.
Go TO1
このようなプログラムがあった場合、デバック情報とは
、/ A=o、o / TRACE 10 / C・0
.0 / TRACEI/B=0.0/というものであ
る。Go TO1 If there is such a program, the debug information is / A = o, o / TRACE 10 / C・0
.. 0/TRACEI/B=0.0/.
デバック情報を収集する方法としては、下記の2つの方
法が知られている。The following two methods are known as methods for collecting debug information.
(al デバック・オプションを指定して収集する。(Al Specify the debug option and collect.
(b) ソース・プログラムの中にデバック情報を収
集する文を挿入する。(b) Insert a statement to collect debugging information into the source program.
しかしくa)の方法ではデバック情報を出力する範囲を
指定できず、文全体についてデバック情報が出力される
のでデバック情報が多く出力されるという欠点があり、
(′b)の方法はいちいち文を挿入するのが面倒である
という欠点がある。However, in method a), it is not possible to specify the range for which debugging information is output, and debugging information is output for the entire sentence, so a large amount of debugging information is output.
Method ('b) has the disadvantage that it is troublesome to insert sentences one by one.
本発明は、上記の考察に基づ(ものであって、所望の範
囲についてだけデバック情報を得ることが出来ること及
びプログラムの中にデバック情報を収集するための文を
プログラマ−が挿入する必要のないこと等の特徴を有す
るデバック情報出力の範囲指定装置を提供することを目
的としている。The present invention is based on the above considerations, and is based on the fact that debugging information can be obtained only for a desired range, and that the programmer does not need to insert statements for collecting debugging information into a program. It is an object of the present invention to provide a range specification device for outputting debugging information, which has the characteristics of not having any debugging information.
そしてそのため本発明のデバック情報出力の範囲指定装
置は、ソース・プログラムの文を読込む読込み手段と、
該読込み手段によって読込まれた ゛ソース・プログラ
ムの文に内部文番号を付加する内部文番号付加手段と、
デバック開始命令の実行により実行を開始してデバック
情報を収集すると共にデバック終了命令の実行により実
行が終了される命令列を生成する命令列生成手段と、デ
バック・オプションのデバック範囲情報並びにデバック
開始呼出命令及びデバック終了呼出命令の生成規則を参
照して対象となる文の前又は後にデバック開始呼出命令
又はデバック終了呼出命令を挿入する必要があるか否か
を判定する内部文番号判定手段と、該内部文番号判定手
段によって指定されたデバック開始呼出命令又はデバッ
ク終了呼出命令を生成する手段とを具備することを特徴
とするものである。Therefore, the debug information output range specifying device of the present invention includes a reading means for reading statements of a source program;
internal statement number adding means for adding an internal statement number to a statement of the source program read by the reading means;
An instruction string generation means that starts execution by executing a debug start instruction, collects debug information, and generates an instruction string whose execution is terminated by executing a debug end instruction, and debug range information and debug start call of the debug option. internal statement number determining means for determining whether it is necessary to insert a debug start call instruction or a debug end call instruction before or after a target statement by referring to generation rules for instructions and debug end call instructions; The present invention is characterized by comprising means for generating a debug start call instruction or a debug end call instruction specified by the internal statement number determination means.
以下、本発明を図面を参照しつつ説明する。 Hereinafter, the present invention will be explained with reference to the drawings.
第1図は本発明の1実施例を説明するための図である。FIG. 1 is a diagram for explaining one embodiment of the present invention.
デバック・オプションの記述形式はDEBtlG (
(ISN 1:ISN 2 ) )というものである。The debug option description format is DEBtlG (
(ISN 1:ISN 2)).
ここで、ISN lはデバック情報の収集を開始する位
置を示す内部文番号(INTERNAL 5EQUEN
CE NUMBER)または行識別番号であり、ISN
2はデバック情報の収集を終了する位置を表す内部文
番号又は行識別番号である。ISN 1及びISN 2
を省略した場合にはプログラム全体がデバック情報収集
の対象になる。Here, ISN l is the internal statement number (INTERNAL 5EQUEN
CE NUMBER) or line identification number, ISN
2 is an internal statement number or line identification number indicating the position at which the collection of debugging information ends. ISN 1 and ISN 2
If is omitted, the entire program will be subject to debug information collection.
第1図において、1はソース読込み装置、2はISN付
加装置、3はISM判定装置、4はデバック命令の生成
装置、5は文の処理装置をそれぞれ示している。ソース
読込み装置1によりソース・プログラムの文を読み込み
、ISN付加装置2により読み込んだ文に内部文番号を
付加する。そして、ISM判定装置3によりデバック開
始呼出命令又はデバック終了呼出命令を生成するか否か
を判定する。生成する必要がある場合にはデバック開始
呼出命令又はデバック終了呼出命令を生成装置4により
生成し、これをソースプログラムの中に埋め込み、しか
る後に処理装置5によりソース・プログラムをオブジェ
クト・プログラムに変換する。In FIG. 1, 1 is a source reading device, 2 is an ISN adding device, 3 is an ISM determining device, 4 is a debug instruction generating device, and 5 is a statement processing device. A source reading device 1 reads sentences of a source program, and an ISN adding device 2 adds an internal statement number to the read sentences. Then, the ISM determining device 3 determines whether to generate a debugging start calling command or a debugging end calling command. If it is necessary to generate a debug start call instruction or a debug end call instruction, the generation device 4 generates it, embeds it in the source program, and then the processing device 5 converts the source program into an object program. .
なお、デバック情報を収集するための命令列はコンパイ
ル時にデバック・オプションが指定されているならば生
成されるものとしている。It is assumed that the instruction sequence for collecting debug information is generated if the debug option is specified at the time of compilation.
第2図はソース・プログラムとデバック開始呼出命令及
びデバック終了呼出命令が埋め込まれたソース・プログ
ラムを示す図である。第2図では、デバック・オプショ
ンによって内部文番号4ないし5の範囲がデバック情報
を収集すべきことが指定されている。デバック・オプシ
ョン及び後述の生成規則に従ってCALL DEBUG
−START (デバ・7り開始呼出命令)及びCAL
L DEBUG−END (デバック終了呼出命令)を
生成する。ISN 欄のx印はコンパイラが生成したソ
ース・イメージ命令列を表す。DEBIJG−5TAR
T命令はデバック情報を出力するための命令列をこれ以
後有効とするものであり、Bll!BUG−END命令
はデバック情報を出力するための命令列をこれ以後無効
とするものである。FIG. 2 is a diagram showing a source program and a source program in which a debug start call instruction and a debug end call instruction are embedded. In FIG. 2, the debug option specifies that the range of internal statement numbers 4 to 5 should collect debug information. CALL DEBUG according to debug options and production rules described below
-START (device start call command) and CAL
Generate L DEBUG-END (debug end call instruction). The x mark in the ISN column represents the source image instruction string generated by the compiler. DEBIJG-5TAR
The T instruction makes the instruction sequence for outputting debugging information valid from now on, and Bll! The BUG-END instruction invalidates the instruction sequence for outputting debug information from now on.
CALL DEBUG−3TART及びCALL DE
BUG−ENDの生成規則は下記のようなものである。CALL DEBUG-3TART and CALL DE
The generation rules for BUG-END are as follows.
(111NS Lで指定された文が実行文ならばCAL
L DEBUG−5TART命令列を生成する。(111NS If the statement specified by L is an executable statement, CAL
Generate L DEBUG-5TART instruction sequence.
(2)外部呼出しく CALL文または関数引用)の文
のISN値がl5NIとISN 2の間ならば、外部呼
出しの後ニCALL DEBtlG−START命令列
を生成する。(2) If the ISN value of the external call (CALL statement or function quotation) is between 15NI and ISN 2, a CALL DEBtlG-START instruction sequence is generated after the external call.
(311SN 2で指定された文が実行文ならば、CA
LL DEBtlG−END命令列を生成する。(If the statement specified in 311SN 2 is an executable statement, CA
LL DEBtlG-END instruction sequence is generated.
(4) 5(IBROUTINI!またはFUNCTI
ON文のISN値がISN 1とISN 2の間でない
ならば、これらのプロローグ・コードの部分にCALL
DEBtlG−END命令列を生成する。(4) 5 (IBROUTINI! or FUNCTI
If the ISN value of the ON statement is not between ISN 1 and ISN 2, CALL
Generate a DEBtlG-END instruction sequence.
(5)最初の実行文のISN値がISN l値より小さ
いならばCALL DEBUG−END命令列を生成す
る。(5) If the ISN value of the first executable statement is smaller than the ISN l value, generate a CALL DEBUG-END instruction sequence.
以上の説明から明らかなように、本発明によれば、所望
の部分のデバック情報を容易に収集することが出来る。As is clear from the above description, according to the present invention, debug information of a desired portion can be easily collected.
第1図は本発明の1実施例を説明する図、第2図はソー
ス・プログラムとデバック情報を収集するための命令が
埋め込まれたソース・プログラムを示す図である。
l・・・ソース読込み装置、2・・・ISN付加装置、
3・・・ISN判定装置、4・・・デバック命令の生成
装置、5・・・文の処理装置。FIG. 1 is a diagram for explaining one embodiment of the present invention, and FIG. 2 is a diagram showing a source program and a source program in which instructions for collecting debug information are embedded. l... Source reading device, 2... ISN adding device,
3... ISN determination device, 4... Debugging instruction generation device, 5... Statement processing device.
Claims (1)
み手段によって読込まれたソース・プログラムの文に内
部文番号を付加する内部文番号付加手段と、デバック開
始命令の実行により実行を開始してデバック情報を収集
すると共にデバック終了命令の実行により実行が終了さ
れる命令列を生成する命令列生成手段と、デバック・オ
プションのデバック範囲情報並びにデバック開始呼出命
令及びデバック終了呼出命令の生成規則を参照して対象
となる文の前又は後にデバック開始呼出命令又はデバッ
ク終了呼出命令を挿入する必要があるか否かを判定する
内部文番号判定手段と、該内部文番号判定手段によって
指定されたデバック開始呼出命令又はデバック終了呼出
命令を生成する手段とを具備することを特徴とするデバ
ック情報出力の範囲指定装置。A reading means for reading statements of the source program, an internal statement number adding means for adding an internal statement number to the statements of the source program read by the reading means, and a debugging device that starts execution by executing a debugging start command Reference is made to an instruction string generation means that collects information and generates an instruction string whose execution is terminated by executing a debug end instruction, debug range information of the debug option, and generation rules for a debug start call instruction and a debug end call instruction. internal statement number determination means for determining whether it is necessary to insert a debug start call instruction or a debug end call instruction before or after a target statement; and a debug start call specified by the internal statement number determination means. 1. A debugging information output range specifying device, comprising: means for generating a command or a debugging end call command.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60037324A JPS61196338A (en) | 1985-02-26 | 1985-02-26 | Scope designating device for debugging information output |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60037324A JPS61196338A (en) | 1985-02-26 | 1985-02-26 | Scope designating device for debugging information output |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS61196338A true JPS61196338A (en) | 1986-08-30 |
Family
ID=12494472
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60037324A Pending JPS61196338A (en) | 1985-02-26 | 1985-02-26 | Scope designating device for debugging information output |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS61196338A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63291136A (en) * | 1987-05-22 | 1988-11-29 | Fujitsu Ltd | System for preparing object program |
| JPH03271839A (en) * | 1990-03-20 | 1991-12-03 | Hitachi Ltd | Program behavior analysis method |
-
1985
- 1985-02-26 JP JP60037324A patent/JPS61196338A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63291136A (en) * | 1987-05-22 | 1988-11-29 | Fujitsu Ltd | System for preparing object program |
| JPH03271839A (en) * | 1990-03-20 | 1991-12-03 | Hitachi Ltd | Program behavior analysis method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6029222A (en) | Method and processor for selectively marking instructions as interruptible or uninterruptible and judging interrupt requests based on the marked instruction | |
| IL100992A (en) | Error reporting for translated code execution | |
| JP4462676B2 (en) | Program conversion device, compiler device, and computer-readable recording medium recording program conversion program | |
| JPH06202903A (en) | Cpu simulation and cpu simulator | |
| JPH0461380B2 (en) | ||
| JPH06324883A (en) | CPU simulator | |
| JP4712925B2 (en) | Compilation processing apparatus and computer-readable program recording medium | |
| JPH02165339A (en) | compilation device | |
| JPH06242958A (en) | Compilation system | |
| JPH1139155A (en) | Static analysis method of execution performance via collection of information in compiling mode | |
| JPH0635752A (en) | Analysis program generation system | |
| JP2864589B2 (en) | Function value difference output system | |
| JP2786689B2 (en) | Compiler processing method | |
| JPH03111943A (en) | Variable output range specification system | |
| JPS5668878A (en) | Data processor | |
| JPS63116247A (en) | Program debugging system | |
| JPS63244141A (en) | Trace system for macro-call | |
| JPH023830A (en) | Selection system for precision/performance on mathematics built-in function execution time | |
| JP2000132405A (en) | Inline expansion processing apparatus and method | |
| JPH02211542A (en) | Module management information calculating system | |
| JPH0239331A (en) | Debug sentence producing device | |
| JPH06103082A (en) | Synchronous input/output statement analytic processing system | |
| JPH05250210A (en) | Program trace system | |
| JPS55162153A (en) | Information processor | |
| JPH0561687A (en) | Processing system for compiler |