JPH07319729A - Software debugging method - Google Patents

Software debugging method

Info

Publication number
JPH07319729A
JPH07319729A JP6106420A JP10642094A JPH07319729A JP H07319729 A JPH07319729 A JP H07319729A JP 6106420 A JP6106420 A JP 6106420A JP 10642094 A JP10642094 A JP 10642094A JP H07319729 A JPH07319729 A JP H07319729A
Authority
JP
Japan
Prior art keywords
source program
object code
address
line
program
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
JP6106420A
Other languages
Japanese (ja)
Inventor
Yuji Tanaka
裕二 田中
Tamotsu Sasaki
保 佐々木
Akinori Koizumi
昭典 小泉
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.)
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Computer Engineering 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 Hitachi Ltd, Hitachi Computer Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP6106420A priority Critical patent/JPH07319729A/en
Publication of JPH07319729A publication Critical patent/JPH07319729A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To verify a program to be verified in exactly the same state as the program to be built in a real product by showing a source program row to which the address of an object code is assigned and another source program row to which the address of the object code is not assigned on a display device after discriminating both rows from each other based on the inputted information. CONSTITUTION:The information on the corresponding relation between the address of an object code 6 produced in the optimization processing step when a source program 4 to be verified is compiled and the row number of the program 4 is inputted through a keyboard 2 before the start of execution of the processing that is carried out based on the code 6 that compiled the program 4. Then the row of the program 4 to which the address of the code 6 is assigned and another row of the program 4 to which the address of the code 6 is not assigned are discriminated from each other based on the information inputted through the keyboard 2 and shown on a display device 1 to the display instruction of the program 4. Thus the program 4 can be verified with high efficiency.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ソフトウェア開発作業
で開発したプログラムの検証を行うソフトウェアデバッ
グ方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a software debugging method for verifying a program developed in software development work.

【0002】[0002]

【従来の技術】一般に、新規に作成したソースプログラ
ムの検証に際しては、該ソースプログラムをコンパイラ
によってコンパイルしてオブジェクトコードに変換し、
これをデバッガに実行させることにより設計通りに動作
するかどうかを確認する方法が採られる。そして、設計
通りに動作することが確認されたソースプログラムは実
製品に組み込まれて出荷される。
2. Description of the Related Art Generally, when verifying a newly created source program, the source program is compiled by a compiler and converted into an object code,
A method of confirming whether or not it works as designed by causing the debugger to execute it is adopted. Then, the source program, which is confirmed to operate as designed, is incorporated into the actual product and shipped.

【0003】この場合に、近年のコンパイラにあっては
最適化技術が向上し、ソースプログラムの複数行を一括
して最適化するため、ソースプログラムの行単位にオブ
ジェクトコードのアドレスが対応するのではなく、複数
行のソースプログラムが複数行のアドレスに対応すると
いったコンパイル方式になっている。
In this case, the optimization technique has improved in recent compilers, and a plurality of lines of the source program are collectively optimized, so that the address of the object code corresponds to each line of the source program. Instead, the compilation method is such that a multi-line source program corresponds to multi-line addresses.

【0004】従って、このようなコンパイル方式にあっ
ては、検証対象のソースプログラムの行とオブジェクト
コードのアドレスとが1対1に対応しなくなる部分が生
じる。
Therefore, in such a compiling method, there is a portion in which the line of the source program to be verified and the address of the object code do not have a one-to-one correspondence.

【0005】しかし、このような部分が生じると、デバ
ッグ作業において任意のソースプログラム行nまで実行
した結果を検証しようとする場合に、そのソースプログ
ラム行nに対応するオブジェクトコードのアドレスが存
在しない時には、実行を停止させるオブジェクトコード
のアドレス(ブレークポイント)を設定できなくなる。
However, if such a portion occurs, when an attempt is made to verify the result of execution up to an arbitrary source program line n in debugging work, and the address of the object code corresponding to the source program line n does not exist, , It becomes impossible to set the address (breakpoint) of the object code that stops execution.

