JPH04338841A - Debugger device - Google Patents

Debugger device

Info

Publication number
JPH04338841A
JPH04338841A JP3111276A JP11127691A JPH04338841A JP H04338841 A JPH04338841 A JP H04338841A JP 3111276 A JP3111276 A JP 3111276A JP 11127691 A JP11127691 A JP 11127691A JP H04338841 A JPH04338841 A JP H04338841A
Authority
JP
Japan
Prior art keywords
program
output
correspondence
code
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
Application number
JP3111276A
Other languages
Japanese (ja)
Inventor
Hiroshi Igarashi
寛 五十嵐
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3111276A priority Critical patent/JPH04338841A/en
Publication of JPH04338841A publication Critical patent/JPH04338841A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To attain the output of the easy-to-see display of correspondence between a source program and a translated code by showing the executing flow of a computer program in a diagram and securing the correspondence between the shown executing flow and the code output in regard of the visible display output processing of the computer program. CONSTITUTION:If an output instruction is received when a program 1 is debugged by a conversion result program 2 obtained by giving the prescribed conversion to the program 1, an analyzing part 3 analyzes the executing order of instruction codes for the program 1. Then the part 3 produces a flag 5 by providing successively the prescribed identification signals of the instruction codes forming the program 1 in the executing order. An output part 4 outputs a prescribed graphic showing the graph 5 and a prescribed visible display 6 where the codes of both programs 1 and 2 are set in parallel with each other. Then a correspondence analyzing part 7 analyzes the correspondence relation of the processing routes, and the part 4 adds the analyzing result of the part 7 to the output of the visible display.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は計算機のプログラムをデ
バッグする場合に、必要なプログラム等の可視表示を出
力するためのデバッガ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugger device for outputting a visual display of a necessary program when debugging a computer program.

【0002】0002

【従来の技術と発明が解決しようとする課題】図2(a
)に例示するのは、公知の或るプログラミング言語で記
述された原始プログラムであり、このプログラムをコン
パイラで翻訳して、例えば図2(b)に示すようないわ
ゆるアセンブラ言語で記述されたアセンブリコードを得
る。
[Prior art and problems to be solved by the invention] Figure 2 (a
) is an example of a source program written in a known programming language, and this program is translated by a compiler to produce assembly code written in so-called assembler language, as shown in Figure 2(b). get.

【0003】アセンブリコードをアセンブラで処理して
必要な機械語の目的プログラムを得、目的プログラムを
実行して、原始プログラムに記述したプログラムのデバ
ッグを行なう。
The assembly code is processed by an assembler to obtain a necessary target program in machine language, the target program is executed, and the program written in the source program is debugged.

【0004】そのデバッグを援助するデバッガ装置では
、図2の(a)と(b)を並べて印刷出力或いはディス
プレイ装置等への表示出力を行なって、可視表示の出力
をデバッグの便に供し、利用者はその出力上で原始プロ
グラムとアセンブリコードとの対応を考えて、デバッグ
のための適当な指示等をする。
[0004] A debugger device that assists in debugging prints out (a) and (b) in FIGS. On the output, the person considers the correspondence between the source program and the assembly code and gives appropriate instructions for debugging.

【0005】並列処理計算機で実行するプログラムに変
換する等のために、コンパイラに、公知のトレーススケ
ジューリング(J.R.Ellis著『Bulldog
:A Compiler for VLIWArchi
tectures 』,The MIT Press,
1986) を適用する場合がある。
[0005] In order to convert a program to be executed on a parallel processing computer, a compiler is provided with a well-known trace scheduling method ("Bulldog" by J.R. Ellis).
:A Compiler for VLIWA Archi
The MIT Press,
1986) may be applied.

【0006】その場合には、プログラム中の各処理経路
の実行頻度を適当な方法で評価して、相対的に実行頻度
の高い経路が速く実行できるように、プログラムに必要
な変換を施し、例えば図2(a)の原始プログラムから
、(c)のようなアセンブリコードを生成する。
In that case, the execution frequency of each processing path in the program is evaluated using an appropriate method, and necessary conversions are made to the program so that the paths that are executed relatively frequently can be executed quickly. Assembly code as shown in FIG. 2(c) is generated from the source program in FIG. 2(a).

