JP2014067211A - Debugging support system for opencobol programs - Google Patents
Debugging support system for opencobol programs Download PDFInfo
- Publication number
- JP2014067211A JP2014067211A JP2012211868A JP2012211868A JP2014067211A JP 2014067211 A JP2014067211 A JP 2014067211A JP 2012211868 A JP2012211868 A JP 2012211868A JP 2012211868 A JP2012211868 A JP 2012211868A JP 2014067211 A JP2014067211 A JP 2014067211A
- Authority
- JP
- Japan
- Prior art keywords
- source code
- opencobol
- file
- debugging
- variable name
- 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
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明は、OpenCOBOLプログラムで実装したアプリケーションの効率的なデバッグ、特にマシンデバッグを実行可能としたデバッグ支援システムに関するものである。 The present invention relates to a debugging support system capable of executing efficient debugging of an application implemented by an OpenCOBOL program, particularly machine debugging.
近年、ライセンスコストを抑えたいという理由で、オープンソースソフトウェアを適用する企業が増えている。最近では、COBOLを使用したアプリケーションを適用している企業においても、商用COBOLで作成したアプリケーションをOpenCOBOLへ移行するような事案が出てきている。 In recent years, an increasing number of companies apply open source software because they want to reduce licensing costs. Recently, companies that have applied applications using COBOL have started to migrate applications created with commercial COBOL to OpenCOBOL.
図1は、従来の商用COBOLプログラムからOpenCOBOLプログラムへの移行を行う場合のシステム概略構成図である。商用COBOLプログラムの開発実行環境があるメインフレーム101、商用COBOLプログラムのソースコードであるCOBOLソースコード102、OpenCOBOLプログラムの開発実行環境がある、商用を含むLinux(登録商標)サーバ103、OpenCOBOLプログラムのソースコードであるOpenCOBOLソースコード104、OpenCOBOLコンパイラ105、OpenCOBOLで作成したアプリケーション106、COBOLデバッグツール(簡易版)107とから構成されている。
FIG. 1 is a schematic configuration diagram of a system when a conventional commercial COBOL program is migrated to an OpenCOBOL program. Mainframe 101 with commercial COBOL program development and execution environment, COBOL
このような構成の環境において、商用COBOLプログラムをOpenCOBOLプログラムへ移行する場合、メインフレーム101にある商用COBOLソースコード102を、OpenCOBOLプログラムの開発実行環境がある商用を含むLinux(登録商標)サーバ103にコピーする。次に、コンパイラに依存する部分のソースコードを修正してOpenCOBOLソースコード104とし、OpenCOBOLコンパイラ105でコンパイルを実行しテスト行う。問題なければアプリケーション106の運用を開始する。テスト時、またはアプリケーション実行時に問題がある場合は、COBOLデバッグツール(簡易版)107を使用するか、机上デバッグによりソースコードを見直して、対策を行う。
なお、本発明に関連する公知技術文献としては特許文献1〜4がある。
When migrating a commercial COBOL program to an OpenCOBOL program in such an environment, the commercial COBOL
In addition, there exist patent documents 1-4 as a well-known technical document relevant to this invention.
ところで、図1に示すCOBOLデバッグツール(簡易版)107は、デバッガーの機能としては高度なことができない。例えば、メインプログラムからサブプログラムを呼び出すようなプログラム構成でのデバッグができない、日本語が使用できないなどの制限がある。このため、マシンデバッグが難しく、机上でのデバッグに頼っているのが実情という問題がある。 By the way, the COBOL debug tool (simplified version) 107 shown in FIG. 1 cannot be advanced as a debugger function. For example, there is a restriction that debugging cannot be performed in a program configuration in which a subprogram is called from a main program, and Japanese cannot be used. For this reason, machine debugging is difficult, and there is a problem that it depends on debugging on the desk.
本発明の目的は、OpenCOBOLでコーディングしたプログラムに問題があった場合に、机上デバッグではなくマシンデバッグが可能となるデバッグ支援システムを提供することにある。 An object of the present invention is to provide a debugging support system that enables machine debugging instead of desktop debugging when there is a problem with a program coded in OpenCOBOL.
上記目的を達成するために、本発明は、オープンな統合開発環境ツールであるEclipseのCDT(C/C++ Development Tooling)というプラグインを用いた、Cソースコードデバッグ機能によるOpenCOBOLプログラムのデバッグ支援システムを提供する。 In order to achieve the above object, the present invention provides an OpenCOBOL program debugging support system using a C source code debugging function using a plug-in called CDT (C / C ++ Development Tooling) of Eclipse, which is an open integrated development environment tool. provide.
OpenCOBOLソースコードは、コンパイルの際にコンパイラが一旦Cソースコードに変換し、その後、変換されたCソースコードをコンパイルして実行可能形式ファイルが生成される。この特性を利用し、Cソースコードによるデバッグ機能を提供する。EclipseのCDTプラグインのデバッグツールは、EclipseのGUI(Graphical User Interface)上で高度なデバッグを実行することができる。加えて、Cプログラムに慣れたプログラマーにとっては、Cプログラムをデバッグ対象にするメリットがある。 When compiling OpenCOBOL source code, the compiler temporarily converts it into C source code, and then the converted C source code is compiled to generate an executable file. Using this characteristic, a debugging function using C source code is provided. The Eclipse CDT plug-in debugging tool can perform advanced debugging on the Eclipse GUI (Graphical User Interface). In addition, programmers accustomed to C programs have the advantage of making C programs debug targets.
但し、OpenCOBOLソースコードに対する直接的なデバッグはできないため、OpenCOBOLソースコードとCソースコードの対応付けが判断しにくい。これを解決するため、本発明により、Cソースコードの変数名に対応したOpenCOBOLソースコードのデータ定義名を、Eclipse のGUIのデバッグ画面に表示することで、ユーザーによるOpenCOBOLソースコードのデバッグが簡易化できる。Cソースコードの変数名に対応したOpenCOBOLソースコードのデータ定義名の表示方法は、OpenCOBOLソースコードのコンパイル実行時に、Cソースコードの変数名とOpenCOBOLソースコードのデータ定義名の対応表を作成し、EclipseのCソースコードによるデバッグの実行時に、この対応表を参照する方法で実現する。 However, since it is not possible to directly debug OpenCOBOL source code, it is difficult to determine the correspondence between OpenCOBOL source code and C source code. To solve this problem, the present invention simplifies debugging of OpenCOBOL source code by displaying the data definition name of the OpenCOBOL source code corresponding to the variable name of the C source code on the debugging screen of the Eclipse GUI. it can. To display the data definition name of the OpenCOBOL source code corresponding to the variable name of the C source code, create a correspondence table between the variable name of the C source code and the data definition name of the OpenCOBOL source code when compiling the OpenCOBOL source code. This is realized by referring to this correspondence table when executing debugging with Eclipse C source code.
さらに、この対応表を出力する際にOpenCOBOLソースコードの各部分に対してレベルを設け、バグを作り込んでしまいそうな箇所や、性能で問題が発生しそうな箇所のみを対象に、対応表を作成するオプションについても提供する。 Furthermore, when this correspondence table is output, a level is set for each part of the OpenCOBOL source code, and a correspondence table is created only for places where bugs are likely to be created or where performance problems are likely to occur. Also provides options to create.
また、Cソースコードのデバッグ実行中のデバッグ行に対応したOpenCOBOLソースコード行を特定するために、Cソースコードのデバッグ実行中のエディタの実行行からOpenCOBOLソースコードの対象行をターゲットにしてOpenCOBOLソースコードのファイルをエディタで開くことができる。また、OpenCOBOLソースコードをコンパイルする際、コンパイラにより出力されたCソースコードの該当行を特定するために、OpenCOBOLソースコード行から、Cソースコードの対象行をターゲットにしてCソースコードのファイルをエディタで開くことができる。 Also, in order to identify the OpenCOBOL source code line corresponding to the debug line during debug execution of the C source code, the target line of the OpenCOBOL source code is targeted from the editor execution line during debug execution of the C source code. You can open the code file in an editor. Also, when compiling OpenCOBOL source code, in order to identify the corresponding line of the C source code output by the compiler, the C source code file is targeted from the OpenCOBOL source code line to the target line of the C source code. Can be opened.
本発明の具体的態様は、次の通りである。
OpenCOBOLプログラムのデバッグ支援システムであって、サーバが、OpenCOBOLプログラムのソースコードであるOpenCOBOLソースコードに対してOpenCOBOLコンパイラによるコンパイルを実行し、Cソースコードに変換する手段と、変換された前記Cソースコードに対してEclipseのCDT(C/C++ Development Tooling)プラグインのデバッグツールを用いてデバッグを実行する手段と、を備えている。
Specific embodiments of the present invention are as follows.
An OpenCOBOL program debugging support system, in which a server compiles an OpenCOBOL source code that is an OpenCOBOL program source code by an OpenCOBOL compiler and converts it into C source code, and the converted C source code And a means for executing debugging using a debugging tool of CDT (C / C ++ Development Tooling) plug-in of Eclipse.
上記システムにおいて、前記Cソースコードに変換する手段は、前記Cソースコードへの変換に先立って、1又は複数の前記Cソースコードの変数名と、対応するOpenCOBOLソースコードのデータ定義名とを対応付けた変数名対応表ファイルを出力する手段と、前記OpenCOBOLソースコードを前記Cソースコードに変換する際に、前記変数名対応表ファイルを参照し、該変数名対応表ファイルに含まれる前記Cソースコードの変数名を含む行に対して前記OpenCOBOLソースコードのファイル名と対応する行番号とを付加してCソースコードを出力する手段と、を有することが好適である。 In the above system, the means for converting to the C source code corresponds to one or more variable names of the C source code and data definition names of the corresponding OpenCOBOL source code prior to the conversion to the C source code. Means for outputting the attached variable name correspondence table file, and the C source included in the variable name correspondence table file by referring to the variable name correspondence table file when converting the OpenCOBOL source code into the C source code It is preferable to include means for adding a file name of the OpenCOBOL source code and a corresponding line number to a line including a variable name of the code and outputting a C source code.
上記システムにおいて、前記変数名対応表ファイルを出力する手段は、予め指定された、不良を作り込む可能性が高い配列処理部分または性能に関連するファイルI/Oの処理部分のいずれかまたは双方の部分について、前記Cソースコードの変数名と前記OpenCOBOLソースコードのデータ定義名との対応付けを前記変数名対応表ファイルに出力する手段を有することが好適である。 In the above-described system, the means for outputting the variable name correspondence table file is either a pre-designated sequence processing portion that has a high possibility of creating a defect or a processing portion of file I / O related to performance, or both. It is preferable to have means for outputting a correspondence between the variable name of the C source code and the data definition name of the OpenCOBOL source code to the variable name correspondence table file.
上記システムにおいて、前記デバッグを実行する手段は、前記変数名対応表ファイルを読み込んで、EclipseのGUI(Graphical User Interface)の画面上に前記Cソースコードの変数名と前記OpenCOBOLソースコードのデータ定義名とを対応付けた形式で表示する手段を有することが好適である。
前記Cソースコードが表示されたEclipseのCエディタにおいて前記OpenCOBOLソースコードのファイルのオープン処理を実行することにより、前記Cソースコードに含まれる前記OpenCOBOLソースコードのファイル名と行番号を含む行に基づいて、対応する前記OpenCOBOLソースコードのファイルの対応する行をオープンする手段を有することが好適である。
前記Cソースコードは前記OpenCOBOLソースコードと同じファイル名で出力され、前記OpenCOBOLソースコードが表示されたEclipseのCOBOLエディタにおいて前記Cソースコードのファイルのオープン処理を実行することにより、前記OpenCOBOLソースコードのファイルと同名の前記Cソースコードのファイルをオープンする手段と、を有することが好適である。
In the above system, the debugging means reads the variable name correspondence table file and displays the variable name of the C source code and the data definition name of the OpenCOBOL source code on an Eclipse GUI (Graphical User Interface) screen. It is preferable to have means for displaying in a format in which
Based on the line including the file name and line number of the OpenCOBOL source code included in the C source code by executing the open process of the file of the OpenCOBOL source code in the Eclipse C editor displaying the C source code It is preferable to have means for opening the corresponding line of the corresponding OpenCOBOL source code file.
The C source code is output with the same file name as the OpenCOBOL source code, and the C source code file is opened in the Eclipse COBOL editor displaying the OpenCOBOL source code. And means for opening the C source code file having the same name as the file.
本発明のOpenCOBOLプログラムのデバッグ支援システムによれば、次のような効果がある。
これまでは、主に机上で行っていたOpenCOBOLでコーディングしたソースコードのデバッグを、マシン上で実行できる。
The debugging support system for the OpenCOBOL program of the present invention has the following effects.
Until now, debugging of source code coded in OpenCOBOL, which was mainly done on the desk, can be executed on the machine.
以下、本発明を適用したOpenCOBOLプログラムのデバッグ支援システムの一実施の形態について説明する。 An embodiment of an OpenCOBOL program debugging support system to which the present invention is applied will be described below.
図2は、本発明の実施の形態の一例を示すシステム概略構成図である。OpenCOBOLプログラムの開発実行環境がある、商用を含むLinux(登録商標)サーバ200、OpenCOBOLプログラムのソースコードであるOpenCOBOLソースコード201、OpenCOBOLのコンパイラであるOpenCOBOLコンパイラ202、CソースコードのデバッグツールであるEclipse CDT203、OpenCOBOLで作成したアプリケーション204、OpenCOBOLコンパイラ202が出力したCソースコード205、Cソースコードの変数名とOpenCOBOLソースコードのデータ定義名とを対応つけたC-COBOL変数名対応表206とから構成されている。
FIG. 2 is a schematic system configuration diagram showing an example of an embodiment of the present invention. Linux (registered trademark) server 200 including commercial, which has an OpenCOBOL program development and execution environment, OpenCOBOL
LINUX(登録商標)サーバ200は、適宜のコンピュータである。OpenCOBOLソースコード201およびアプリケーション204は、適宜の外部記憶装置に記憶されたプログラムファイルである。OpenCOBOLコンパイラ202およびEclipse CDT203はそれ自体はプログラムファイルであるが、ここでは、これらのプログラムが実行(CPUがメモリに読み込み実行)されることにより実現される本発明の機能の意味で用いる。すなわち、OpenCOBOLコンパイラ202およびEclipse CDT203は、一般的な機能に加え、後述する本発明独自の処理を行う機能を含むものである。
The LINUX (registered trademark) server 200 is an appropriate computer. The OpenCOBOL
OpenCOBOLソースコード201に対して、OpenCOBOLコンパイラ202でコンパイルを実行した際、OpenCOBOLコンパイラ202は、Cソースコード205と、C-COBOL変数名対応表206の各ファイルを出力する。Cソースコード205とC-COBOL変数名対応表206は、適宜の外部記憶装置に記憶される。
When the OpenCOBOL
Cソースコード205は、コンパイル対象のOpenCOBOLソースコード202から一旦Cソースコード形式で出力されたものである。このCソースコード205に対して、Eclipse CDT203を使用して、マシンデバッグを実行できる。例えば、Cソースコードの文字列型の変数:「b_16」に「"HelloWorld"」という文字列データが入っていた場合は、EclipseのGUI上の変数情報の詳細を表示するダイアログに、「b_16 data="HelloWorld"」のように表示され、変数にどのようなデータが入っているかを確認できる。
The C source code 205 is output once in the C source code format from the OpenCOBOL
この方法は、Cソースコードによるマシンデバッグの実行であり、OpenCOBOLソースコードを直接デバッグできるものではない。この支援として、Eclipse CDT203のデバッグ実行中に、Cソースコードで使用されている変数名の詳細情報を参照しようとした場合に、OpenCOBOLソースコードで使用されているデータ定義名をGUI上に表示する。これを実現する手段として、C-COBOL変数名対応表206を使用する。OpenCOBOLコンパイラ203は、コンパイル実行時にC-COBOL変数名対応表206を出力する。そして、Eclipse CDT203のデバッグ実行中に、Eclipse CDT203がC-COBOL変数名対応表206の内容を解析して、Cソースコードの変数名に対応付けられたOpenCOBOLソースコードのデータ定義名をGUI上に表示する。例えば、Cソースコードの文字列型の変数名:「b_16」とOpenCOBOLソースコードのデータ定義名「DATA01」が対応付いている場合、EclipseのGUI上の変数情報の詳細を表示するダイアログに、「C Name :b_16 COBOL Name : DATA01」のように表示され、Cソースコードで使用されている変数名が、OpenCOBOLソースコード上のどのデータ定義名に該当しているかを確認できる。
This method executes machine debugging with C source code, and cannot directly debug OpenCOBOL source code. As a support for this, when trying to refer to detailed information on variable names used in C source code while debugging Eclipse CDT203, the data definition name used in OpenCOBOL source code is displayed on the GUI. . As a means for realizing this, a C-COBOL variable name correspondence table 206 is used. The
図3は、図2に示したC-COBOL変数名対応表においてCソースコードの変数名(以下「C変数名」と称する場合がある)と、当該Cソースコードの変数名に対応するOpenCOBOLソースコードのデータ定義名(以下「OpenCOBOLデータ定義名」と称する場合がある)とを対応付けた表の一例の図である。C-COBOL変数名対応表300は、C変数名301と、C変数名に対応したOpenCOBOLデータ定義名302と、ファイルI/O(ファイル入出力)実行回数303と、から構成されている。C-COBOL変数名対応表300は、OpenCOBOLコンパイラによるコンパイル実行時に出力し、Eclipse CDTによるデバッグ画面で参照される。
3 shows the variable name of the C source code in the C-COBOL variable name correspondence table shown in FIG. 2 (hereinafter sometimes referred to as “C variable name”) and the OpenCOBOL source corresponding to the variable name of the C source code. It is an example of a table in which data definition names of codes (hereinafter sometimes referred to as “OpenCOBOL data definition names”) are associated. The C-COBOL variable name correspondence table 300 includes a C
図4は、Eclipse400上での本発明に係るOpenCOBOLソースコードとCソースコードの相互連携処理を表した図である。符号401は、ユーザーによりコーディングされるOpenCOBOLソースコードの概略図である。符号402は、OpenCOBOLコンパイラにより401のOpenCOBOLソースコードをコンパイルした際に出力されるCソースコードの概略図である。
FIG. 4 is a diagram showing the mutual cooperation processing of the OpenCOBOL source code and the C source code according to the present invention on
ここで、符号403の行は、符号402の形式のCソースコードとして出力されているが、この際、符号404で表す行に、OpenCOBOLソースコードのファイル名と対応する行番号とが出力されている。この符号404で表す行の情報をキーとして、Eclipse400上でCエディタとCOBOLエディタの相互参照が可能となる。すなわち、CソースコードとOpenCOBOLソースコードの一方のファイルを開く際に、CソースコードとOpenCOBOLソースコードを関連付けている行番号の部分をターゲットとして、他方のファイルを開くことができる。
Here, the
図5は、図3に示したC-COBOL変数名対応表を出力する処理の概要を示すフローチャートである。
C-COBOL変数名対応表は、図2のOpenCOBOLコンパイラ202がコンパイル実行時に出力するが、出力する条件として、ユーザーによるコンパイルオプションと環境変数の設定が必要である。
FIG. 5 is a flowchart showing an outline of processing for outputting the C-COBOL variable name correspondence table shown in FIG.
The
OpenCOBOLコンパイラ202は、ユーザーがコンパイルコマンドを実行すると(ステップ501)、C-COBOL変数名対応表出力のためのコンパイルオプション(出力要否)が指定されているか否か、および、C-COBOL変数名対応表出力のための環境変数が指定されているか否かをチェックする(ステップ502)。
When the user executes a compile command (step 501), the
ステップ503でチェック結果がC-COBOL変数名対応表の出力要の場合は、配列処理オプションおよび性能処理オプションの指定チェック処理を行う(ステップ504)。一方ステップ503でチェック結果が出力否の場合は、C-COBOL変数名対応表を出力しない(ステップ512)。ここで配列処理オプションとは、不良を作り込む可能性が高い配列処理部分(文字列の部分参照やテーブルアクセス)の変数情報を、C-COBOL変数名対応表に出力するというオプションである。また、性能処理オプションとは、性能に関連するファイルI/Oの処理部分の変数情報を、C-COBOL変数名対応表に出力するというオプションである。ステップ504で、配列処理オプションおよび性能処理オプションが両方指定されているかチェックする。
If the check result is that the output of the C-COBOL variable name correspondence table is necessary in
ステップ505でチェック結果が、配列処理オプションおよび性能処理オプションが両方指定されている場合は、配列・性能部分の変数についてC-COBOL変数名対応表の出力処理を行う(ステップ513)。一方ステップ505で、配列処理オプションおよび性能処理オプションが両方指定されていない場合は、配列処理オプションの有無のチェックを行う(ステップ506)。
If both the array processing option and the performance processing option are specified in the check result in
ステップ507でチェック結果が、配列処理オプションが指定されている場合は、配列部分の変数についてC-COBOL変数名対応表の出力処理を行う(ステップ514)。一方ステップ507で配列処理オプションが指定されていない場合は、性能処理オプションの有無のチェックを行う(ステップ508)。
If the array processing option is specified as the check result in
ステップ509でチェック結果が、性能処理オプションが指定されている場合は、性能部分の変数についてC-COBOL変数名対応表の出力処理を行う(ステップ515)。一方ステップ509で性能処理オプションが指定されていない場合は、全ての変数情報のC-COBOL変数名対応表の出力処理を行う(ステップ510)。
When the performance processing option is specified as the check result in
ステップ513の配列処理オプション実行の処理、およびステップ514の処理では、C-COBOL変数名対応情報の他に、OpenCOBOLの表形式のデータ項目番号に対応したC配列番号の出力を行う。
In the processing of the array processing option execution in
ステップ513の性能処理オプション実行の処理、およびステップ515の処理では、C-COBOL変数名対応情報の他に、ファイルI/Oの実行回数を付与した出力を行う。
In the performance processing option execution processing in
C-COBOL変数名対応表の出力処理が完了した後、アプリケーション(図2に示す204)、Cソースコード(図2に示す205)およびオブジェクトファイルなどを出力してコンパイル処理を終了する(ステップ511)。 After the output processing of the C-COBOL variable name correspondence table is completed, the application (204 shown in FIG. 2), the C source code (205 shown in FIG. 2), the object file, and the like are output, and the compilation processing ends (step 511). ).
図6は、図2に示したEclipse CDT203によるデバッグ実行時のCソースコードの変数情報参照処理の概要を示すフローチャートである。
FIG. 6 is a flowchart showing an overview of C source code variable information reference processing during debugging by the
Eclipse CDT203でデバッグを実行する場合、デバッグ中にCソースコードの変数情報とOpenCOBOLソースコードの変数情報を対応付いた形式で表示するためには、C-COBOL変数名対応表が参照可能の状態である必要がある。例えば、C-COBOL変数名対応表が存在しない場合や、アクセス権が無い場合は、デバッグ中にCソースコードの変数情報とOpenCOBOLソースコードの変数情報を対応付いた形式で表示することはできない。 When debugging with Eclipse CDT203, the C-COBOL variable name correspondence table can be referenced to display the variable information of the C source code and the variable information of the OpenCOBOL source code in the form of correspondence during debugging. There must be. For example, if the C-COBOL variable name correspondence table does not exist or if you do not have access rights, variable information of C source code and variable information of OpenCOBOL source code cannot be displayed in a format during debugging.
ユーザーがEclipse CDT203を起動する(ステップ601)。EclipseのGUI上でCソースコードの変数を参照すると(ステップ602)、Eclipse CDTはC-COBOL変数名対応表が参照可能か否かをチェックする(ステップ603)。 The user starts Eclipse CDT 203 (step 601). When a C source code variable is referenced on the Eclipse GUI (step 602), the Eclipse CDT checks whether the C-COBOL variable name correspondence table can be referenced (step 603).
ステップ604でチェック結果が参照可能の場合は、データ項目が二次元以上の配列か否かをチェックする(ステップ605)。これは、二次元以上の配列の場合、実装が複雑になり不良を作り込む可能性が高くなることから、表示形式をより分かりやすくするためである。ステップ606のチェック結果で、データ項目が二次元以上の配列である場合は、C変数情報詳細画面のC変数名フィールドとCOBOLデータ名を表形式で表示する(ステップ607)。この際、多次元配列の表については、親の表の任意のデータ項目を選択したら、さらに対応付いた子の表情報を表示する。一方、ステップ606のチェック結果で、データ項目が二次元以上の配列ではない場合は、C変数情報詳細画面のC変数名フィールドと並行して、COBOLデータ名を表示する(ステップ609)。
If the check result can be referred to in
ステップ604でチェック結果が参照不可の場合は、OpenCOBOLソースコードの変数情報は表示せずに、Cソースコードの変数情報のみを表示して(ステップ608)、処理を終了する。
If the check result cannot be referred to in
図7は、EclipseのCOBOLエディタからCソースコードをオープンする処理のフローチャートである。まず、OpenCOBOLソースコードをOpenCOBOLコンパイラでコンパイルした際に出力されるCソースコードは、拡張子を除いたファイル名が同じものとなる。また、出力されるCソースコードには、COBOL実行行の行番号と出力元COBOLファイル名が”cob_set_location”という関数のパラメータとして出力されている(図4の符号404の形式)。
FIG. 7 is a flowchart of processing for opening C source code from the Eclipse COBOL editor. First, the C source code output when the OpenCOBOL source code is compiled with the OpenCOBOL compiler has the same file name excluding the extension. In the output C source code, the line number of the COBOL execution line and the output source COBOL file name are output as parameters of the function “cob_set_location” (
COBOLエディタからCソースコードを参照する処理は、ファイル名の一致と”cob_set_location”行のパラメータの出力値を参照することで行う。 Referencing the C source code from the COBOL editor is performed by referring to the output value of the parameter in the "cob_set_location" line and the matching of the file name.
ステップ701で、ユーザーがEclipseのCOBOLエディタで「Cソースを開く」の実行を選択する(例えば、COBOLエディタで開いているOpenCOBOLソースコードにおけるターゲットとする行を右クリックする)。これによりCOBOLエディタで開いているOpenCOBOLソースコードと対応付いた名称のCソースコードをオープンする処理を開始する。ここでOpenCOBOLソースコードとCソースコードの名称の対応付けとは、拡張子の前のファイル名が一致するものを言う。
In
ステップ702で、OpenCOBOLソースコードと対応付いたCソースコードが存在するかどうかのチェックを行う。ステップ703でチェック結果が、OpenCOBOLソースコードと対応付いたCソースコードが存在しない場合は、Cソースコードを開かずに処理を終了する(ステップ708)。一方、ステップ703のチェック結果が、OpenCOBOLソースコードと対応付いたCソースコードが存在する場合は、Cソースコードの内容を解析し、OpenCOBOLソースコードの右クリック実行行の行番号と一致する行番号を持つ、Cソースコードの”cob_set_location”の行が存在するか否かをチェックする(ステップ704)。
In
ステップ705のチェック結果で、OpenCOBOLソースコードの右クリック実行行の行番号と一致する行番号を持つ、Cソースコードの”cob_set_location”の行が存在しない場合は、特定の行番号をターゲットとしたCソースコードのオープンは行わずに、1行目をターゲットとしてCソースコードをオープンする(ステップ707)。一方、ステップ705のチェック結果で、OpenCOBOLソースコードの右クリック実行行の行番号と一致する行番号を持つ、Cソースコードの”cob_set_location”の行が存在する場合は、一致した行番号をターゲットに、EclipseのCエディタでCソースコードをオープン(好適には該当行をマーカー付きで表示)して処理を終了する(ステップ706)。
If the check result in
図8は、EclipseのCエディタからOpenCOBOLソースコードをオープンする処理のフローチャートである。図7で説明した通り、OpenCOBOLソースコードをOpenCOBOLコンパイラで出力されるCソースコードには、COBOL実行行の行番号と出力元OpenCOBOLソースコードのファイル名が”cob_set_location”という関数のパラメータとして出力されている(図4の符号404の形式)。CエディタからOpenCOBOLソースコードをオープンする処理は、”cob_set_location”行のパラメータの出力値を参照することで行う。
FIG. 8 is a flowchart of the process of opening the OpenCOBOL source code from the Eclipse C editor. As explained in Fig. 7, in the C source code that is output from the OpenCOBOL source code by the OpenCOBOL compiler, the line number of the COBOL execution line and the file name of the source OpenCOBOL source code are output as parameters of the function "cob_set_location" (
ステップ801で、ユーザーがEclipseのCエディタで「COBOLソースを開く」の実行を選択する(例えば特定のターゲットとする行でクリックするか、またはターゲットを特定せずにクリックする)。Cソースコードに”cob_set_location”行が存在するか否かのチェックを行う(ステップ802)。
In
ステップ803でチェック結果が、”cob_set_location”行が1件も存在しない場合は、OpenCOBOLソースコードを開かずに処理を終了する(ステップ808)。一方、ステップ803でチェック結果が、”cob_set_location”行が存在する場合は、ステップ801を実行した行の位置により処理が分かれる。
If there is no “cob_set_location” line in
ステップ805のチェック結果で、ステップ801を”cob_set_location”行がまだ1件も現れていない位置で実行した場合、1行目をターゲットとして該当するOpenCOBOLソースコードをオープンして処理を終了する(ステップ809)。一方、ステップ805のチェック結果がNOでさらにステップ806のチェック結果で、ステップ801を”cob_set_location”の行で実行した場合、ステップ801を実行した行の”cob_set_location”関数のパラメータに出力されている「COBOLファイル名」及び「行番号」の値を用いて、EclipseのCOBOLエディタで該当するOpenCOBOLソースコードの該当する行番号の箇所をオープンして、処理を終了する(ステップ810)。
As a result of the check in
ステップ805とステップ806のチェック結果がいずれもNOだった場合は、ステップ801を実行した行の直前に存在している”cob_set_location” 関数のパラメータに出力されている「COBOLファイル名」及び「行番号」の値を用いて、EclipseのCOBOLエディタでOpenCOBOLソースコードの行番号の箇所をオープンして、処理を終了する(ステップ807)。
If both of the check results in
200 Linux(登録商標)サーバ
201 OpenCOBOLソースコード
202 OpenCOBOLコンパイラ
203 Eclipse CDT(デバッグツール)
204 アプリケーション
205 Cソースコード
206 C-COBOL変数名対応表
200 Linux (registered trademark)
204 Application 205 C source code 206 C-COBOL variable name correspondence table
Claims (6)
OpenCOBOLプログラムのソースコードであるOpenCOBOLソースコードに対してOpenCOBOLコンパイラによるコンパイルを実行し、Cソースコードに変換する手段と、
変換された前記Cソースコードに対してEclipseのCDT(C/C++ Development Tooling)プラグインのデバッグツールを用いてデバッグを実行する手段と、を備えたことを特徴とする
OpenCOBOLプログラムのデバッグ支援システム。 A system for supporting debugging of OpenCOBOL programs, where the server
Compiling with the OpenCOBOL compiler for the OpenCOBOL source code that is the source code of the OpenCOBOL program and converting it to C source code,
And means for executing debugging on the converted C source code using a debugging tool of CDT (C / C ++ Development Tooling) plug-in of Eclipse.
OpenCOBOL program debugging support system.
前記Cソースコードへの変換に先立って、1又は複数の前記Cソースコードの変数名と、対応するOpenCOBOLソースコードのデータ定義名とを対応付けた変数名対応表ファイルを出力する手段と、
前記OpenCOBOLソースコードを前記Cソースコードに変換する際に、前記変数名対応表ファイルを参照し、該変数名対応表ファイルに含まれる前記Cソースコードの変数名を含む行に対して前記OpenCOBOLソースコードのファイル名と対応する行番号とを付加してCソースコードを出力する手段と、を有することを特徴とする
請求項1に記載のOpenCOBOLプログラムのデバッグ支援システム。 The means for converting into the C source code is:
Prior to conversion to the C source code, means for outputting a variable name correspondence table file in which one or more variable names of the C source code are associated with data definition names of the corresponding OpenCOBOL source code;
When converting the OpenCOBOL source code to the C source code, the variable name correspondence table file is referred to, and the OpenCOBOL source for the line including the variable name of the C source code included in the variable name correspondence table file The OpenCOBOL program debugging support system according to claim 1, further comprising means for outputting C source code by adding a code file name and a corresponding line number.
予め指定された、不良を作り込む可能性が高い配列処理部分または性能に関連するファイルI/Oの処理部分のいずれかまたは双方の部分について、前記Cソースコードの変数名と前記OpenCOBOLソースコードのデータ定義名との対応付けを前記変数名対応表ファイルに出力する手段を有することを特徴とする
請求項2に記載のOpenCOBOLプログラムのデバッグ支援システム。 The means for outputting the variable name correspondence table file is:
The variable name of the C source code and the OpenCOBOL source code for either or both of the pre-specified array processing part or the processing part of the file I / O related to performance that are likely to create defects The OpenCOBOL program debugging support system according to claim 2, further comprising means for outputting a correspondence with a data definition name to the variable name correspondence table file.
前記変数名対応表ファイルを読み込んで、EclipseのGUI(Graphical User Interface)の画面上に前記Cソースコードの変数名と前記OpenCOBOLソースコードのデータ定義名とを対応付けた形式で表示する手段を有することを特徴とする
請求項2又は3に記載のOpenCOBOLプログラムのデバッグ支援システム。 The means for executing the debugging is:
A means for reading the variable name correspondence table file and displaying the variable name of the C source code and the data definition name of the OpenCOBOL source code in an associated form on an Eclipse GUI (Graphical User Interface) screen; The OpenCOBOL program debugging support system according to claim 2 or 3.
前記Cソースコードが表示されたEclipseのCエディタにおいて前記OpenCOBOLソースコードのファイルのオープン処理を実行することにより、前記Cソースコードに含まれる前記OpenCOBOLソースコードのファイル名と行番号を含む行に基づいて、対応する前記OpenCOBOLソースコードのファイルの対応する行をオープンする手段を有することを特徴とする
請求項2〜4のいずれかに記載のOpenCOBOLプログラムのデバッグ支援システム。 The means for executing the debugging is:
Based on the line including the file name and line number of the OpenCOBOL source code included in the C source code by executing the open process of the file of the OpenCOBOL source code in the Eclipse C editor displaying the C source code 5. The OpenCOBOL program debugging support system according to claim 2, further comprising means for opening a corresponding line of the corresponding OpenCOBOL source code file.
前記デバッグを実行する手段は、
前記OpenCOBOLソースコードが表示されたEclipseのCOBOLエディタにおいて前記Cソースコードのファイルのオープン処理を実行することにより、前記OpenCOBOLソースコードのファイルと同名の前記Cソースコードのファイルをオープンする手段と、を有することを特徴とする
請求項2〜5のいずれかに記載のOpenCOBOLプログラムのデバッグ支援システム。 The C source code is output with the same file name as the OpenCOBOL source code,
The means for executing the debugging is:
Means for opening the C source code file having the same name as the OpenCOBOL source code file by executing an open process of the C source code file in the Eclipse COBOL editor displaying the OpenCOBOL source code. An OpenCOBOL program debugging support system according to any one of claims 2 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012211868A JP2014067211A (en) | 2012-09-26 | 2012-09-26 | Debugging support system for opencobol programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012211868A JP2014067211A (en) | 2012-09-26 | 2012-09-26 | Debugging support system for opencobol programs |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014067211A true JP2014067211A (en) | 2014-04-17 |
Family
ID=50743550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012211868A Pending JP2014067211A (en) | 2012-09-26 | 2012-09-26 | Debugging support system for opencobol programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014067211A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000353112A (en) * | 1999-06-11 | 2000-12-19 | Nec Soft Ltd | Method and system for debugging intermediate language level |
-
2012
- 2012-09-26 JP JP2012211868A patent/JP2014067211A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000353112A (en) * | 1999-06-11 | 2000-12-19 | Nec Soft Ltd | Method and system for debugging intermediate language level |
Non-Patent Citations (3)
Title |
---|
JPN6015041174; 'OpenCOBOLでdebug' [online] , 20080801 * |
JPN6015041175; 長谷川勇: 'AST変換を用いた他言語へのツール適用' 電子情報通信学会技術研究報告 SS2008-13〜26 ソフトウェアサイエンス 第108巻,第173号, 20080724, pp.55-60, 社団法人電子情報通信学会 * |
JPN6015041176; 辻邦彦: 'PARTNER-JetとEclipseによるT-Engineソフトウェア開発' TRONWARE 第17巻,第2号, 20060420, pp.57-64, パーソナルメディア株式会社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9134966B2 (en) | Management of mixed programming languages for a simulation environment | |
US7478366B2 (en) | Debugger and method for debugging computer programs across multiple programming languages | |
US9530006B2 (en) | Method and system for performing a memory safety check of a program written in an unmanaged programming language | |
US9043759B1 (en) | System and method for generating software unit tests simultaneously with API documentation | |
US9582396B2 (en) | Techniques for generating an executable debugger script | |
US9280442B1 (en) | System and method for generating coverage reports for software unit tests | |
US8381175B2 (en) | Low-level code rewriter verification | |
US9424008B2 (en) | API descriptions | |
US10331425B2 (en) | Automated source code adaption to inject features between platform versions | |
US8752020B2 (en) | System and process for debugging object-oriented programming code leveraging runtime metadata | |
JP2013539130A (en) | Compile-time boundary checking for user-defined types | |
US9459986B2 (en) | Automatic generation of analysis-equivalent application constructs | |
US20140298290A1 (en) | Identification of code changes using language syntax and changeset data | |
Liu | Android native development kit cookbook | |
US9367429B2 (en) | Diagnostics of declarative source elements | |
US20130111432A1 (en) | Validation of a system model including an activity diagram | |
US20130298105A1 (en) | Indicators for resources with close methods that do not complete erroneously in software programs | |
Blagodarov et al. | Tool demo: Raincode assembler compiler | |
US7873949B2 (en) | In source code suppression of binary analysis | |
US9720660B2 (en) | Binary interface instrumentation | |
JP2014067211A (en) | Debugging support system for opencobol programs | |
JP2009258796A (en) | Program development device and program development method | |
JP5813600B2 (en) | Application development device and application development tool | |
US20110099534A1 (en) | Information processing apparatus, execution program operation modification method, and recording medium | |
US20230034188A1 (en) | Using relocatable debugging information entries to save compile time |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150126 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20150401 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20150413 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20150617 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150925 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151020 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20160405 |