【0006】そこで、従来は、デバッグ作業段階におい
ては、(1)UNIXのシンボリックデバッガ(sd
b)に代表されるようにコンパイラの最適化処理を抑止
した状態で作成したオブジェクトコードでデバッグを行
うか、(2)ブレークポイントをテスト担当者が予測
し、その予測したブレークポイントまで実行させる、と
いったデバッグ方法を採用し、このデバッグ作業におい
て設計通りに動作することが確認されたならば、実製品
に組み込むという手法を用いている。
Therefore, conventionally, in the debugging work stage, (1) UNIX symbolic debugger (sd
As shown in b), debug with the object code created with the optimization processing of the compiler suppressed, or (2) the tester predicts the breakpoint and executes up to the predicted breakpoint. The following debugging method is adopted, and if it is confirmed that the operation works as designed in this debugging work, it is incorporated into the actual product.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、コンパ
イラの最適化処理を抑止した状態で作成したオブジェク
トコードでデバッグを行った場合、設計通りに動作する
ことが確認されたとしても、実製品に組み込まれるプロ
グラムとは異なるプログラムをデバッグしたことにな
り、厳密には実製品に組み込まれるプログラムを検証し
たとは言えないという問題がある。
However, when debugging is performed with the object code created in a state where the optimization processing of the compiler is suppressed, even if it is confirmed that the object code operates as designed, it is incorporated into the actual product. This means that a program different from the program has been debugged, and strictly speaking, it cannot be said that the program incorporated in the actual product has been verified.

【0008】また、テスト担当者が予測したブレークポ
イントまで実行させる方法を採った場合、1回の予測で
目的のブレークポイントに的中することは少ないので、
何回も予測のブレークポイントを設定する操作を繰り返
さなければならなくなり、作業効率が悪いという問題が
ある。
Further, when the method in which the tester executes up to the predicted breakpoint is adopted, it is unlikely that one prediction hits the target breakpoint.
There is a problem in that work efficiency is poor because the operation of setting a prediction breakpoint must be repeated many times.

【0009】本発明の目的は、検証対象のプログラムを
実製品に組み込まれるプログラムと全く同じ状態で検証
することができ、かつその検証作業を効率良く行うこと
ができるソフトウェアデバッグ方法を提供することであ
る。
An object of the present invention is to provide a software debugging method capable of verifying a program to be verified in exactly the same state as a program incorporated in an actual product, and performing the verification work efficiently. is there.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、基本的には、検証対象のソースプログラ
ムをコンパイルしたオブジェクトコードに従う処理の実
行開始前に、検証対象のソースプログラムのコンパイル
時の最適化処理段階において作成されたオブジェクトコ
ードのアドレスと、ソースプログラム行番号との対応関
係を示す情報を入力し、ソースプログラムの表示指示に
対し、オブジェクトコードのアドレスが割り当てられた
ソースプログラム行と割り当てられないソースプログラ
ム行とを前記情報に基づいて区別して表示装置に表示さ
せる段階を設けたことを特徴とする。
In order to achieve the above object, the present invention is basically based on the verification of the source program to be verified before the execution of the process according to the object code obtained by compiling the source program to be verified. Input the information indicating the correspondence between the address of the object code created in the optimization processing stage at compile time and the line number of the source program, and the source program to which the address of the object code is assigned to the display instruction of the source program. The present invention is characterized in that a step of displaying on the display device a line and an unassigned source program line are distinguished based on the information.

【0011】[0011]

【作用】上記手段によると、オブジェクトコードのアド
レスと、ソースプログラム行番号との対応関係を示すテ
ーブルの情報に基づき、オブジェクトコードのアドレス
が割り当てられたソースプログラム行についてはアドレ
スが割り当てられない他のソースプログラム行と区別し
て各行の内容が表示装置に表示される。
According to the above means, the address is not assigned to the source program line to which the address of the object code is assigned based on the information of the table showing the correspondence between the address of the object code and the source program line number. The contents of each line are displayed on the display device separately from the source program line.

【0012】従って、コンパイル時に最適化処理を実行
し、ソースプログラム行とオブジェクトコードのアドレ
スとが1対1に対応しなくなる部分が生じたとしても、
オブジェクトコードのアドレスが割り当てられたソース
プログラム行(以下、有効行と言い、アドレスが割り当
てられないソースプログラム行は無効行と言う)が明確
になるので、テスト担当者は有効行のみを指定して実行
停止指示または実行開始指示を行うことが可能になる。
Therefore, even if the source code line and the address of the object code do not have a one-to-one correspondence with each other when the optimization process is executed at the time of compilation,
Since the source program line to which the address of the object code is assigned (hereinafter referred to as the valid line, the source program line to which the address is not assigned is referred to as the invalid line) becomes clear, the tester must specify only the valid line. It becomes possible to give an execution stop instruction or an execution start instruction.