【0007】図2(c)の例は、一部命令のオペランド
を省略して破線で分岐先を説明してあるように、TRA
CE1のブロックが原始プログラムの条件判定命令で条
件成立時の処理であり、そのブロック内のbranch
命令で条件が成立した場合にはTRACE2のブロック
に分岐し、TRACE2では最後の無条件branch
でTRACE1のブロックに戻る。
In the example of FIG. 2(c), the operands of some instructions are omitted and the branch destinations are illustrated with broken lines.
The block CE1 is the condition judgment instruction of the source program and is the processing when the condition is met, and the branch in that block
If the condition is satisfied in the instruction, it branches to the block of TRACE2, and in TRACE2, it branches to the last unconditional branch.
Return to the TRACE1 block.

【0008】図2の(a)と(b)では、原始プログラ
ムとアセンブリコードとの対応付けは比較的容易である
が、(c)のようになると単にプログラムを並べただけ
では、原始プログラム或いは通常のアセンブリコードと
の対応付けが次第に見難くなる。
In FIGS. 2A and 2B, it is relatively easy to associate the source program with the assembly code, but in FIG. The correspondence with normal assembly code becomes increasingly difficult to see.

【0009】本発明は、プログラムの実行の流れを図示
して、コード出力と対応付けることにより、原始プログ
ラムとして記述したプログラムと、翻訳されたコードと
の対応の見易い表示を出力できるデバッガ装置を目的と
する。
The object of the present invention is to provide a debugger device that can output an easy-to-see display of the correspondence between a program written as a source program and translated code by illustrating the flow of program execution and associating it with code output. do.

【0010】0010

【課題を解決するための手段】図1は、本発明の構成を
示すブロック図である。図はデバッガ装置の構成であっ
て、所与のプログラム1を、プログラム1に所定の変換
を行なった変換結果プログラム2によってデバッグを行
なうに際し、解析部3と、出力部4とを設ける。
Means for Solving the Problems FIG. 1 is a block diagram showing the configuration of the present invention. The figure shows the configuration of a debugger device, which is provided with an analysis section 3 and an output section 4 for debugging a given program 1 using a conversion result program 2 obtained by performing a predetermined conversion on the program 1.

【0011】所定の出力指示があった場合には、解析部
3は、プログラム1の実行上の命令コードの実行順序を
解析し、プログラム1を構成する各該命令コードの所定
の識別記号を該実行順序に従って連接したグラフ5を作
成する。
When there is a predetermined output instruction, the analysis unit 3 analyzes the execution order of the instruction codes in the execution of the program 1, and assigns a predetermined identification symbol to each instruction code constituting the program 1. A connected graph 5 is created according to the execution order.

【0012】出力部4は、グラフ5を表す所定の図形と
、プログラム1のコードと、変換結果プログラム2のコ
ードとを並置した所定の可視表示6を出力する。又、対
応解析部7を有し、対応解析部7は、プログラム1と変
換結果プログラム2との処理経路の対応関係を解析して
、該対応関係を示す情報8を生成し、出力部4は、前記
可視表示の出力の場合に、対応関係情報8を参照するこ
とにより、グラフ5の図形と、プログラム1と、変換結
果プログラム2との各対応する該処理経路ごとに、複数
の異なる所定の表示態様から選択する同一の該表示態様
にして出力する。
The output unit 4 outputs a predetermined visual display 6 in which a predetermined figure representing the graph 5, the code of the program 1, and the code of the conversion result program 2 are juxtaposed. The correspondence analysis unit 7 also includes a correspondence analysis unit 7, which analyzes the correspondence relationship between the processing paths of the program 1 and the conversion result program 2, and generates information 8 indicating the correspondence relationship, and the output unit 4 , in the case of the output of the visual display, by referring to the correspondence relationship information 8, a plurality of different predetermined information are displayed for each corresponding processing path of the graphic of the graph 5, the program 1, and the conversion result program 2. Output is made in the same display mode selected from the display modes.

【0013】[0013]

【作用】本発明のデバッガ装置により、プログラムとし
て例えば図2(a)又は(b)のプログラムを指定して
出力指示すると、指定したプログラムの実行の流れを示
すグラフと、プログラムと、例えば(c)の変換結果プ
ログラムとを並べて出力し、適当な強調表示等を使用し
て、3つの表示の間における処理経路の対応を見易く表
示することもできるようになる。
[Operation] When the debugger device of the present invention specifies and outputs a program such as that shown in FIG. ) can be output side by side with the conversion result programs, and by using appropriate highlighting etc., the correspondence of processing paths among the three displays can be displayed in an easy-to-see manner.

【0014】[0014]

