JP2005174045A - Source program conversion device, source program conversion method, source program conversion program and program recording medium - Google Patents
Source program conversion device, source program conversion method, source program conversion program and program recording medium Download PDFInfo
- Publication number
- JP2005174045A JP2005174045A JP2003414185A JP2003414185A JP2005174045A JP 2005174045 A JP2005174045 A JP 2005174045A JP 2003414185 A JP2003414185 A JP 2003414185A JP 2003414185 A JP2003414185 A JP 2003414185A JP 2005174045 A JP2005174045 A JP 2005174045A
- Authority
- JP
- Japan
- Prior art keywords
- program
- source program
- interactive
- routine
- conversion
- 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
Images
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
この発明は、デバッグ対象のソースプログラムを変換するソースプログラム変換装置、ソースプログラム変換方法、ソースプログラム変換プログラム、および、プログラム記録媒体に関する。 The present invention relates to a source program conversion apparatus, a source program conversion method, a source program conversion program, and a program recording medium for converting a source program to be debugged.
一般に、計算機で実行されるプログラムの開発は次のような流れで行われている。すなわち、先ず、計算機に実行させようとする処理がプログラム言語を用いて記述されたソースプログラムを作成する。通常、上記プログラム言語で記述されたソースプログラムは計算機で直接実行できないため、そのソースプログラムをコンパイラと呼ばれるソフトウエアによって、計算機で直接実行できる実行形式ファイルと呼ばれるものに変換する。そして、上記ソースプログラムの動作確認を、計算機上で上記実行形式ファイルを動作させることによって行う。 In general, a program executed on a computer is developed in the following flow. That is, first, a source program in which a process to be executed by a computer is described using a program language is created. Usually, since a source program described in the above programming language cannot be directly executed by a computer, the source program is converted into a so-called executable file that can be directly executed by a computer by software called a compiler. Then, the operation check of the source program is performed by operating the executable file on the computer.
こうして動作確認が行われた結果、上記ソースプログラムの動作がその作成者の意図したものと異なる場合には、上記ソースプログラムにバグ(不具合)があるとして、デバッグ(ソースプログラムのどの部分が不具合を発生させたかを調べて修正する作業)を行う。 If the operation of the source program is different from what the creator intended, as a result of checking the operation in this way, it is assumed that there is a bug (defect) in the source program, and debugging (which part of the source program has a defect) Check if it has occurred and correct it).
上記デバッグを行う場合には、デバッガと呼ばれるソフトウエア上で、不具合のある実行形式ファイルを動作させることによって行う。上記デバッガは、実行形式ファイルの任意の処理でその動作を停止させることができ、実行中の実行形式ファイルに相当するソースプログラム内の変数の値を表示することや、停止位置から1ステップずつ実行形式ファイルを動作させることなどができる。こうすることによって、上記ソースプログラム内の不具合の原因を特定することができるのである。 The debugging is performed by operating a faulty executable file on software called a debugger. The above-mentioned debugger can stop the operation by arbitrary processing of the executable file, display the value of the variable in the source program corresponding to the executable file being executed, and execute one step at a time from the stop position You can operate the format file. By doing so, the cause of the malfunction in the source program can be specified.
ところが、上記プログラム言語のなかには、その言語用のコンパイラは開発済みであっても、上記デバッガの開発が困難であるためにデバッガが未開発であり、デバッガを使用できない場合がある。このような場合には、当該プログラム言語で記述されたソースプログラムに関して、不具合の原因を特定するのが困難であるという問題がある。 However, among the programming languages described above, even if a compiler for the language has been developed, the debugger has not been developed because the development of the debugger is difficult, and the debugger may not be used. In such a case, there is a problem that it is difficult to specify the cause of the malfunction in the source program described in the program language.
そのために、上記デバッガを使用せずにデバッグを行うことができるプログラム生産システムが提案されている(例えば、特許文献1(特開平5‐224908号公報)参照)。このプログラム生産システムにおいては、図7に示すように、ソースプログラムを実行形式ファイル(オブジェクトファイル)に変換するコンパイラ2に、ソースプログラム1へのデバッグルーチンの追加の要否を判定するデバッグルーチン追加判定手段7と、追加すべきと判定されたソースプログラムに最も適したデバッグルーチンを生成するデバッグルーチン生成手段8と、生成されたデバッグルーチンのプログラムへの埋め込みを行うデバッグルーチン埋め込み手段10とを有するデバッグルーチン付加手段4を設けている。
Therefore, a program production system that can perform debugging without using the debugger has been proposed (see, for example, Patent Document 1 (Japanese Patent Laid-Open No. 5-224908)). In this program production system, as shown in FIG. 7, it is determined whether or not a debug routine should be added to the
上記構成を有するプログラム生産システムは、以下のように動作する。すなわち、コンパイラ2は、文法解析手段5と翻訳手段6を用いて、読み込んだソースプログラム1の文法解析およびコードの変換処理を行う。その際に、翻訳手段6内でデバッグルーチンの追加が認められた場合には、デバッグルーチン追加判定手段7が起動される。そして、デバッグルーチン追加判定手段7によって、どのようなデバッグルーチンが最も相応しいかが判断されてデバッグルーチン生成手段8が起動される。
The program production system having the above configuration operates as follows. That is, the
そうすると、上記デバッグルーチン生成手段8は、上記デバッグルーチン追加判定手段7によって判断されたデバッグルーチンの種類(例えば、関数に関するものやディスク等の資源に対するアクセスに関するもの等)およびデバッグルーチンデータベース9に基づいて、当該ソースプログラム1に最も適しているデバッグルーチンを生成する。そして、デバッグルーチン埋め込み手段10によって、翻訳手段6が現在生成中のオブジェクトモジュール3に、このデバッグルーチン生成手段8によって生成されたデバッグルーチンが埋め込まれる。こうして生成されたオブジェクトモジュール3は、リンカによってリンクされてロードモジュール(目的プログラム)が生成される。
Then, the debug routine generation means 8 is based on the type of debug routine (for example, related to functions or access to resources such as a disk) determined by the debug routine addition determination means 7 and the debug routine database 9. A debug routine most suitable for the
こうして生成されたロードモジュールは、上記ソースプログラム1をコンパイルして得られてリンクされたプログラム本体と、各プログラム本体間に挿入されたデバッグルーチンと、から構成されている。そして、このロードモジュールをデバッグする際には、計算機によって、ロードモジュールの先頭からプログラム本体とデバッグルーチンとが交互に順次実行される。そして、各デバッグルーチンを実行した際に得られたデバッグ情報は、ファイルあるいはメモリ領域のデバッグ情報格納領域に蓄えられてユーザに提供される。こうして、上記デバッガを使用することなく、デバッグ情報が得られるのである。
The load module generated in this way is composed of a program body obtained by compiling the
このように、上記特許文献1に開示されたプログラム生産システムにおいては、デバッグ時に上記デバッグ情報を生成してデバッグ情報格納領域に格納するようなデバッグルーチンを、プログラム生産システムの動作時に静的(出来上がったロードモジュールの実行時に変化しない状態)にロードモジュールへ埋め込むようにしている。そのために、予め不具合の原因が推測できる場合にはそれに見合ったデバッグ情報が得られるデバッグルーチンを埋め込むことができ、短時間で不具合の原因を特定することができるのである。
As described above, in the program production system disclosed in
しかしながら、上記特許文献1に開示されたプログラム生産システムには、以下のような問題がある。すなわち、このプログラム生産システムを利用して、上記デバッグルーチンが埋め込まれたロードモジュールのデバッグを計算機上で実行した結果、得られたデバッグ情報では不具合が特定できなかった場合には、再度本プログラム生産システムを利用して、さらに詳しく不具合の原因を調べるためのデバッグルーチンが埋め込まれたロードモジュールを作成する必要がある。
However, the program production system disclosed in
したがって、不具合の原因が特定できない場合には、上記ロードモジュール(オブジェクトモジュール3)にデバッグルーチンを埋め込む処理を試行錯誤しながら変更して、何度も上記ロードモジュールを作り直す必要があり、デバッグ作業の効率が悪くなると言う問題がある。
そこで、この発明の課題は、デバッガを使用することなく且つデバッグの際にプログラムを作り直すことなくデバッグ情報を得ることを可能にするソースプログラム変換装置、ソースプログラム変換方法、ソースプログラム変換プログラム、および、プログラム記録媒体を提供することにある。 Accordingly, an object of the present invention is to provide a source program conversion device, a source program conversion method, a source program conversion program, and a source program conversion program that can obtain debug information without using a debugger and without recreating a program at the time of debugging, and It is to provide a program recording medium.
上記課題を解決するため、この発明のソースプログラム変換装置は、デバッグ対象のソースプログラムにデバッグ処理を行うためのデバッグルーチンを追加するソースプログラム変換装置において、第1プログラム言語で記述された第1ソースプログラムを第2プログラム言語による記述に変換し,中間データとして出力するプログラム言語変換手段と、上記中間データから上記第1ソースプログラム内の1つのステートメントに相当する処理プログラムを処理順序に従って読み出し,この読み出した各処理プログラムに対話的デバッグルーチン呼出命令を追加して,第2プログラム言語の文法に従って第2ソースプログラムとして出力する対話的デバッグルーチン呼出命令追加手段と、上記対話的デバッグルーチン呼出命令によって起動されると共に,上記第2プログラム言語で記述されて,デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能な対話的デバッグルーチンを,上記第2ソースプログラムに追加する対話的デバッグルーチン追加手段を備えたことを特徴としている。 In order to solve the above problems, a source program conversion apparatus according to the present invention is a source program conversion apparatus for adding a debugging routine for performing a debugging process to a source program to be debugged. Program language conversion means for converting the program into a description in the second program language and outputting it as intermediate data, and reading out the processing program corresponding to one statement in the first source program from the intermediate data in accordance with the processing order. An interactive debug routine call instruction adding means for adding an interactive debug routine call instruction to each processing program and outputting it as a second source program in accordance with the grammar of the second program language, and activated by the interactive debug routine call instruction. Ru In both cases, an interactive debugging routine written in the second program language and receiving a command input by a debug operator and capable of determining a process to be performed next is added to the second source program. It is characterized by providing a means for adding a debugging routine.
上記構成によれば、最終的に得られる第2ソースプログラムには、上記第1ソースプログラムの各ステートメントに相当する各処理プログラムと夫々の処理プログラムに追加された対話的デバッグルーチン呼出命令とが交互に配置されると共に、上記夫々の対話的デバッグルーチン呼出命令によって起動される一つの対話的デバッグルーチンが設けられている。そして、上記対話的デバッグルーチンは、デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能になっている。 According to the above configuration, in the finally obtained second source program, each processing program corresponding to each statement of the first source program and an interactive debug routine call instruction added to each processing program are alternately displayed. And an interactive debug routine that is activated by each of the above interactive debug routine call instructions. The interactive debug routine can determine a process to be performed next in response to a command input by a debug operator.
したがって、上記対話的デバッグルーチン呼出命令および対話的デバッグルーチンが追加された第2ソースプログラムを実行形式ファイルに変換して、計算機によって実行することによって、上記第2ソースプログラム中の各対話的デバッグルーチン呼出命令が実行される毎に、同一の対話的デバッグルーチンが起動されることになる。そして、対話的デバッグルーチンが実行されるに際して、デバッグ作業者によってコマンドが入力された場合には、この入力コマンドに応じて次に行うべき処理が決定される。 Therefore, by converting the second source program to which the interactive debug routine calling instruction and the interactive debug routine are added into an executable file and executing it by the computer, each interactive debug routine in the second source program is executed. Each time a call instruction is executed, the same interactive debug routine will be invoked. When a command is input by the debug operator when the interactive debug routine is executed, a process to be performed next is determined according to the input command.
したがって、デバッグ作業者は、計算機によって現在実行中の処理プログラムに応じてソースプログラムの不具合の原因を特定できるようなコマンドを入力するだけで、的確なデバッグ情報を得ることができるのである。その結果、不具合の原因を特定できるまで試行錯誤的に追加するデバッグルーチンを変更する必要が無く、デバッグ作業の効率を飛躍的に向上できるである。 Therefore, the debug operator can obtain accurate debug information only by inputting a command that can identify the cause of the malfunction of the source program in accordance with the processing program currently being executed by the computer. As a result, it is not necessary to change the debug routine to be added on a trial and error basis until the cause of the failure can be identified, and the efficiency of debugging work can be dramatically improved.
さらに、上記プログラム言語変換手段によって、上記第1プログラム言語で記述された第1ソースプログラムを第2プログラム言語に変換して、中間データを生成するようにしている。したがって、上記第1プログラム言語で記述された第1ソースプログラムをそのまま実行形式ファイルに変換するコンパイラを必要とはしない。そのために、上記第1プログラム言語用のデバッガのみならず第1プログラム言語用のコンパイラも未開発である場合には、既にコンパイラが開発されているプログラム言語を上記第2プログラム言語として選択することによって、的確にデバッグ処理を行うことができるのである。 Further, the program language conversion means converts the first source program described in the first program language into the second program language to generate intermediate data. Therefore, there is no need for a compiler that converts the first source program described in the first program language as it is into an executable file. Therefore, when not only the debugger for the first program language but also the compiler for the first program language are not developed, the program language for which the compiler has already been developed is selected as the second program language. Therefore, the debugging process can be performed accurately.
また、1実施例のソースプログラム変換装置では、上記対話的デバッグルーチンには、当該対話的デバッグルーチンに停止条件が設定されているか否かを判定し、設定されている場合には上記第2ソースプログラムの実行を停止する停止条件判定処理部が設けられている。 In the source program conversion apparatus of one embodiment, the interactive debug routine determines whether or not a stop condition is set in the interactive debug routine. If the stop condition is set, the second source is converted. A stop condition determination processing unit for stopping execution of the program is provided.
この実施例によれば、上記対話的デバッグルーチン呼出命令および対話的デバッグルーチンが追加された第2ソースプログラムを実行形式ファイルに変換して計算機によって実行する際に、上記第2ソースプログラム中の対話的デバッグルーチン呼出命令によって上記対話的デバッグルーチンが起動されて実行されると、当該対話的デバッグルーチンに停止条件が設定されているか否かが判定され、設定されていると判定された場合には当該第2ソースプログラムの実行が停止される。 According to this embodiment, when the second source program to which the interactive debug routine call instruction and the interactive debug routine are added is converted into an executable file and executed by the computer, the dialog in the second source program is executed. When the interactive debug routine is started and executed by a call instruction for a dynamic debug routine, it is determined whether or not a stop condition is set for the interactive debug routine. Execution of the second source program is stopped.
また、1実施例のソースプログラム変換装置では、上記対話的デバッグルーチンには、デバッグ作業者によって上記停止条件を設定するコマンドが入力された際に、当該対話的デバッグルーチンに停止条件を設定する停止条件設定処理部が設けられている。 In the source program conversion apparatus of one embodiment, when the command for setting the stop condition is input to the interactive debug routine by the debug operator, the stop that sets the stop condition in the interactive debug routine is executed. A condition setting processing unit is provided.
この実施例によれば、上記対話的デバッグルーチン呼出命令および対話的デバッグルーチンが追加された第2ソースプログラムを実行形式ファイルに変換して計算機によって実行する際に、上記第2ソースプログラム中の対話的デバッグルーチン呼出命令によって上記対話的デバッグルーチンが起動される。そして、デバッグ作業者によって上記停止条件を設定するコマンドが入力されると、上記停止条件設定処理部によって当該対話的デバッグルーチンに停止条件が設定される。その結果、次回以降の対話的デバッグルーチンの実行時であって、上記停止条件判定処理部によって停止条件が設定されていると判定され、且つ、その停止条件が当該第2ソースプログラムにおける現在の行での停止である場合には、当該第2ソースプログラムの実行が停止される。 According to this embodiment, when the second source program to which the interactive debug routine call instruction and the interactive debug routine are added is converted into an executable file and executed by the computer, the dialog in the second source program is executed. The interactive debug routine is started by a static debug routine call instruction. When a debug operator inputs a command for setting the stop condition, the stop condition is set in the interactive debug routine by the stop condition setting processing unit. As a result, it is determined that the stop condition is set by the stop condition determination processing unit when the interactive debug routine is executed next time, and the stop condition is determined to be the current line in the second source program. In the case of the stop at, the execution of the second source program is stopped.
また、1実施例のソースプログラム変換装置では、上記対話的デバッグルーチンには、デバッグ作業者によって上記停止条件を変更するコマンドが入力された際に、既に当該対話的デバッグルーチンに設定されている停止条件を変更する停止条件変更処理部が設けられている。 In the source program conversion apparatus of one embodiment, when the command for changing the stop condition is input to the interactive debug routine by the debug operator, the stop already set in the interactive debug routine is performed. A stop condition change processing unit for changing the conditions is provided.
この実施例によれば、上記対話的デバッグルーチン呼出命令および対話的デバッグルーチンが追加された第2ソースプログラムを実行形式ファイルに変換して計算機によって実行する際に、上記第2ソースプログラム中の対話的デバッグルーチン呼出命令によって上記対話的デバッグルーチンが起動される。そして、デバッグ作業者によって上記停止条件を変更するコマンドが入力されると、上記停止条件変更処理部によって、既に当該対話的デバッグルーチンに設定されている停止条件が変更される。その結果、上記変更前の停止条件によって指定されていた当該第2ソースプログラムの行において上記対話的デバッグルーチンが実行された際には、上記停止条件判定処理部によって停止条件が設定されていないと判定されて当該第2ソースプログラムの実行が続行される。 According to this embodiment, when the second source program to which the interactive debug routine call instruction and the interactive debug routine are added is converted into an executable file and executed by the computer, the dialog in the second source program is executed. The interactive debug routine is started by a static debug routine call instruction. When the debug operator inputs a command for changing the stop condition, the stop condition already set in the interactive debug routine is changed by the stop condition change processing unit. As a result, when the interactive debug routine is executed in the line of the second source program specified by the stop condition before the change, the stop condition is not set by the stop condition determination processing unit. The determination is made and the execution of the second source program is continued.
また、この発明のソースプログラム変換方法は、デバッグの対象のソースプログラムにデバッグ処理を行うためのデバッグルーチンを追加するソースプログラム変換方法において、第1プログラム言語で記述された第1ソースプログラムを第2プログラム言語による記述に変換して中間データとして出力し、上記中間データから上記第1ソースプログラム内の1つのステートメントに相当する処理プログラムを処理順序に従って読み出し,この読み出した各処理プログラムに対話的デバッグルーチン呼出命令を追加して,第2プログラム言語の文法に従って第2ソースプログラムとして出力し、上記対話的デバッグルーチン呼出命令によって起動されると共に,上記第2プログラム言語で記述されて,デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能な対話的デバッグルーチンを,上記第2ソースプログラムに追加することを特徴としている。 According to another aspect of the present invention, there is provided a source program conversion method in which a debug routine for performing a debugging process is added to a source program to be debugged, wherein a first source program written in a first program language is converted into a second program. Converted to a description in a program language and output as intermediate data, reads a processing program corresponding to one statement in the first source program from the intermediate data according to the processing order, and interactively debugs each read processing program A call instruction is added and output as a second source program in accordance with the grammar of the second program language. The program is started by the interactive debug routine call instruction and written in the second program language and input by the debug operator. Command It is characterized in that an interactive debugging routine that can receive and determine the next processing to be performed is added to the second source program.
上記構成によれば、第2ソースプログラムに追加された対話的デバッグルーチンが計算機によって実行されるに際して、デバッグ作業者は、現在実行中の処理プログラムに応じてソースプログラムの不具合の原因を特定できるようなコマンドを入力するだけで、的確なデバッグ情報を得ることができる。したがって、不具合の原因を特定できるまで試行錯誤的に追加するデバッグルーチンを変更する必要が無く、デバッグ作業の効率を飛躍的に向上できる。 According to the above configuration, when the interactive debug routine added to the second source program is executed by the computer, the debug operator can specify the cause of the malfunction of the source program according to the currently executing processing program. You can get accurate debugging information just by entering a simple command. Therefore, it is not necessary to change the debugging routine to be added by trial and error until the cause of the failure can be identified, and the efficiency of debugging work can be dramatically improved.
さらに、上記第1プログラム言語で記述された第1ソースプログラムをそのまま実行形式ファイルに変換するコンパイラを必要とはしない。そのために、上記第1プログラム言語用のコンパイラが未開発である場合には、既にコンパイラが開発されているプログラム言語を上記第2プログラム言語として選択することによって、的確にデバッグ処理を行うことができる。 Furthermore, it is not necessary to have a compiler that converts the first source program described in the first program language as it is into an executable file. Therefore, when the compiler for the first programming language has not been developed, the debugging process can be accurately performed by selecting the programming language for which the compiler has already been developed as the second programming language. .
また、この発明のソースプログラム変換プログラムは、コンピュータを、この発明のソースプログラム変換装置におけるプログラム言語変換手段,対話的デバッグルーチン呼出命令追加手段および対話的デバッグルーチン追加手段として機能させる。 The source program conversion program of the present invention causes a computer to function as program language conversion means, interactive debug routine call instruction adding means, and interactive debug routine adding means in the source program conversion apparatus of the present invention.
上記構成によれば、第1プログラム言語で記述された第1ソースプログラムを、実行形式ファイルに変換して、計算機によって実行することによって、デバッガを使用することなく且つデバッグの際にプログラムを作り直すことなくデバッグ情報を得ることができるのでデバッグ作業の効率を飛躍的に向上でき、上記第1プログラム言語用のコンパイラが未開発の場合でも的確にデバッグ処理を行うことができる、第2ソースプログラムに変換することができる。 According to the above configuration, the first source program described in the first program language is converted into an executable format file and executed by the computer, thereby re-creating the program without using the debugger and at the time of debugging. Since the debugging information can be obtained without any problem, the efficiency of debugging work can be dramatically improved, and even when the compiler for the first programming language has not been developed, it can be accurately debugged and converted to a second source program. can do.
また、この発明のプログラム記録媒体は、この発明のソースプログラム変換プログラムが記録されている。 The program recording medium of the present invention records the source program conversion program of the present invention.
上記構成によれば、コンピュータによって読み出して実行することによって、第1プログラム言語で記述された第1ソースプログラムを、実行形式ファイルに変換して計算機上で実行することによって、デバッガを使用することなく且つデバッグの際にプログラムを作り直すことなくデバッグ情報を得ることができるのでデバッグ作業の効率を飛躍的に向上でき、上記第1プログラム言語用のコンパイラが未開発の場合でも的確にデバッグ処理を行うことができる、第2ソースプログラムに変換することができる。 According to the above configuration, the first source program written in the first program language is converted into an executable format file by being read and executed by the computer, and executed on the computer without using a debugger. In addition, debugging information can be obtained without re-creating a program at the time of debugging, so that the efficiency of debugging work can be greatly improved, and even when the compiler for the first programming language is not yet developed, the debugging process can be performed accurately. Can be converted into a second source program.
以上より明らかなように、この発明によれば、第1プログラム言語で記述された第1ソースプログラムに基づいて、第1ソースプログラムの各ステートメントに相当する各処理プログラムと夫々の処理プログラムに追加された対話的デバッグルーチン呼出命令とが交互に配置されると共に、上記夫々の対話的デバッグルーチン呼出命令によって呼び出されて起動される一つの対話的デバッグルーチンが設けられており、上記対話的デバッグルーチンは、デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能になっている、第2ソースプログラムを得ることができる。 As is apparent from the above, according to the present invention, each processing program corresponding to each statement of the first source program and each processing program are added based on the first source program described in the first program language. The interactive debug routine call instructions are alternately arranged, and one interactive debug routine that is invoked and activated by each of the interactive debug routine call instructions is provided. The second source program can be obtained which receives the command input by the debug operator and can determine the processing to be performed next.
したがって、得られた上記第2ソースプログラムを実行形式ファイルに変換して計算機によって実行することによって、デバッガを使用することなく且つデバッグの際にプログラムを作り直すことなくデバッグ情報を得ることができ、デバッグ作業の効率を飛躍的に向上でき、上記第1プログラム言語用のコンパイラが未開発の場合でも的確にデバッグ処理を行うことができる。 Therefore, by converting the obtained second source program into an executable format file and executing it by a computer, debug information can be obtained without using a debugger and without recreating the program at the time of debugging. The work efficiency can be dramatically improved, and even when the compiler for the first programming language is not yet developed, the debugging process can be performed accurately.
以下、この発明を図示の実施の形態により詳細に説明する。図1は、本実施の形態のソースプログラム変換装置における機能的構成を示すブロック図である。図1において、ソースプログラム格納部11には、第1プログラム言語で記述されたソースプログラムが格納されている。尚、以下においては、説明の便宜上、ソースプログラム格納部11に格納された各ソースプログラムに対しても、ソースプログラム格納部11と同じ符号「11」を付加することにする。また、変換後ソースプログラム格納部13には、ソースプログラム変換部12によって変換されると共に、第2プログラム言語で記述された変換後ソースプログラムが格納される。尚、以下においては、変換後ソースプログラム格納部13に格納された各変換後ソースプログラムに対しても、変換後ソースプログラム格納部13と同じ符号「13」を付加することにする。また、コンパイラ14は、変換後ソースプログラム13を実行形式ファイルに変換して実行形式ファイル格納部15に格納する。こうして得られた実行形式ファイルは、図示しない計算機上で実行される。
Hereinafter, the present invention will be described in detail with reference to the illustrated embodiments. FIG. 1 is a block diagram showing a functional configuration of the source program conversion apparatus according to the present embodiment. In FIG. 1, the source
上記ソースプログラム変換部12は、プログラム言語変換手段16,中間データ格納部17,対話的デバッグルーチン呼出命令追加手段18および対話的デバッグルーチン追加手段19から構成される。
The source
上記プログラム言語変換手段16は、上記ソースプログラム格納部11から読み出されたソースプログラム11を、既知の方法によって第2プログラム言語の処理プログラムに変換し、中間データとして中間データ格納部17に格納する。尚、以下においては、中間データ格納部17に格納された中間データに対しても、中間データ格納部17と同じ符号「17」を付加することにする。対話的デバッグルーチン呼出命令追加手段18は、中間データ格納部17から、ソースプログラム11内の1つのステートメントに対応する処理プログラムを処理順序に従って読み出し、この読み出された処理プログラムに対話的デバッグルーチンを呼び出す命令(第2プログラム言語で記述された対話的デバッグルーチン呼出命令)を追加して、第2プログラム言語の文法に従って変換後ソースプログラム格納部13に格納する。対話的デバッグルーチン追加手段19は、第2プログラム言語で記述された対話的デバッグルーチンを、変換後ソースプログラム13に追加する。
The program language conversion means 16 converts the
ここで、上記機能的構成を有するソースプログラム変換装置の具体的ハードウェア構成は、後述する各種の処理を実行するプログラムを含む各種プログラムを記憶するプログラムメモリ、各種情報を記憶するデータメモリ、インターネット等の通信ネットワークと接続する通信I/F、入力装置、出力装置、表示装置、外部記録媒体がセットされてこの外部記録媒体をアクセスする外部補助記憶装置、上記プログラムメモリ,データメモリ,通信I/F,入力装置,出力装置,表示装置および外部補助記憶装置等を制御して、プログラム言語の変換や対話的デバッグルーチン呼出命令追加や対話的デバッグルーチン追加等を実行するCPU(中央演算処理装置)等で成る。 Here, the specific hardware configuration of the source program conversion device having the above functional configuration includes a program memory for storing various programs including programs for executing various processes described later, a data memory for storing various information, the Internet, and the like. Communication I / F for connecting to a communication network, an input device, an output device, a display device, an external auxiliary storage device in which an external recording medium is set and accessing the external recording medium, the program memory, data memory, communication I / F CPU (Central Processing Unit) that controls program language conversion, interactive debug routine call instruction addition, interactive debug routine addition, etc. by controlling input devices, output devices, display devices, external auxiliary storage devices, etc. It consists of
すなわち、上記プログラム言語変換手段16,対話的デバッグルーチン呼出命令追加手段18,対話的デバッグルーチン追加手段19およびコンパイラ14は上記CPUで構成され、ソースプログラム格納部11,中間データ格納部17,変換後ソースプログラム格納部13および実行形式ファイル格納部15は上記データメモリや外部補助記憶装置で構成されるのである。また、上記CPUは、上述した各部16,18,19,14による本実施の形態に係る処理動作の他に、演算・判断処理,計時処理および入出力処理等の各種の処理動作をも行うようになっている。
That is, the program language conversion means 16, the interactive debug routine call instruction addition means 18, the interactive debug routine addition means 19 and the
図2は、上記ソースプログラム変換部12によって実行されるソースプログラム変換処理動作のフローチャートである。以下、図2に従って、ソースプログラム変換処理動作について詳細に説明する。
FIG. 2 is a flowchart of the source program conversion processing operation executed by the source
ステップS1で、上記プログラム言語変換手段16によって、ソースプログラム格納部11から上記第1プログラム言語で記述されたソースプログラム11が読み出される。そして、上記第2プログラム言語の処理プログラムに変換され、中間データ17として中間データ格納部17に格納される。
In step S1, the program language conversion means 16 reads the
ステップS2で、上記対話的デバッグルーチン呼出命令追加手段18によって、中間データ格納部17からソースプログラム11における1つのステートメントに対応する処理プログラムが読み出される。さらに、ステップS3で、上記読み出された処理プログラムに対話的デバッグルーチン呼出命令が追加される。さらに、ステップS4で、上記呼出命令が追加された処理プログラムが、第2プログラム言語の文法に従って、変換後ソースプログラム格納部13に格納される。さらに、ステップS5で、中間データ格納部17に格納されている中間データ17中の総ての処理プログラムに対する処理が終了したか否かが判別される。その結果、中間データ格納部17に未処理の処理プログラムが残っている場合は、上記ステップS2に戻って、次の処理プログラムに対する処理に移行する。一方、中間データ格納部17に未処理の処理プログラムが残っていない場合は、ステップS6に進む。
In step S2, the processing program corresponding to one statement in the
ここで、上記プログラム言語変換手段16によるソースプログラム11の中間データ17への変換と、対話的デバッグルーチン呼出命令追加手段18による対話的デバッグルーチン呼出命令の追加とについて、具体例を上げて説明する。図3は、ソースプログラム11,中間データ17および対話的デバッグルーチン呼出命令が追加された変換後ソースプログラム13の具体例を示す。図3において、ソースプログラム11内のステートメント21,22が、プログラム言語変換手段16によって、第2プログラム言語の処理プログラム23,24に変換されて中間データ17が生成される。そして、対話的デバッグルーチン呼出命令追加手段18によって、中間データ17における処理プログラム23,24が1つずつ読み出され、第2プログラム言語で記述された対話的デバッグルーチン呼出命令25,26が追加されて、変換後ソースプログラム13として出力されるのである。
Here, the conversion of the
ステップS6で、上記対話的デバッグルーチン追加手段19によって、上記対話的デバッグルーチン呼出命令追加手段18からの対話的デバッグルーチン呼出命令の追加処理が終了した旨の情報を受けて、上記変換後ソースプログラム格納部13に格納された変換後ソースプログラム13に対して第2プログラム言語で記述された対話的デバッグルーチンが追加される。そうした後、ソースプログラム変換処理動作を終了する。
In step S6, the interactive debug
図4は、上記対話的デバッグルーチンの具体例を示す。対話的デバッグルーチンは上述したように第2プログラム言語で記述されており、その処理としては、停止条件判定処理部31,コマンド受付処理部32およびコマンド解析・実行処理部33がある。尚、34〜37は上記コマンドの解析結果に応じた実行を行う各処理部である。
FIG. 4 shows a specific example of the interactive debugging routine. As described above, the interactive debugging routine is described in the second program language, and the processing includes a stop condition
上述のようなソースプログラム変換処理動作によって生成された変換後ソースプログラム13の構造は、図5に示すようになる。図5において、41a〜41eは、プログラム言語変換手段16によって変換されたソースプログラム11の変換結果であり、一つ一つはソースプログラム11内の各ステートメントに対応した処理プログラムである。また、42a〜42dは、対話的デバッグルーチン呼出命令追加手段18によって追加された対話的デバッグルーチン呼出命令である。そして、43は、対話的デバッグルーチン追加手段19によって追加された対話的デバッグルーチンである。
The structure of the converted
上記構成を有する変換後ソースプログラム13は、コンパイラ14によって上記実行形式ファイルに変換され、計算機上において実行されることによってデバッグ処理が行われる。その場合における実行形式ファイルに変換された変換後ソースプログラム(以下、説明の都合上、実行形式ファイルに変換後の変換後ソースプログラムにも変換前の変換後ソースプログラム13と同じ符号「13」を付加することにする)に対する実行は、変換後ソースプログラム13における各ステートメントに対応した処理プログラム41a〜41eのうち1つのステートメントに対応する処理プログラム41が実行される毎に、実行された処理プログラム41に追加されている対話的デバッグルーチン呼出命令42が実行されて、同一の対話的デバッグルーチン43が呼び出される(つまり、起動される)のである。
The
次に、上記呼び出された対話的デバッグルーチン43による対話的デバッグ処理動作について説明する。図6は、上記対話的デバッグ処理動作のフローチャートである。以下、図4に示す対話的デバッグルーチンの具体例と図6に示すフローチャートとに従って、対話的デバッグ処理動作について具体的に説明する。ここで、「対話的に」とは、「デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定する」ことを意味する。変換後ソースプログラム13における処理プログラム41の実行中において、対話的デバッグルーチンが呼び出されると、上記対話的デバッグ処理動作がスタートする。
Next, the interactive debug processing operation by the called
ステップS11で、上記停止条件判定処理部31によって、ブレーク条件が判定される。つまり、対話的デバッグルーチン43に停止条件が設定されているか否かが判定される。さらに、ステップS12で、ブレーク条件の判定結果に従って、変換後ソースプログラム13に対する実行を現在の行で停止するか否かが判別される。その結果、現在の行で停止しない場合には、対話的デバッグ処理動作を終了して、次の処理プログラム41の実行にリターンする。一方、現在の行で停止する場合にはステップS13に進む。
In step S11, the stop condition
尚、上記対話的デバッグルーチン43が呼び出される毎に変換後ソースプログラム13に対する実行を停止させる場合には、対話的デバッグルーチン43中に停止条件判定処理部31を設けなくても良い。その場合には、図6に示すフローチャートにおける上記ステップS11およびステップS12が無くなるため、対話的デバッグルーチン43に停止条件が設定されているか否かが関わらず、ステップS13に進むことになる。
If the execution of the converted
ステップS13で、上記コマンド受付処理部32によって、作業者からの入力コマンドが受け付けられる。ステップS14で、コマンド解析・実行処理部33によって、上記受け付けられたコマンドが解析・実行される。その場合、例えば、現在実行中の処理プログラム41(つまり、ソースプログラム11の現在のステートメント)中の変数の値を参照するコマンドが入力された場合には、コマンド解析・実行処理部33における「変数の表示」処理部34によって、現在実行中の処理プログラム41中の対応する変数の値が表示された後、ステップS15に進む。また、変換後ソースプログラム13の停止条件を設定するコマンドまたは停止条件を変更するコマンドが入力された場合には、コマンド解析・実行処理部33における「停止条件の設定」処理部35または「停止条件の変更」処理部36によって、対話的デバッグルーチン43に対して停止条件の設定または変更が行われた後、ステップS15に進む。また、変換後ソースプログラム13の実行を続行するコマンドが入力された場合には、コマンド解析・実行処理部33における「プログラム続行」処理部37によってそのままステップS15に進む。
In step S13, the command
ステップS15で、上記コマンド解析・実行処理部33によって、上記ステップS14において実行された処理は「プログラム続行」であるか否かが判別される。その結果、プログラム続行である場合には、対話的デバッグ処理動作が終了されて、次の処理プログラム41の実行にリターンする。一方、プログラム続行でない場合には、上記ステップS13に戻って作業者からの次の入力コマンドが受け付けられる。こうして、作業者から上記変換後ソースプログラム13の実行を続行するコマンドが入力されるまでは、上記ステップS13およびステップS14が繰り返されるのである。
In step S15, the command analysis /
尚、上記変換後ソースプログラム13の実行を続行するコマンドが入力されて変換後ソースプログラム13の実行が再開されると、次に対話的デバッグルーチン呼出命令が実行されるまで変換後ソースプログラム13の実行が継続される。そして、上記対話的デバッグルーチン呼出命令により対話的デバッグルーチンが呼び出されて実行された場合に、当該対話的デバッグルーチンに上記停止条件が設定されていれば、変換後ソースプログラム13の実行が停止される。一方、上記停止条件が設定されていなければ、変換後ソースプログラム13は、次に停止条件が設定された対話的デバッグルーチンが呼び出されて実行されるまで、停止することなく実行されるのである。
When the command for continuing the execution of the converted
以上のごとく、本実施の形態においては、上記ソースプログラム変換部12によって、ソースプログラム11を第2プログラム言語に変換して中間データ17を生成する。そして、ソースプログラム11内の各ステートメントに対応する処理プログラムを中間データ17から順次読み出し、対話的デバッグルーチン呼出命令を追加することによって、変換後ソースプログラム13を生成する。さらに、変換後ソースプログラム13に、上記第2プログラム言語で記述されると共に、停止条件判定処理部31,コマンド受付処理部32および各種入力コマンドの解析・実行処理を行うコマンド解析・実行処理部33が設けられた対話的デバッグルーチンを追加する。そして、対話的デバッグルーチン呼出命令および対話的デバッグルーチンが付加された変換後ソースプログラム13を実行形式ファイルに変換して計算機によって実行することによって、デバッグ処理を行うようにしている。
As described above, in the present embodiment, the source
そして、計算機上で変換後ソースプログラム13を実行することによって、ソースプログラム11内の1つのステートメントに対応する処理プログラムが実行される毎に、対話的デバッグルーチンが作業者と対話的に実行されて、作業者によって入力されたコマンドの解析・実行処理が1つの対話的デバッグルーチンによって行われる。
Then, by executing the converted
したがって、特定の実行処理用のデバッグルーチンを埋め込む特許文献1の場合のように、不具合の原因が特定できるまで変換後ソースプログラム13に試行錯誤的にデバッグルーチンを埋め込む処理を行う必要が無く、デバッグ作業の効率を向上できる。さらに、上記対話的デバッグルーチンは、作業者によって入力された種々のコマンドを解析して実行するので、デバッグ対象のソースプログラムにおける各ステートメントに応じたデバッグ情報を的確に得ることができるのである。
Therefore, unlike the case of
また、上記プログラム言語変換手段16によって、計算機に実行させる処理を記述するための上記第1プログラム言語を上記第2プログラム言語に変換するようにしている。そして、コンパイラ14によって、第2プログラム言語で記述されたソースプログラムを実行形式ファイルに変換するようにしている。したがって、本実施の形態においては、上記第1プログラム言語で記述されたソースプログラムを実行形式ファイルに変換するコンパイラを必要とはしないのである。すなわち、本実施の形態によれば、上記第2プログラム言語として、既にコンパイラが開発されているプログラム言語を選択することによって、例え、上記第1プログラム言語用のデバッガのみならず第1プログラム言語用のコンパイラも未開発の場合であっても、的確にデバッグ処理を行うことができるのである。
Further, the program language conversion means 16 converts the first program language for describing processing to be executed by the computer into the second program language. Then, the
尚、上記実施の形態における上記第1プログラム言語と第2プログラム言語とは、例えばC言語等の同じプログラム言語であっても構わない。 The first program language and the second program language in the embodiment may be the same program language such as C language.
また、上記実施の形態においては、上記対話的デバッグルーチン呼出命令追加手段18は、中間データ17から読み出したソースプログラム11における1つのステートメントに対応する処理プログラムの後に対話的デバッグルーチン呼出命令を付加するようにしている。しかしながら、当該処理プログラムの前に対話的デバッグルーチン呼出命令を付加して、変換後ソースプログラム13に出力するようにしても構わない。
In the above embodiment, the interactive debug routine call instruction adding means 18 adds an interactive debug routine call instruction after the processing program corresponding to one statement in the
また、上記実施の形態においては、上記対話的デバッグルーチンでは、変数の値を参照するコマンドと変換後ソースプログラム13の停止条件を設定・変更するコマンドとを実行するようにしているが、上記以外のコマンドを実行可能にしてもよい。
In the above embodiment, in the interactive debugging routine, a command for referring to the value of a variable and a command for setting / changing the stop condition of the converted
ところで、上記実施の形態における上記プログラム言語変換手段16,対話的デバッグルーチン呼出命令追加手段18,対話的デバッグルーチン追加手段19およびコンパイラ14としての機能は、プログラム記録媒体に記録されたソースプログラム変換プログラムによって実現される。上記実施の形態における上記プログラム記録媒体は、ROM(リード・オンリ・メモリ)でなるプログラムメディアである。あるいは、上記外部補助記憶装置に装着されて読み出されるプログラムメディアであってもよい。尚、何れの場合においても、プログラムメディアからソースプログラム変換プログラムを読み出すプログラム読み出し手段は、上記プログラムメディアに直接アクセスして読み出す構成を有していてもよいし、RAM(ランダム・アクセス・メモリ)に設けられたプログラム記憶エリア(図示せず)にダウンロードし、上記プログラム記憶エリアにアクセスして読み出す構成を有していてもよい。尚、上記プログラムメディアから上記RAMのプログラム記憶エリアにダウンロードするためのダウンロードプログラムは、予め本体装置に格納されているものとする。
By the way, the functions of the program language conversion means 16, the interactive debug routine call instruction addition means 18, the interactive debug routine addition means 19 and the
ここで、上記プログラムメディアとは、本体側と分離可能に構成され、磁気テープやカセットテープ等のテープ系、フロッピーディスク,ハードディスク等の磁気ディスクやCD(コンパクトディスク)‐ROM,MO(光磁気)ディスク,MD(ミニディスク),DVD(ディジタル多用途ディスク)等の光ディスクのディスク系、IC(集積回路)カードや光カード等のカード系、マスクROM,EPROM(紫外線消去型ROM),EEPROM(電気的消去型ROM),フラッシュROM等の半導体メモリ系を含めた、固定的にプログラムを坦持する媒体である。 Here, the program medium is configured to be separable from the main body side, and is a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy disk or a hard disk, a CD (compact disk) -ROM, or MO (magneto-optical). Optical discs such as discs, MD (mini discs) and DVDs (digital versatile discs), card systems such as IC (integrated circuit) cards and optical cards, mask ROM, EPROM (ultraviolet erasable ROM), EEPROM (electrical This is a medium that carries a fixed program, including a semiconductor memory system such as a static erasable ROM) and a flash ROM.
また、上記実施の形態におけるソースプログラム変換装置は、インターネット等の通信ネットワークと通信I/Fを介して接続可能な構成を有している場合には、上記プログラムメディアは、通信ネットワークからのダウンロード等によって流動的にプログラムを坦持する媒体であっても差し支えない。尚、その場合における上記通信ネットワークからダウンロードするためのダウンロードプログラムは、予め本体装置に格納されているものとする。あるいは、別の記録媒体からインストールされるものとする。 When the source program conversion apparatus in the above embodiment has a configuration that can be connected to a communication network such as the Internet via a communication I / F, the program medium is downloaded from the communication network, etc. Even if it is a medium that carries the program in a fluid way, there is no problem. In this case, it is assumed that a download program for downloading from the communication network is stored in the main device in advance. Or it shall be installed from another recording medium.
尚、上記記録媒体に記録されるものはプログラムのみに限定されるものではなく、データも記録することが可能である。 Note that what is recorded on the recording medium is not limited to the program, and data can also be recorded.
本発明のソースプログラム変換装置は、第1プログラム言語で記述されたソースプログラムから入力コマンドに応じた処理を実行できる1つのデバッグルーチンが付加されると共に第2プログラム言語で記述された変換後ソースプログラムを生成するものであり、デバッガを使用せずにソースプログラムのデバッグを行う際に用いることができる。 A source program conversion apparatus according to the present invention is provided with a post-conversion source program described in a second program language, to which one debug routine capable of executing processing according to an input command is added from the source program described in the first program language Can be used when debugging a source program without using a debugger.
11…ソースプログラム格納部,ソースプログラム、
12…ソースプログラム変換部、
13…変換後ソースプログラム格納部,変換後ソースプログラム、
14…コンパイラ、
15…実行形式ファイル格納部、
16…プログラム言語変換手段、
17…中間データ格納部,中間データ、
18…対話的デバッグルーチン呼出命令追加手段、
19…対話的デバッグルーチン追加手段、
21,22…ステートメント、
23,24,41a〜41e…処理プログラム、
25,26,42a〜42d…対話的デバッグルーチン呼出命令、
31…停止条件判定処理部、
32…コマンド受付処理部、
33…コマンド解析・実行処理部、
34…変数の表示処理部、
35…停止条件の設定処理部、
36…停止条件の変更処理部、
37…プログラム続行処理部、
43…対話的デバッグルーチン。
11 ... Source program storage unit, source program,
12 ... Source program conversion unit,
13 ... converted source program storage, converted source program,
14 ... Compiler
15 ... Execution format file storage unit,
16 ... Program language conversion means,
17: Intermediate data storage unit, intermediate data,
18 ... Interactive debug routine call instruction addition means,
19: Means for adding an interactive debugging routine,
21,22 ... statement,
23, 24, 41a to 41e ... processing program,
25, 26, 42a to 42d ... interactive debug routine call instruction,
31 ... Stop condition determination processing unit,
32 ... Command reception processing unit,
33 ... Command analysis / execution processing unit,
34 ... Variable display processing unit,
35 ... Stop condition setting processing unit,
36 ... Stop condition change processing unit,
37. Program continuation processing unit,
43 ... Interactive debug routine.
Claims (7)
第1プログラム言語で記述された第1ソースプログラムを第2プログラム言語による記述に変換し、中間データとして出力するプログラム言語変換手段と、
上記中間データから上記第1ソースプログラム内の1つのステートメントに相当する処理プログラムを処理順序に従って読み出し、この読み出した各処理プログラムに対話的デバッグルーチン呼出命令を追加して、第2プログラム言語の文法に従って第2ソースプログラムとして出力する対話的デバッグルーチン呼出命令追加手段と、
上記対話的デバッグルーチン呼出命令によって起動されると共に、上記第2プログラム言語で記述されて、デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能な対話的デバッグルーチンを、上記第2ソースプログラムに追加する対話的デバッグルーチン追加手段
を備えたことを特徴とするソースプログラム変換装置。 In a source program conversion apparatus that adds a debugging routine for performing debugging processing to a source program to be debugged,
A program language conversion means for converting the first source program described in the first program language into a description in the second program language and outputting as intermediate data;
A processing program corresponding to one statement in the first source program is read from the intermediate data in accordance with the processing order, an interactive debug routine call instruction is added to each of the read processing programs, and according to the grammar of the second program language. Interactive debug routine call instruction adding means for outputting as a second source program;
An interactive debug routine that is activated by the interactive debug routine call instruction and that is described in the second programming language and that can receive a command input by a debug operator and determine a process to be performed next. A source program conversion apparatus comprising interactive debug routine adding means for adding a program to the second source program.
上記対話的デバッグルーチンには、当該対話的デバッグルーチンに停止条件が設定されているか否かを判定し、設定されている場合には上記第2ソースプログラムの実行を停止する停止条件判定処理部が設けられていることを特徴とするソースプログラム変換装置。 The source program conversion apparatus according to claim 1,
The interactive debug routine includes a stop condition determination processing unit that determines whether or not a stop condition is set in the interactive debug routine, and if set, a stop condition determination processing unit that stops the execution of the second source program. A source program conversion apparatus characterized by being provided.
上記対話的デバッグルーチンには、デバッグ作業者によって上記停止条件を設定するコマンドが入力された際に、当該対話的デバッグルーチンに停止条件を設定する停止条件設定処理部が設けられていることを特徴とするソースプログラム変換装置。 The source program conversion apparatus according to claim 2, wherein
The interactive debug routine is provided with a stop condition setting processing unit for setting a stop condition in the interactive debug routine when a command for setting the stop condition is input by a debug operator. A source program conversion device.
上記対話的デバッグルーチンには、デバッグ作業者によって上記停止条件を変更するコマンドが入力された際に、既に当該対話的デバッグルーチンに設定されている停止条件を変更する停止条件変更処理部が設けられていることを特徴とするソースプログラム変換装置。 In the source program conversion apparatus according to claim 3,
The interactive debug routine is provided with a stop condition change processing unit that changes a stop condition already set in the interactive debug routine when a command for changing the stop condition is input by a debug operator. A source program conversion apparatus characterized by comprising:
第1プログラム言語で記述された第1ソースプログラムを第2プログラム言語による記述に変換して中間データとして出力し、
上記中間データから上記第1ソースプログラム内の1つのステートメントに相当する処理プログラムを処理順序に従って読み出し、この読み出した各処理プログラムに対話的デバッグルーチン呼出命令を追加して、第2プログラム言語の文法に従って第2ソースプログラムとして出力し、
上記対話的デバッグルーチン呼出命令によって起動されると共に、上記第2プログラム言語で記述されて、デバッグ作業者によって入力されるコマンドを受けて次に行うべき処理を決定することが可能な対話的デバッグルーチンを、上記第2ソースプログラムに追加する
ことを特徴とするソースプログラム変換方法。 In a source program conversion method for adding a debugging routine for performing debugging processing to a source program to be debugged,
Converting the first source program described in the first programming language into a description in the second programming language and outputting it as intermediate data;
A processing program corresponding to one statement in the first source program is read from the intermediate data in accordance with the processing order, an interactive debug routine call instruction is added to each of the read processing programs, and according to the grammar of the second program language. Output as the second source program,
An interactive debug routine that is activated by the interactive debug routine call instruction and that is described in the second programming language and that can receive a command input by a debug operator and determine a process to be performed next. Is added to the second source program.
請求項1におけるプログラム言語変換手段,対話的デバッグルーチン呼出命令追加手段および対話的デバッグルーチン追加手段
として機能させることを特徴とするソースプログラム変換プログラム。 Computer
A source program conversion program which functions as the program language conversion means, interactive debug routine call instruction addition means and interactive debug routine addition means according to claim 1.
A computer-readable program recording medium on which the source program conversion program according to claim 6 is recorded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003414185A JP2005174045A (en) | 2003-12-12 | 2003-12-12 | Source program conversion device, source program conversion method, source program conversion program and program recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003414185A JP2005174045A (en) | 2003-12-12 | 2003-12-12 | Source program conversion device, source program conversion method, source program conversion program and program recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005174045A true JP2005174045A (en) | 2005-06-30 |
Family
ID=34734060
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003414185A Pending JP2005174045A (en) | 2003-12-12 | 2003-12-12 | Source program conversion device, source program conversion method, source program conversion program and program recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005174045A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009172887A (en) * | 2008-01-25 | 2009-08-06 | Canon Inc | Image formation device, control method in image formation device, and program |
WO2011067398A1 (en) * | 2009-12-03 | 2011-06-09 | Flexycore | Software application fine-tuning method, system, and corresponding computer program product |
JP2012254640A (en) * | 2012-09-03 | 2012-12-27 | Canon Inc | Image formation device, control method in image formation method, and program |
JP2013176994A (en) * | 2013-04-25 | 2013-09-09 | Canon Inc | Printing device, method of controlling the same and program |
CN105786688A (en) * | 2014-12-23 | 2016-07-20 | 华润半导体(深圳)有限公司 | Microcontroller application software debugging method |
JPWO2021024472A1 (en) * | 2019-08-08 | 2021-02-11 |
-
2003
- 2003-12-12 JP JP2003414185A patent/JP2005174045A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009172887A (en) * | 2008-01-25 | 2009-08-06 | Canon Inc | Image formation device, control method in image formation device, and program |
WO2011067398A1 (en) * | 2009-12-03 | 2011-06-09 | Flexycore | Software application fine-tuning method, system, and corresponding computer program product |
FR2953612A1 (en) * | 2009-12-03 | 2011-06-10 | Flexycore | METHOD FOR DEVELOPING SOFTWARE APPLICATION, SYSTEM AND CORRESPONDING COMPUTER PROGRAM PRODUCT. |
US8776024B2 (en) | 2009-12-03 | 2014-07-08 | Google Inc. | Software application fine-tuning method, system, and corresponding computer program product |
JP2012254640A (en) * | 2012-09-03 | 2012-12-27 | Canon Inc | Image formation device, control method in image formation method, and program |
JP2013176994A (en) * | 2013-04-25 | 2013-09-09 | Canon Inc | Printing device, method of controlling the same and program |
CN105786688A (en) * | 2014-12-23 | 2016-07-20 | 华润半导体(深圳)有限公司 | Microcontroller application software debugging method |
JPWO2021024472A1 (en) * | 2019-08-08 | 2021-02-11 | ||
WO2021024472A1 (en) * | 2019-08-08 | 2021-02-11 | 日本電気株式会社 | Function estimation device, function estimation method, and computer-readable medium |
JP7298692B2 (en) | 2019-08-08 | 2023-06-27 | 日本電気株式会社 | Function estimation device, function estimation method and program |
US11868744B2 (en) | 2019-08-08 | 2024-01-09 | Nec Corporation | Estimation of features corresponding to extracted commands used to divide code of software |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4950454B2 (en) | Stack hierarchy for test automation | |
JP6280126B2 (en) | System and method for debugging domain specific languages | |
KR101246967B1 (en) | Method and apparatus for executing unit tests in application host environment | |
US6931627B2 (en) | System and method for combinatorial test generation in a compatibility testing environment | |
JP5415557B2 (en) | User script code conversion for debugging | |
US8201143B2 (en) | Dynamic mating of a modified user interface with pre-modified user interface code library | |
US20090144705A1 (en) | Debugging device and debugging method | |
US7895575B2 (en) | Apparatus and method for generating test driver | |
US20080209401A1 (en) | Techniques for integrating debugging with decompilation | |
US9274930B2 (en) | Debugging system using static analysis | |
CN113742119A (en) | Call stack backtracking method and device of embedded system and computer equipment | |
JP2004164554A (en) | Device and method for executing and monitoring program | |
JP5303795B2 (en) | Application analysis method, analysis system, and analysis program | |
US7624381B1 (en) | Portable detection of start and completion of object construction | |
JP2005174045A (en) | Source program conversion device, source program conversion method, source program conversion program and program recording medium | |
JP2009104252A (en) | Debugging support device and debugging support method | |
KR100790470B1 (en) | Method and apparatus for automatically generating test case for device driver test | |
JP2008140263A (en) | Unit test support device | |
JP2015146178A (en) | Creation of test context | |
EP0801348A1 (en) | Method of monitoring the operation of a computer | |
KR101476536B1 (en) | The method and system for inspecting program | |
JP2014106770A (en) | Type check device, type check method and type check program | |
JP5067705B2 (en) | Abnormal test support device, abnormal test support method, and program | |
JP2004287869A (en) | Program execution monitoring device and method | |
CN117093490A (en) | Code processing method, device, computer equipment and storage medium |