【0013】従って、最適化処理を抑止することなく、
すなわち実装置に組み込むプログラムと同じ状態で検証
対象プログラムを検証することができる。また、有効行
を予測する必要がなくなるので、1回の指示操作のみで
有効行での実行停止または実行開始を実現することがで
きる。
Therefore, without suppressing the optimization process,
That is, the verification target program can be verified in the same state as the program installed in the actual device. Further, since it is not necessary to predict the effective row, it is possible to realize the execution stop or the execution start in the effective row with only one instruction operation.

【0014】[0014]

【実施例】以下、本発明を図示する実施例に基づいて詳
細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to illustrated embodiments.

【0015】図1は、本発明を実施する装置の一実施例
を示すブロック構成図である。
FIG. 1 is a block diagram showing an embodiment of an apparatus for carrying out the present invention.

【0016】図において、1はディスプレイ、2はキー
ボード、3はワークステーションであり、このワークス
テーション3の内部には、検証対象のソースプログラム
4をコンパイルしてオブジェクトコード6を作成すると
共に、最適化処理時においてオブジェクトコード6のア
ドレスと、ソースプログラム4の行番号との対応関係を
示す情報7(以下、シンボル情報7と言う)を作成する
コンパイラ5と、ソースプログラム4の検証に際して、
ソースプログラム4およびオブジェクトコード6並びに
前記シンボル情報7を読み込み、オブジェクトコード6
に従った処理を実行すると共に、オブジェクトコード6
のアドレスが割り当てられたソースプログラム行(有効
行)については無効行と区別して各行の内容をディスプ
レイ1に表示させるソフトウェアデバッガ8が設けられ
ている。
In the figure, 1 is a display, 2 is a keyboard, and 3 is a workstation. Inside the workstation 3, a source program 4 to be verified is compiled to create an object code 6 and is optimized. When verifying the source program 4, a compiler 5 that creates information 7 (hereinafter referred to as symbol information 7) indicating the correspondence between the address of the object code 6 and the line number of the source program 4 during processing,
The source program 4 and the object code 6 and the symbol information 7 are read, and the object code 6
Object code 6 while executing the processing according to
A source program line (valid line) to which the address is assigned is provided with a software debugger 8 which distinguishes the line from the invalid line and displays the contents of each line on the display 1.

【0017】図2は、ソースプログラム4、オブジェク
トコード6、シンボル情報7の例およびソフトウェアデ
バッガ8の詳細構成を示す図であり、ソースプログラム
4は行番号4aが行の先頭位置に記述され、その後に処
理内容を示す文字情報が記述されている。
FIG. 2 is a diagram showing an example of the source program 4, the object code 6, the symbol information 7 and the detailed structure of the software debugger 8. In the source program 4, the line number 4a is described at the beginning position of the line, and then the line number 4a is described. The character information indicating the processing content is described in.

【0018】このソースプログラム4をコンパイルした
オブジェクトコード6は、命令語6bとオペランド6c
とで構成され、各オブジェクトコード行には、その格納
アドレスを示すアドレス情報6aが割り当てられてい
る。
The object code 6 obtained by compiling the source program 4 has an instruction word 6b and an operand 6c.
Address information 6a indicating the storage address is assigned to each object code line.

【0019】さらに、シンボル情報7を登録するテーブ
ルには、オブジェクトコード行のアドレス情報6aと、
オブジェクトコード行に対応するソースプログラム4の
行番号とが対になって登録されている。
Further, in the table for registering the symbol information 7, the address information 6a of the object code line,
The line number of the source program 4 corresponding to the object code line is registered as a pair.

【0020】一方、ソフトウェアデバッガ8は、ソース
プログラム表示処理8a、行番号判別処理8b、行番号
補正処理8c、デバッグ処理8dとからなり、デバッグ
処理8dはさらにブレークポイント処理8d1、変数等
の表示処理8d2などから構成されている。
On the other hand, the software debugger 8 comprises a source program display process 8a, a line number discrimination process 8b, a line number correction process 8c and a debug process 8d. The debug process 8d further includes a breakpoint process 8d1 and a variable display process. 8d2 and the like.

【0021】図3は、以上の構成においてソースプログ
ラム4を検証する手順を示すフローチャートである。
FIG. 3 is a flowchart showing a procedure for verifying the source program 4 in the above configuration.