【実施例】図1の解析部3は、所定の出力指示を受ける
と、指定のプログラム1の命令コードを順次解析してグ
ラフ5の情報を作成して出力部4に通知し、又対応関係
を解析する場合には対応解析部7に通知する。
[Example] When the analysis unit 3 in FIG. 1 receives a predetermined output instruction, it sequentially analyzes the instruction codes of the specified program 1, creates information on a graph 5, and notifies the output unit 4, and also When analyzing, the correspondence analysis unit 7 is notified.

【0015】解析部3は、プログラム1が行番号、文番
号又はブロック番号を持つ形式の場合には、それらの何
れかの番号を識別記号とし、又そのような番号が無い場
合その他必要な場合には、各命令コードにプログラム上
の配列順に番号を付けて識別記号とする。
[0015] If the program 1 has a line number, statement number, or block number, the analysis unit 3 uses any of these numbers as an identification symbol, and if there is no such number, it uses it as an identification symbol. , each instruction code is given a number in the order of its arrangement on the program and used as an identification symbol.

【0016】グラフ5の情報は、図3(a)に例示する
ように、識別記号ごとの項に、先行命令記号と後継命令
記号欄を設けて、先行命令記号の欄には、先行する命令
がある場合の1個以上の先行命令コードの識別記号、又
は先行する命令が無いことを示す値を記録し、後継命令
記号欄には、次に進む先の命令がある場合の1個以上の
後継命令コードの識別記号、又は次の命令が無いことを
示す値を記録した構成とする。
As illustrated in FIG. 3(a), the information in graph 5 is provided with preceding instruction symbol and successor instruction symbol columns in the section for each identification symbol, and in the preceding instruction symbol column, the preceding instruction symbol column is provided. Record the identification symbol of one or more preceding instruction codes if there is one, or the value indicating that there is no preceding instruction, and record one or more identification symbols of one or more preceding instruction codes if there is an instruction to proceed to next. The configuration is such that an identification symbol of a successor instruction code or a value indicating that there is no next instruction is recorded.

【0017】図4は解析部3の処理の流れの一例を示し
、処理ステップ10で前記のようにして命令コードの識
別記号を設定すると、処理ステップ11でそれらの識別
記号に対応する項からなる図3(a)のような構成のテ
ーブルを作成し、すべての先行命令記号欄及び後継命令
記号欄を空欄を示す所定値に初期設定する。なお各欄は
所要の最大個数の識別記号を記録できる大きさにする。
FIG. 4 shows an example of the processing flow of the analysis unit 3. When the identification symbols of instruction codes are set as described above in processing step 10, terms corresponding to those identification symbols are set in processing step 11. A table having a configuration as shown in FIG. 3(a) is created, and all preceding instruction symbol columns and successor instruction symbol columns are initialized to predetermined values indicating blank columns. Each column is made large enough to record the required maximum number of identification symbols.

【0018】以上の準備の後、必要な制御情報等を初期
化して、処理ステップ12で全命令コードについて終了
したか識別し、処理する命令コードがあれば先頭から順
に取り上げて、処理ステップ13でその命令の後継命令
を識別する。
After the above preparations, necessary control information etc. are initialized, and in processing step 12 it is determined whether all instruction codes have been completed, and if there are instruction codes to be processed, they are picked up in order from the beginning, and in processing step 13 Identify the successor instruction for that instruction.

【0019】後継命令(一般に判定分岐の命令では複数
個、その他の命令では1個)があれば、処理ステップ1
4で自身の項の後継命令記号欄にそれらの識別記号をす
べて記録する。
If there is a successor instruction (generally multiple for decision branch instructions, one for other instructions), processing step 1
In Step 4, record all of those identification symbols in the successor instruction symbol column of your own section.

【0020】次に処理ステップ15で、今記録したすべ
ての識別記号の項の先行命令記号欄に、自身の識別記号
を記録して処理ステップ12に戻る。又処理ステップ1
3で後継命令が無ければそのまゝ処理ステップ12に戻
る。
Next, in processing step 15, the own identification symbol is recorded in the preceding instruction symbol column of all the identification symbol entries just recorded, and the process returns to processing step 12. Also processing step 1
If there is no successor instruction in step 3, the process directly returns to step 12.

【0021】このようにして、次々にプログラムの命令
コードを1個づつ取り出して処理し、すべての命令コー
ドを処理すれば終了する。以上の処理により、図3(b
)のような原始プログラムから、(a)の内容の情報が
グラフ5として作成される。
[0021] In this way, the instruction codes of the program are successively extracted and processed one by one, and the process ends when all the instruction codes have been processed. Through the above processing, the
) The information of the content of (a) is created as graph 5 from a source program such as (a).