【0022】まず、検証対象となるソースプログラム4
をコンパイラ5に読み込ませ、コンパイル処理を行う
が、この際に、最適化処理を行い、かつソフトウェアデ
バッガ8を使用するかどうかをテスト担当者からの入力
情報によって判定する(ステップ30)。最適化処理を
行い、かつソフトウェアデバッガ8を使用する場合は、
ソースプログラム4をコンパイラ5に読み込ませ、コン
パイル処理を実行させ、オブジェクトコード6を生成さ
せる(ステップ31、32)。
First, the source program 4 to be verified
Is read into the compiler 5 and the compiling process is performed. At this time, it is determined whether the optimizing process is performed and whether the software debugger 8 is used, based on the input information from the tester (step 30). When performing the optimization process and using the software debugger 8,
The source program 4 is read by the compiler 5, the compilation process is executed, and the object code 6 is generated (steps 31 and 32).

【0023】同時に、コンパイラ5の最適化処理過程に
おいてオブジェクトコード6のアドレス6aと、ソース
プログラム4の行番号4aとの対応関係を示すシンボル
情報7を作成させる。
At the same time, in the optimization process of the compiler 5, the symbol information 7 indicating the correspondence between the address 6a of the object code 6 and the line number 4a of the source program 4 is created.

【0024】一方、最適化処理を行わない旨の指示があ
った場合、最適化処理が抑止された状態でコンパイル処
理が実行される(ステップ33)。
On the other hand, if there is an instruction not to perform the optimization processing, the compilation processing is executed with the optimization processing suppressed (step 33).

【0025】これにより、例えば図2の例のソースプロ
グラム4においては、最適化処理の指示があった場合、
ソースプログラム4の行番号4aの19行目から20行
目はオブジェクトコード6のアドレス「85E8」から
「85F4」、行番号4aの21行目から24行目はア
ドレス「85F8」から「8630」に対応するという
具合に、複数行を一括して最適化処理が行われる。
As a result, for example, in the source program 4 of the example of FIG. 2, when the optimization processing is instructed,
The 19th to 20th lines of the line number 4a of the source program 4 are changed from addresses "85E8" to "85F4" of the object code 6, and the 21st to 24th lines of the line number 4a are changed from addresses "85F8" to "8630". The optimizing process is collectively performed on a plurality of lines in a corresponding manner.

【0026】次に、ソフトウェアデバッガ8に対して起
動コマンドが入力され、ソフトウェアデバッガ8が起動
されると(ステップ34)、ソフトウェアデバッガ8は
検証対象となるソースプログラム4、そのオブジェクト
コード6を読み込むと共に、シンボル情報7を読み込む
(ステップ35)。
Next, when a start command is input to the software debugger 8 and the software debugger 8 is started (step 34), the software debugger 8 reads the source program 4 to be verified and its object code 6 and , Symbol information 7 is read (step 35).

【0027】次に、ソフトウェアデバッガ8はソースプ
ログラム4の表示コマンド(ソース表示指示)がキーボ
ード2から入力されているかどうかを判定し、入力され
ていれば、ソフトウェアデバッガ8のソースプログラム
表示処理8aは、図2に示すように、ソースプログラム
4の各行に行番号4aを付加してディスプレイ1に表示
する(ステップ36、37)。
Next, the software debugger 8 determines whether or not the display command (source display instruction) of the source program 4 has been input from the keyboard 2, and if so, the source program display processing 8a of the software debugger 8 is executed. As shown in FIG. 2, the line number 4a is added to each line of the source program 4 and displayed on the display 1 (steps 36 and 37).

【0028】その際、シンボル情報7を検索し、シンボ
ル情報7の中に行番号4aと一致するものがある場合
は、行番号4aに記号4b(例えば"#(シャープ)"記
号)を付加して表示し、アドレス情報6aが割り当てら
れない他の行と区別して認識可能なように表示する。
At this time, the symbol information 7 is searched, and if there is a match in the symbol information 7 with the line number 4a, a symbol 4b (for example, "# (sharp)" symbol) is added to the line number 4a. The address information 6a is displayed so as to be distinguishable from other lines to which the address information 6a is not assigned.

【0029】この表示に対し、ソースプログラム4を最
終ステップ以前の任意のステップで実行を一時停止さ
せ、その段階における実行結果を検証するために、実行
停止ステップに対応するソースプログラム行の番号4a
がキーボード2からブレークポイントとして設定され、
かつ実行開始指示が入力されたならば、ソフトウェアデ
バッガ8はオブジェクトコード6に従う処理を順次実行
する(ステップ38,39)。
In response to this display, the execution of the source program 4 is temporarily stopped at any step before the final step, and in order to verify the execution result at that stage, the source program line number 4a corresponding to the execution stop step is displayed.
Is set as a breakpoint from keyboard 2,
When the execution start instruction is input, the software debugger 8 sequentially executes the processing according to the object code 6 (steps 38 and 39).

【0030】ソフトウェアデバッガ8のブレークポイン
ト処理8d1は、キーボード2から予め設定されたブレ
ークポイント(有効行番号)をシンボル情報7を参照し
て対応するアドレス情報に変換し、オブジェクトコード
6の実行アドレス情報6aとが一致するかどうかを監視
しているが、両者が一致した場合(ステップ41)、そ
のアドレス情報6aで示されるオブジェクトコードを実
行した段階でデバッグ処理を一時停止させる(ステップ
41)。
The breakpoint processing 8d1 of the software debugger 8 converts the preset breakpoint (effective line number) from the keyboard 2 into the corresponding address information with reference to the symbol information 7, and the execution address information of the object code 6. It is monitored whether or not 6a and 6a match, but if they match (step 41), the debugging process is temporarily stopped at the stage when the object code indicated by the address information 6a is executed (step 41).

【0031】しかし、一致しない場合(すなわち実行ア
ドレスがブレークポイントでない場合)は、最終アドレ
スかどうかを判定し(ステップ42)、最終アドレスで
あれば全てのデバッグ作業を終了させる。
However, if they do not match (that is, if the execution address is not a breakpoint), it is judged whether or not it is the final address (step 42), and if it is the final address, all debugging work is terminated.

【0032】例えば、ソフトウェアデバッガ8で行番号
4aによる実行停止操作あるいは実行開始操作を行う場
合、図2の例のソースプログラム4の19行目、21行
目等の先頭行はソースプログラム4とアドレス情報6a
との対応がとれるので、実行停止操作等を有効なものと
することができるが、22行目から24行目までは対応
するオブジェクトコード6のアドレス情報6aが不明と
なるため、これらの行に対する実行停止操作等は無効と
扱われてしまう。
For example, when the software debugger 8 performs an execution stop operation or an execution start operation with the line number 4a, the first line of the source program 4 in the example of FIG. Information 6a
Therefore, the execution stop operation and the like can be made effective, but the address information 6a of the corresponding object code 6 is unknown from the 22nd line to the 24th line. Execution stop operations are treated as invalid.

【0033】そこで、上記のように、オブジェクトコー
ド6のアドレス6aが割り当てられているソースプログ
ラム4の行番号4a、すなわち有効行を記号4bで明示
し、この有効行をブレークポイントとして指定させるよ
うにする。
Therefore, as described above, the line number 4a of the source program 4 to which the address 6a of the object code 6 is assigned, that is, a valid line is clearly indicated by the symbol 4b, and this valid line is designated as a breakpoint. To do.

【0034】これによって、コンパイル時に最適化処理
を実行し、ソースプログラム行とオブジェクトコードの
アドレスとが1対1に対応しなくなる部分が生じたとし
ても、オブジェクトコードのアドレスが割り当てられた
ソースプログラム行が明確になるので、テスト担当者は
有効行のみを指定して実行停止指示または実行開始指示
を行うことが可能になる。
As a result, even if a portion where the source program line and the address of the object code do not have a one-to-one correspondence when the optimization process is executed at the time of compilation, the source program line to which the address of the object code is assigned is generated. Since it becomes clear, the tester can specify the valid line only and give the execution stop instruction or the execution start instruction.

【0035】ここで、ステップ38においてブレークポ
イントを設定した場合、テスト担当者がアドレス情報6
aを割り当てられたソースプログラム行(有効行)を必
ず指定するとは限らない。また、ソースプログラム表示
処理8aは、図5に示すようにオブジェクトコード6の
みをディスプレイ1に表示させるモードを備えている
が、このモードにおいては有効行を正確に指示すること
はできない。
Here, when a breakpoint is set in step 38, the tester sets the address information 6
The source program line (valid line) to which a is assigned is not always specified. Further, the source program display process 8a has a mode in which only the object code 6 is displayed on the display 1 as shown in FIG.