【0022】出力部4は、可視表示の出力において、図
3(b)のようなグラフの情報により、例えば(c)の
ような図形を作成して出力する。対応解析部7は、例え
ばプログラム1の原始プログラムについてコンパイラの
翻訳処理と同様の解析を、実際に翻訳結果を生成するこ
と無く実行することにより、変換結果プログラム2のコ
ードとプログラム1のコードとの対応を示す対応関係情
報8を作成する。対応関係情報8は、例えばプログラム
1の各識別記号と、変換結果プログラム2の行の範囲と
を対応付ける情報とする。
In outputting a visual display, the output unit 4 creates and outputs a figure as shown in FIG. 3(c), for example, based on the graph information shown in FIG. 3(b). For example, the correspondence analysis unit 7 executes an analysis similar to the compiler's translation process on the source program of the program 1 without actually generating a translation result, thereby determining the relationship between the code of the converted program 2 and the code of the program 1. Correspondence information 8 indicating correspondence is created. The correspondence information 8 is, for example, information that associates each identification symbol of the program 1 with the line range of the conversion result program 2.

【0023】出力部4は、前記のようにグラフ5からグ
ラフの図形を生成し、プログラム1及び変換プログラム
2のコードと共に、例えば図5(a)のような形式にし
て出力する。その際に対応関係情報8を参照して、図に
網かけで示すように、処理経路の対応を適当な所定の強
調表示等にして、区別し易くする。
The output unit 4 generates a graph figure from the graph 5 as described above, and outputs it together with the codes of the program 1 and the conversion program 2 in a format as shown in FIG. 5(a), for example. At this time, the correspondence relationship information 8 is referred to, and as shown by the shaded area in the figure, the correspondence of the processing paths is displayed in an appropriate predetermined highlighted manner to facilitate differentiation.

【0024】以上はプログラム1に原始プログラムが指
定された場合であるが、プログラム1が通常のアセンブ
リコードであれば、例えば図5(b)のような可視表示
の出力がほぼ同様の処理によってできる。
The above is a case where a source program is specified as program 1. However, if program 1 is ordinary assembly code, a visual display as shown in FIG. 5(b), for example, can be output by almost the same processing. .

【0025】[0025]

【発明の効果】以上の説明から明らかなように本発明に
よれば、計算機のプログラムのデバッグのために、必要
なプログラム等の可視表示を出力する場合に、プログラ
ムの実行の流れを図示して、コード出力と対応付けるこ
とにより、原始プログラムと、翻訳されたコードとの対
応の見易い表示を出力するので、プログラムデバッグの
作業効率を改善するという著しい工業的効果がある。
[Effects of the Invention] As is clear from the above description, according to the present invention, when outputting a visible display of a necessary program for debugging a computer program, the flow of program execution is illustrated. By associating the output with the code output, an easy-to-read display of the correspondence between the source program and the translated code is output, which has a significant industrial effect of improving work efficiency in program debugging.

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

【図1】  本発明の構成を示すブロック図[Figure 1] Block diagram showing the configuration of the present invention

【図2】 
 プログラムコードの表示例を示す図
[Figure 2]
Diagram showing an example of program code display

【図3】  グラ
フの説明図
[Figure 3] Explanatory diagram of the graph

【図4】  解析部の処理の流れ図[Figure 4] Processing flow diagram of the analysis section

【図5】  本発明の出力例を示す図[Figure 5] Diagram showing an example of the output of the present invention

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