【0036】そこで、本実施例にあっては、テスト担当
者によってブレークポイントが設定された場合、それが
有効行に対応しているのかどうかを行番号判別処理8b
においてシンボル情報7との照合によって判別し、有効
行に対応している場合にはそのままブレークポイント処
理8d1に引き渡すが、無効行に対応していた場合は、
行番号補正処理8cに引渡し、ここで直前の有効行を示
す番号に補正した後にブレークポイント処理8d1に引
き渡すようになっている。
Therefore, in the present embodiment, when a break point is set by the tester, it is determined whether or not the break point corresponds to a valid line by the line number discrimination processing 8b.
In the case where it is determined by the collation with the symbol information 7 and it corresponds to the valid line, it is passed to the breakpoint processing 8d1 as it is, but when it corresponds to the invalid line,
It is passed to the line number correction process 8c, where it is corrected to a number indicating the immediately preceding valid line, and then passed to the break point process 8d1.

【0037】例えば、図2の例において、ブレークポイ
ントとして行番号「22」が設定された場合は、これを
行番号「21」に補正してブレークポイント処理8d1
に引き渡す。
For example, in the example shown in FIG. 2, when the line number "22" is set as a breakpoint, the line number "21" is corrected to break point processing 8d1.
Hand over to.

【0038】これにより、ブレークポイント処理8d1
では、ブレークポイントとして設定された行番号をシン
ボル情報7によって対応するアドレス情報6aに変換
し、このアドレス情報6aで示されるアドレスが実行さ
れた段階でデバッグ作業を一時停止させることになる。
As a result, the breakpoint processing 8d1
Then, the line number set as the breakpoint is converted into the corresponding address information 6a by the symbol information 7, and the debugging work is temporarily stopped when the address indicated by the address information 6a is executed.

【0039】この場合、行番号を補正した時には直前の
有効行で一時停止させることを警告メッセージや警告音
でテスト担当者に通知する。
In this case, when the line number is corrected, the test person is notified by a warning message or a warning sound that the line is temporarily stopped at the last valid line.

【0040】なお、デバッグ途中で一時停止させる場合
に限らず、途中から再開する場合についても同様に実行
させることができる。
It should be noted that not only the case of temporarily stopping during the debugging but also the case of resuming from the middle can be executed similarly.

【0041】従って、本実施例によれば、コンパイル時
に最適化処理を実行し、ソースプログラム行とオブジェ
クトコードのアドレスとが1対1に対応しなくなる部分
が生じたとしても、オブジェクトコードのアドレスが割
り当てられたソースプログラム行が明確になるので、テ
スト担当者は有効行のみを指定して実行停止指示または
実行開始指示を行うことが可能になる。
Therefore, according to the present embodiment, even if there is a portion where the source program line and the address of the object code do not have a one-to-one correspondence when the optimization process is executed at the time of compilation, the address of the object code is Since the assigned source program line is clarified, the tester can specify the valid line only to give the execution stop instruction or the execution start instruction.

【0042】この結果、最適化処理を抑止することな
く、すなわち実装置に組み込むプログラムと同じ状態で
検証対象プログラムを検証することができる。また、有
効行を予測する必要がなくなるので、1回の指示操作の
みで有効行での実行停止または実行開始を実現すること
ができる。
As a result, the verification target program can be verified without suppressing the optimization process, that is, in the same state as the program installed in the actual device. Further, since it is not necessary to predict the effective row, it is possible to realize the execution stop or the execution start in the effective row with only one instruction operation.

【0043】また、アドレスが割り当てられないソース
プログラム行での実行停止指示または実行開始指示に対
しては、オブジェクトコードアドレスが割り当てられて
いる直前のソースプログラムの行番号に補正した後、オ
ブジェクトコードに従う処理を実行させているので、テ
スト担当者が無効行を指定した場合でも、その操作が無
効にならず、確実に一時停止させることができ、作業効
率の低下を防止できる。
For an instruction to stop execution or an instruction to start execution in a source program line to which an address is not assigned, the line number of the source program immediately before the object code address is assigned is corrected and then the object code is followed. Since the process is executed, even if the tester designates an invalid line, the operation is not invalidated, the operation can be reliably stopped, and the work efficiency can be prevented from lowering.

【0044】なお、実施例においては、有効行と無効行
とを#記号によって区別しているが、これに限らず、輝
度、色などを変える方法によって区別するようにしても
よい。
In the embodiment, the valid line and the invalid line are distinguished by the # symbol. However, the invention is not limited to this, and the distinction may be made by a method of changing the brightness, the color or the like.

【0045】また、ソースプログラム4の表示形態とし
ては、図4に示すように、最適化処理単位でソースプロ
グラムの内容と対応するオブジェクトコードとを1対に
して表示させるようにしてもよい。
As a display form of the source program 4, as shown in FIG. 4, the contents of the source program and the corresponding object code may be displayed as a pair for each optimization processing.

【0046】[0046]

【発明の効果】以上のように本発明によれば、コンパイ
ル時に最適化処理を実行し、ソースプログラム行とオブ
ジェクトコードのアドレスとが1対1に対応しなくなる
部分が生じたとしても、オブジェクトコードのアドレス
が割り当てられたソースプログラム行が明確になるの
で、テスト担当者は有効行のみを指定して実行停止指示
または実行開始指示を行うことが可能になる。
As described above, according to the present invention, even if the source code line and the address of the object code do not have a one-to-one correspondence with each other when the optimization process is executed at the time of compilation, the object code is generated. Since the source program line to which the address is assigned is clarified, the tester can specify the valid line only to give the execution stop instruction or the execution start instruction.

【0047】この結果、最適化処理を抑止することな
く、すなわち実装置に組み込むプログラムと同じ状態で
検証対象プログラムを検証することができる。また、有
効行を予測する必要がなくなるので、1回の指示操作の
みで有効行での実行停止または実行開始を実現すること
ができ、作業効率を向上させることができる。
As a result, the verification target program can be verified without suppressing the optimization process, that is, in the same state as the program installed in the actual device. Further, since it is not necessary to predict the valid row, it is possible to stop the execution or start the execution in the valid row with only one instruction operation, and it is possible to improve the work efficiency.

【0048】また、アドレスが割り当てられないソース
プログラム行での実行停止指示または実行開始指示に対
しては、オブジェクトコードアドレスが割り当てられて
いる直前のソースプログラムの行番号に補正した後、オ
ブジェクトコードに従う処理を実行させているので、テ
スト担当者が無効行を指定した場合でも、その操作が無
効にならず、確実に一時停止させることができ、作業効
率の低下を防止できる。
For an execution stop instruction or an execution start instruction in a source program line to which an address is not assigned, the line number of the source program immediately before the object code address is assigned is corrected and then the object code is followed. Since the process is executed, even if the tester designates an invalid line, the operation is not invalidated, the operation can be reliably stopped, and the work efficiency can be prevented from lowering.

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

【図1】本発明を実施する装置の一実施例を示すブロッ
ク構成図である。
FIG. 1 is a block diagram showing an embodiment of an apparatus for carrying out the present invention.

【図2】図1の詳細構成を示す図である。FIG. 2 is a diagram showing a detailed configuration of FIG.

【図3】実施例におけるデバッグ手順を示すフローチャ
ートである。
FIG. 3 is a flowchart showing a debug procedure in the embodiment.

【図4】ソースプログラムの表示形式の他の例を示す図
である。
FIG. 4 is a diagram showing another example of a display format of a source program.

【図5】オブジェクトコードのみの表示例を示す図であ
る。
FIG. 5 is a diagram showing a display example of only an object code.

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