1  プログラム 2  変換結果プログラム 3  解析部 4  出力部 5  グラフ 6  可視表示 7  対応解析部 8  対応関係情報 10〜15  処理ステップ 1 Program 2 Conversion result program 3 Analysis department 4 Output section 5 Graph 6 Visible display 7 Correspondence analysis section 8 Correspondence information 10-15 Processing steps

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  所与のプログラム(1)を、該プログ
ラムに所定の変換を行なった変換結果プログラム(2)
によってデバッグを行なうに際し、解析部(3)と、出
力部(4)とを設け、所定の出力指示があった場合には
、該解析部(3)は、該プログラム(1)実行上の命令
コードの実行順序を解析し、該プログラムを構成する各
該命令コードの所定の識別記号を該実行順序に従って連
接したグラフ(5)を作成し、該出力部(4)は、該グ
ラフ(5)を表す所定の図形と、該プログラム(1)の
コードと、該変換結果プログラム(2)のコードとを並
置した所定の可視表示(6)を出力するように構成され
ていることを特徴とするデバッガ装置。
[Claim 1] A conversion result program (2) obtained by performing a predetermined conversion of a given program (1) into the program.
When performing debugging, an analysis section (3) and an output section (4) are provided, and when a predetermined output instruction is received, the analysis section (3) outputs the instructions for executing the program (1). The execution order of the code is analyzed and a graph (5) is created in which predetermined identification symbols of the instruction codes constituting the program are connected according to the execution order, and the output unit (4) outputs the graph (5). It is characterized by being configured to output a predetermined visual display (6) in which a predetermined figure representing the program, the code of the program (1), and the code of the conversion result program (2) are juxtaposed. Debugger device.
【請求項2】  対応解析部(7)を有し、該対応解析
部は、前記プログラム(1)と前記変換結果プログラム
(2)との処理経路の対応関係を解析して、該対応関係
を示す情報(8)を生成し、前記出力部(4)は、前記
可視表示(6)の出力の場合に、該対応関係情報(8)
を参照することにより、前記グラフ(5)の図形と、該
プログラム(1)と、該変換結果プログラム(2)との
各対応する該処理経路ごとに、複数の異なる所定の表示
態様から選択する同一の該表示態様にして出力する請求
項1記載のデバッガ装置。
2. A correspondence analysis unit (7) is provided, the correspondence analysis unit analyzes the correspondence relationship between the processing paths of the program (1) and the conversion result program (2), and determines the correspondence relationship. The output unit (4) generates information (8) indicating the correspondence relation information (8) in the case of outputting the visible display (6).
By referring to , a plurality of different predetermined display modes are selected for each corresponding processing path of the graphic of the graph (5), the program (1), and the conversion result program (2). 2. The debugger device according to claim 1, wherein the debugger device outputs data in the same display mode.
JP3111276A 1991-05-16 1991-05-16 Debugger device Pending JPH04338841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3111276A JPH04338841A (en) 1991-05-16 1991-05-16 Debugger device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3111276A JPH04338841A (en) 1991-05-16 1991-05-16 Debugger device

Publications (1)

Publication Number Publication Date
JPH04338841A true JPH04338841A (en) 1992-11-26

Family

ID=14557123

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3111276A Pending JPH04338841A (en) 1991-05-16 1991-05-16 Debugger device

Country Status (1)

Country Link
JP (1) JPH04338841A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014141352A1 (en) * 2013-03-11 2014-09-18 株式会社 日立製作所 System controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5714954A (en) * 1980-07-02 1982-01-26 Mitsubishi Electric Corp Program debugging device of computer
JPS60167042A (en) * 1984-02-08 1985-08-30 Matsushita Electric Ind Co Ltd Program editing device
JPS61249149A (en) * 1985-04-26 1986-11-06 Mitsubishi Electric Corp Program tracing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5714954A (en) * 1980-07-02 1982-01-26 Mitsubishi Electric Corp Program debugging device of computer
JPS60167042A (en) * 1984-02-08 1985-08-30 Matsushita Electric Ind Co Ltd Program editing device
JPS61249149A (en) * 1985-04-26 1986-11-06 Mitsubishi Electric Corp Program tracing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014141352A1 (en) * 2013-03-11 2014-09-18 株式会社 日立製作所 System controller

Similar Documents

Publication Publication Date Title
US5504902A (en) Multi-language generation of control program for an industrial controller
JPH1165845A (en) Device and method for detecting and displaying stall
JPH04338841A (en) Debugger device
JPH09230915A (en) Programming device
JPS62113244A (en) Program test device
US20020062208A1 (en) Method and apparatus for visualization of microprocessor pipeline operation
JPH03150633A (en) Instruction decoder
US5838953A (en) Information processing apparatus
JPH0334021A (en) Converting method for program language
JP2731572B2 (en) Logic simulation method
JPH0423102A (en) Programming device for programmable controller
JPH03144832A (en) Symbolic debugging device for precompiler language program
JP2855694B2 (en) Automatic program converter
JPS62135958A (en) Simulation system
JPH05127945A (en) Program execution situation analysis system
JPS6033640A (en) Data monitoring system
JPH064348A (en) Program debugging system
JPS62290939A (en) Dynamic replacement system for execution instruction
JPH0792771B2 (en) Program execution status display system
JPS63289654A (en) Program branching instruction monitoring system
JPS6051949A (en) Control device
JPH02247742A (en) Test program forming processing system
JPH0350640A (en) Trace information editing system for execution program
JPH02148327A (en) Lisp programming device using flow chart
JPH03266029A (en) List output method in logical type language processing system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980421