1…ディスプレイ、2…キーボード、3…ワークステー
ション、4…ソースプログラム、5…コンパイラ、6…
オブジェクトコード、7…シンボル情報、、8…ソフト
ウェアデバッガ、8a…ソースプログラム表示処理、8
b…行番号判別処理、8c…行番号補正処理。
1 ... Display, 2 ... Keyboard, 3 ... Workstation, 4 ... Source program, 5 ... Compiler, 6 ...
Object code, 7 ... Symbol information, 8 ... Software debugger, 8a ... Source program display processing, 8
b ... Line number determination process, 8c ... Line number correction process.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐々木 保 神奈川県秦野市堀山下1番地 株式会社日 立製作所汎用コンピュータ事業部内 (72)発明者 小泉 昭典 神奈川県秦野市堀山下1番地 日立コンピ ュータエンジニアリング株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor, Tamotsu Sasaki 1 Horiyamashita, Hadano City, Kanagawa Pref., General Computer Division, Hitachi, Ltd. (72) Akinori Koizumi 1 Horiyamashita, Hadano City, Kanagawa Prefecture Hitachi Computer Ta Engineering Co., Ltd.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 検証対象のソースプログラムをコンパイ
ル処理によってオブジェクトコードに変換し、そのオブ
ジェクトコードに従う処理を順次実行させることによっ
て前記ソースプログラムを検証するソフトウェアデバッ
グ方法において、 前記オブジェクトコードに従う処理の実行開始前に、 前記検証対象のソースプログラムのコンパイル時の最適
化処理段階において作成されたオブジェクトコードのア
ドレスと、ソースプログラム行番号との対応関係を示す
情報を入力し、ソースプログラムの表示指示に対し、オ
ブジェクトコードのアドレスが割り当てられたソースプ
ログラム行と割り当てられないソースプログラム行とを
前記情報に基づいて区別して表示装置に表示させる段階
を有することを特徴とするソフトウェアデバッグ方法。
1. A software debug method for verifying a source program by converting a source program to be verified into an object code by a compile process and sequentially executing a process according to the object code, wherein execution of a process according to the object code is started. Previously, the address of the object code created in the optimization processing stage at the time of the compilation of the source program of the verification target, and the information indicating the correspondence relationship between the source program line number is input, to the display instruction of the source program, A method of software debugging, comprising the step of distinguishing a source program line to which an object code address is assigned and a source program line to which an object code address is not assigned based on the information and displaying them on a display device.
【請求項2】 前記アドレスが割り当てられないソース
プログラム行での実行停止指示または実行開始指示に対
しては、オブジェクトコードアドレスが割り当てられて
いる直前のソースプログラムの行番号に補正した後、オ
ブジェクトコードに従う処理を実行させることを特徴と
する請求項1記載のソフトウェアデバッグ方法。
2. For an execution stop instruction or an execution start instruction in a source program line to which the address is not assigned, the object code is corrected to the line number of the source program immediately before the object code address is assigned. 2. The software debugging method according to claim 1, wherein the processing according to is executed.
JP6106420A 1994-05-20 1994-05-20 Software debugging method Pending JPH07319729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6106420A JPH07319729A (en) 1994-05-20 1994-05-20 Software debugging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6106420A JPH07319729A (en) 1994-05-20 1994-05-20 Software debugging method

Publications (1)

Publication Number Publication Date
JPH07319729A true JPH07319729A (en) 1995-12-08

Family

ID=14433181

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6106420A Pending JPH07319729A (en) 1994-05-20 1994-05-20 Software debugging method

Country Status (1)

Country Link
JP (1) JPH07319729A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004036420A1 (en) * 2002-10-18 2004-04-29 Advantest Corporation Program development support device, program execution device, compile method and debug method
US7512986B2 (en) * 2001-03-28 2009-03-31 Nds Limited Digital rights management system and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512986B2 (en) * 2001-03-28 2009-03-31 Nds Limited Digital rights management system and method
US7920702B2 (en) 2001-03-28 2011-04-05 Nds Limited Digital rights management system and method
WO2004036420A1 (en) * 2002-10-18 2004-04-29 Advantest Corporation Program development support device, program execution device, compile method and debug method

Similar Documents

Publication Publication Date Title
US6286132B1 (en) Debugging support apparatus, a parallel execution information generation device, a computer-readable recording medium storing a debugging support program, and a computer-readable recording medium storing a parallel execution information generation program
EP1130518B1 (en) Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof
US20090013313A1 (en) Debug device, debug method, and program
JPH0748182B2 (en) Program error detection method
US6701518B1 (en) System and method for enabling efficient processing of a program that includes assertion instructions
JP4009517B2 (en) Program development support apparatus and compiling method
JPH07319729A (en) Software debugging method
EP0801348A1 (en) Method of monitoring the operation of a computer
JPH07253909A (en) Microprogram verifying method
JP2672968B2 (en) Source list output processing method for debugging
JPS59128652A (en) Program testing method using display device
JPH06242943A (en) Source code level debugging device
JPH01155438A (en) Compiler test system
JPH0567164A (en) Logic simulation system
JPH07319730A (en) Test debugging method
JPS6292034A (en) Program debugging device
JPS63223930A (en) Simulation system for program of exclusive processor
JPH04102931A (en) Testing system for information processor
JPH04310139A (en) Debug support tool for compiler language
JPH07110780A (en) Debugging device
JPH02231634A (en) Method for maintaining interchangeability of software
JPH04307636A (en) Program test system
JPS6143347A (en) Simulation method of vector instruction
JPH09114694A (en) Method and mechanism for parallel processing simulation
JPH06119203A (en) Debugging line deleting device