JP4594704B2 - Program development support system, program and recording medium - Google Patents

Program development support system, program and recording medium Download PDF

Info

Publication number
JP4594704B2
JP4594704B2 JP2004338255A JP2004338255A JP4594704B2 JP 4594704 B2 JP4594704 B2 JP 4594704B2 JP 2004338255 A JP2004338255 A JP 2004338255A JP 2004338255 A JP2004338255 A JP 2004338255A JP 4594704 B2 JP4594704 B2 JP 4594704B2
Authority
JP
Japan
Prior art keywords
macro
call
object file
source code
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.)
Expired - Fee Related
Application number
JP2004338255A
Other languages
Japanese (ja)
Other versions
JP2006146731A (en
Inventor
準 岸川
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2004338255A priority Critical patent/JP4594704B2/en
Publication of JP2006146731A publication Critical patent/JP2006146731A/en
Application granted granted Critical
Publication of JP4594704B2 publication Critical patent/JP4594704B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Description

本発明は、例えばマイコン組み込み機器等のソフトウェア開発に用いるプログラム開発支援システム、プログラム、そのプログラムを記憶している記憶媒体に関する。
The present invention is, for example, a microcomputer built-in equipment such as a software program development support system used for development of a program relates to a storage medium body which stores the program.

従来、プログラム開発は、図15に示すように、ホストコンピュータ上でソースファイル1をコンパイラC1又はアセンブラA1でコンパイル又はアセンブルしてオブジェクトファイル2を生成し、そのオブジェクトファイル2からリンカL1により実行形式プログラムP3を生成することによりなされていた。   Conventionally, as shown in FIG. 15, a program is developed by compiling or assembling a source file 1 with a compiler C1 or an assembler A1 on a host computer to generate an object file 2 and executing an executable program from the object file 2 with a linker L1. This was done by generating P3.

通常、コンパイル言語やアセンブリ言語でプログラミングする場合、マクロ定義及びマクロ呼出し機能を用いて、共通な処理部をまとめることはよく行なわれていることである。
このマクロを使用したプログラムのシミュレータやエミュレータによるデバッグにおいて、マクロ呼出し部分をステップ実行する場合、そのままマクロ呼出し行として実行するか、あるいは、その展開されたコードを実行することになる。
そして、単純な短いマクロの場合はそのような処理でもよいが、マクロ定義が長い場合や、あるいは、マクロが入れ子になっていた場合、そのマクロの引数がどのように置換されているのか、あるいは、入れ子マクロがどのように呼び出されたのかを確認するには、別途ソースコードを解析する必要があり、デバッグ効率を落とす要因にもなっていた。
Usually, when programming in a compiled language or an assembly language, it is common to use a macro definition and a macro call function to collect common processing units.
In step debugging of a program using a macro by a simulator or emulator, when the macro calling portion is stepped, it is executed as it is as a macro calling line or the expanded code is executed.
And for simple short macros, you can do that, but if the macro definition is long, or if the macro is nested, how the macro arguments are replaced, or In order to check how the nested macro was called, it was necessary to analyze the source code separately, which caused a decrease in debugging efficiency.

このマクロ部分のデバッグを行う技術として特許文献1が知られている。この技術は、マクロ定義部分のソース行デバッグを可能とする。
特許第2827724号公報
Patent Document 1 is known as a technique for debugging the macro portion. This technique enables source line debugging of the macro definition part.
Japanese Patent No. 2827724

しかしながら、特許文献1の技術では、マクロ定義部分のソース行デバッグが可能になるものの、それは引数の置換がなされない元マクロ定義部分か、あるいは、展開された後の表示であり、前者の場合は引数の置換状況が不明であるという問題があり、後者の場合は入れ子があったときのマクロの呼び出し状況が不明である、元のソースプログラムのコメント文が見えない等の問題がある。   However, although the technique of Patent Document 1 enables source line debugging of a macro definition part, it is an original macro definition part in which no argument is replaced or a display after being expanded. In the former case, There is a problem that the argument replacement status is unknown, and in the latter case, there is a problem that the macro call status when nesting is unknown or the comment statement of the original source program is not visible.

本発明の目的は、マクロの呼び出し状況が置換された引数やコメント文と共に表示されて、デバッグが可能となるようにすることである。   An object of the present invention is to display the macro call status together with the replaced argument and comment text so that debugging can be performed.

請求項1に記載のプログラム開発支援システムは、ソースファイルからオブジェクトファイルを生成し、該生成に際しマクロ呼出しができる生成手段と、前記オブジェクトファイルをリンクして生成された実行形式プログラムを実行する実行手段と、デバッグに必要な情報を表示する表示手段と、備えたプログラム開発支援システムであって、前記生成手段は、前記マクロ呼出しを行なう際、前記マクロ呼出しの部分をマクロ定義の内容に従って前記オブジェクトファイル内にコード展開し、前記マクロ呼出し毎に前記マクロ定義部分の引数のみを置換したソースコードであるマクロ展開ソースコード情報を生成して前記オブジェクトファイルと共に記憶し、前記実行手段は、前記マクロ呼出し部分の展開内容のステップ実行を行う際、前記マクロ展開ソースコード情報を前記表示手段に表示するものである。
The program development support system according to claim 1 , wherein an object file is generated from a source file , a generation unit capable of calling a macro at the time of generation, and an execution unit that executes an executable program generated by linking the object file And a program development support system comprising display means for displaying information necessary for debugging, wherein the generation means, when performing the macro call, converts the macro call portion into the object file according to the contents of the macro definition. Code expansion in the macro, and for each macro call, macro expansion source code information, which is source code obtained by replacing only the argument of the macro definition part, is generated and stored together with the object file, and the execution means includes the macro call part When performing the step execution of the expanded contents of Black is the deployment source code information intended to be displayed on said display means.

請求項2に記載の発明は、請求項1に記載のプログラム開発支援システムにおいて、前記生成手段は、前記マクロ定義内にさらにマクロ呼出しがあるときは、当該マクロ呼出しについても前記マクロ展開ソースコード情報を生成して前記オブジェクトファイルと共に記憶するものである。
According to a second aspect of the present invention, in the program development support system according to the first aspect, when the macro means further includes a macro call in the macro definition, the macro expansion source code information for the macro call is also provided. Is generated and stored together with the object file.

請求項3に記載の発明は、請求項1または2のいずれかに記載のプログラム開発支援システムにおいて、前記生成手段は、アセンブラまたはコンパイラであるものである。
According to a third aspect of the present invention, in the program development support system according to the first or second aspect, the generation means is an assembler or a compiler.

請求項4に記載の発明は、請求項1から3までのいずれかに記載のプログラム開発支援システムにおいて、前記実行手段は、シミュレータまたはエミュレータであるものである。
According to a fourth aspect of the present invention, in the program development support system according to any one of the first to third aspects, the execution means is a simulator or an emulator.

請求項5に記載のプログラムは、ソースファイルからオブジェクトファイルを生成し、該生成に際しマクロ呼出しができる生成手段と、前記オブジェクトファイルをリンクして生成された実行形式プログラムを実行する実行手段と、デバッグに必要な情報を表示する表示手段と、を備えたコンピュータに、前記マクロ呼出しを行なうときは前記マクロ呼出しの部分をマクロ定義の内容に従って前記オブジェクトファイル内にコード展開し、前記マクロ呼出し毎に前記マクロ定義部分の引数のみを置換したソースコードであるマクロ展開ソースコード情報を生成して前記オブジェクトファイル内と共に記憶させる処理と、前記マクロ呼出し部分の展開内容のステップ実行を行う際、前記マクロ展開ソースコード情報を前記表示手段に表示させる処理と、を実行させるものである。
The program according to claim 5 generates an object file from a source file and can generate a macro call at the time of generation, execution means for executing an executable program generated by linking the object file, and debugging Display means for displaying necessary information for the macro call, when performing the macro call, the macro call portion is expanded in the object file in accordance with the contents of the macro definition, and the macro call is executed for each macro call. When the macro expansion source code information, which is source code in which only the argument of the macro definition part is replaced, is generated and stored together with the object file, and the step of executing the expansion contents of the macro call part is performed, Display code information on the display means Is intended to execute a sense, the.

請求項6に記載の記録媒体は、請求項5に記載のプログラムを実行可能に記録したものである。
A recording medium according to a sixth aspect records the program according to the fifth aspect in an executable manner.

本発明によれば、アセンブル又はコンパイルの際にはマクロ呼出し毎にマクロ定義部分の引数のみを置換したソースコードであるマクロ展開ソースコード情報を生成してオブジェクトファイル内に埋め込み、シミュレータ又はエミュレータでは当該引数の置換された状態を表示することができる。よって、引数の置換状況を明らかにすることができる。   According to the present invention, when assembling or compiling, macro expansion source code information, which is source code in which only the argument of the macro definition part is replaced for each macro call, is generated and embedded in the object file. The status of argument substitution can be displayed. Therefore, the argument replacement status can be clarified.

本発明を実施するための最良の一形態について説明する。
図1は、コンパイラ装置、アセンブラ装置、シミュレータ装置、エミュレータ装置を実施するホストコンピュータH1の電気的な接続のブロック図である。
このホストコンピュータH1は、各種演算を行い、コンピュータの各部を集中的に制御するCPU12と、各種のROM、RAMからなるメモリ13とが、バス14で接続されている。
The best mode for carrying out the present invention will be described.
Figure 1 is a compiler apparatus, the assembler apparatus, the simulator device, a block diagram of the electrical connection of the host computer H1 implementing the emulator device.
In the host computer H1, a CPU 12 that performs various calculations and centrally controls each part of the computer and a memory 13 including various ROMs and RAMs are connected by a bus 14.

バス14には、所定のインターフェイスを介して、ハードディスクなどの磁気記憶装置15と、キーボード、マウスなどの入力装置16と、出力装置となる表示装置17と、光ディスクなどの記憶媒体18を読み取る読取装置19とが接続され、また、インターネットなどのネットワーク20と通信を行う通信インターフェイス11が接続されている。
記憶媒体18としては、光ディスク、光磁気ディスク、フレキシブルディスクなどの各種メディアを用いることができる。また、読取装置19は、記憶媒体18の種類に応じて光ディスクドライブ装置、光磁気ディスクドライブ装置、フレキシブルディスクドライブ装置などが用いられる。
ホストコンピュータH1は、記憶媒体18から、プログラムをそれぞれ読み取って、磁気記憶装置15にインストールする。また、このプログラムはインターネットなどのネットワークを介してダウンロードしてインストールするようにしてもよい。このインストールにより、ホストコンピュータH1は、後述の所定の処理の実行が可能な状態となる。
このホストコンピュータH1で用いるプログラムには、アセンブラA1(又はコンパイラC1)、リンカL1、シミュレータS1、エミュレータE1などが含まれ、ホストコンピュータH1は、プログラム開発支援システムとして用いられる。
A bus 14 includes a magnetic storage device 15 such as a hard disk, an input device 16 such as a keyboard and a mouse, a display device 17 that serves as an output device, and a reading device that reads a storage medium 18 such as an optical disk via a predetermined interface. 19 and a communication interface 11 that communicates with a network 20 such as the Internet.
As the storage medium 18, various media such as an optical disk, a magneto-optical disk, and a flexible disk can be used. As the reading device 19, an optical disk drive device, a magneto-optical disk drive device, a flexible disk drive device, or the like is used according to the type of the storage medium 18.
The host computer H1 reads each program from the storage medium 18 and installs it in the magnetic storage device 15. Further, this program may be downloaded and installed via a network such as the Internet. As a result of this installation, the host computer H1 is ready to execute a predetermined process described later.
The program used in the host computer H1 includes an assembler A1 (or compiler C1), a linker L1, a simulator S1, an emulator E1, and the like. The host computer H1 is used as a program development support system.

次に、これら各プログラムに基づいてホストコンピュータH1が実行する処理について説明する。
図2は、ホストコンピュータH1が前述のプログラムに基づいて実行する処理の説明図である。これは、アセンブラA1により処理を実施する例である。まず、ホストコンピュータH1で作成されたソースファイル群1は、アセンブラA1により処理されて、各ソースファイルからそれぞれデバッグ情報付きでオブジェクトファイル2が生成される。
このとき、アセンブラA1はマクロ定義及びマクロ呼出しが選択的に実行可能であって、ソースコード内にマクロ定義及びマクロ呼出しが含まれる場合には、アセンブラA1は、マクロ呼出し部分をマクロ定義の内容に従ってオブジェクトファイル2内にコード展開するのみならず、マクロ呼出し毎に、そのマクロ定義部分の引数のみを置換したソースコード(マクロ展開ソースコード情報3)を生成し、オブジェクトファイル2内に埋め込む。
また、そのマクロ定義内にさらにマクロ呼出しがある入れ子構造の場合は、元のマクロ呼出しの展開の際に、その入れ子になっているマクロ(子マクロ)においても、マクロ定義部分の引数のみを置換したソースコード(マクロ展開ソースコード情報3)を生成して、オブジェクトファイル2内に埋め込む。
Next, processing executed by the host computer H1 based on these programs will be described.
FIG. 2 is an explanatory diagram of processing executed by the host computer H1 based on the aforementioned program. This is an example in which processing is performed by the assembler A1. First, the source file group 1 created by the host computer H1 is processed by the assembler A1, and an object file 2 with debug information is generated from each source file.
At this time, when the assembler A1 can selectively execute macro definition and macro call, and the macro definition and macro call are included in the source code, the assembler A1 determines the macro call portion according to the contents of the macro definition. In addition to code expansion in the object file 2, for each macro call, source code (macro expansion source code information 3) in which only the argument of the macro definition portion is replaced is generated and embedded in the object file 2.
In the case of a nested structure that has further macro calls within the macro definition, only the arguments in the macro definition part are replaced in the nested macro (child macro) when the original macro call is expanded. The generated source code (macro expansion source code information 3) is generated and embedded in the object file 2.

例えば、図3に示すようなマクロ定義及びマクロ呼び出しのあるアセンブリ言語ソースがあった場合には、従来は、図4に示すように、単純に展開されるだけであるが、本実施形態ではこれに加えて、図3の(1)のマクロ呼び出しに対しては図5に示すようなソース行であるマクロ展開ソースコード情報3を生成し、また、入れ子である(2)のマクロ呼び出しについては、図6に示すようなマクロ展開ソースコード情報3を生成し、オブジェクトファイル2内に埋め込む。このようなマクロ展開ソースコード情報3の例を図6に示す。   For example, when there is an assembly language source having a macro definition and a macro call as shown in FIG. 3, conventionally, it is simply expanded as shown in FIG. In addition to the macro call of (1) in FIG. 3, macro expansion source code information 3 which is a source line as shown in FIG. 5 is generated, and for the nested macro call of (2), Then, macro expansion source code information 3 as shown in FIG. 6 is generated and embedded in the object file 2. An example of such macro expansion source code information 3 is shown in FIG.

図2に戻り、これらのオブジェクトファイル2をリンカL1により結合処理を行い、実行形式プログラムP1を生成する。この実行形式プログラムP1内には、前述のように生成されたマクロ展開ソースコード情報3が含まれる。
シミュレータS1は、この実行形式プログラムP1に基づいてソース行デバッグを行う。シミュレータS1においてマクロ呼出しの1行毎のステップ実行が行われるとき、前述のように埋め込まれた情報(マクロ展開ソースコード情報3)に基づいて、そのマクロ呼出部に対応するマクロ引数置換されたマクロ定義を表示する。
これにより、このマクロ引数置換されたマクロ定義をステップ実行することができる。さらに、マクロ定義内に入れ子でマクロ呼び出しがあった場合は、そのマクロ呼び出し部からステップ動作する時に、さらにその子マクロでの引数置換された定義部を表示する。
Returning to FIG. 2, these object files 2 are combined by the linker L1 to generate an executable program P1. The execution format program P1 includes the macro expansion source code information 3 generated as described above.
The simulator S1 performs source line debugging based on the execution format program P1. When step-by-line execution of a macro call is performed in the simulator S1, a macro argument-replaced macro corresponding to the macro call unit is based on the embedded information (macro expansion source code information 3) as described above. Display definitions.
As a result, the macro definition with the macro argument replaced can be stepped. Further, when there is a nested macro call in the macro definition, when the step operation is performed from the macro call part, the definition part with the argument substitution in the child macro is further displayed.

具体的に説明すると、従来は、図3に示すような元のソース行表示又は展開された図4の表示がなされていたが、本実施形態では前述のようにマクロ引数置換されたソース行(マクロ展開ソースコード情報3)が埋め込まれているため、例えば、図7に示すような元のマクロ定義内に書かれたコメント文と共に、マクロの呼び出し状況及びその入れ子の状態がわかるようなソース行を表示し、その表示上でステップ実行することが可能になる。
あるいは、図3の(1)の行からステップ実行する場合は、図5の表示に切り替えてステップ実行することも可能になる。このとき、さらに(2)の行からステップ実行する場合は、図8の表示に切り替わることになる。同様に、展開部分にブレークポイントを置くことも可能になる。
More specifically, conventionally, the original source line display as shown in FIG. 3 or the expanded display of FIG. 4 was made, but in the present embodiment, the source line (macro argument substitution as described above) ( Since the macro expansion source code information 3) is embedded, for example, a source line that indicates a macro call status and its nesting state together with a comment sentence written in the original macro definition as shown in FIG. Can be displayed, and steps can be executed on the display.
Alternatively, when step execution is performed from the row (1) in FIG. 3, it is possible to switch to the display in FIG. 5 and execute step execution. At this time, when the step is further executed from the row (2), the display is switched to the display of FIG. Similarly, it is possible to place a breakpoint at the expanded portion.

このようにして、マクロ展開ソースコード情報3をオブジェクトファイル2内に備えることにより、オブジェクトファイル2をリンクして生成された実行形式プログラムP1を実行するシミュレータS1において、マクロ呼び出し部分の展開内容のステップ実行を行うときに、マクロ展開されてしまったコードではなく、マクロ定義部分の引数が置換された状態を表示してステップ実行するので、マクロ内デバッグを効率よく行うことができるようになる。   In this way, by providing the macro expansion source code information 3 in the object file 2, the step of expanding the macro call portion in the simulator S1 that executes the executable program P1 generated by linking the object file 2 is performed. When executing, not the code that has been expanded into a macro but the state in which the argument of the macro definition portion is replaced is displayed and step execution is performed, so that debugging within the macro can be performed efficiently.

さらに、同様に、オブジェクトファイル2をリンクして生成された実行形式プログラムP1を実行するエミュレータE1においても、マクロ呼び出し部分の展開内容のステップ実行を行うときに、マクロ展開されてしまったコードではなく、マクロ定義部分の引数が置換された状態を表示してステップ実行するので、マクロ内デバッグを効率よく行うことができる。   Further, similarly, in the emulator E1 that executes the executable program P1 generated by linking the object file 2, when executing the step execution of the expanded contents of the macro call portion, the code that has not been expanded is not the code. Since the macro definition part argument is replaced and displayed, the step execution is performed, so that debugging within the macro can be performed efficiently.

次に、他の処理例について説明する。図9は、ホストコンピュータH1が実行する他の処理例の説明図である。この処理は、コンパイラC1により処理を実施する例である。
図9において、ホストコンピュータH1にて作成されたソースファイル群1をコンパイラC1で処理して、各ソースファイルからそれぞれデバッグ情報付きでオブジェクトファイルが生成される。
Next, another processing example will be described. FIG. 9 is an explanatory diagram of another example of processing executed by the host computer H1. This processing is an example in which processing is performed by the compiler C1.
In FIG. 9, the source file group 1 created by the host computer H1 is processed by the compiler C1, and an object file with debug information is generated from each source file.

このとき、コンパイラC1はマクロ定義及びマクロ呼出しが選択的に実行可能であって、ソースコード内にマクロ定義及びマクロ呼出しが含まれる場合には、コンパイラC1は、マクロ呼出し部分をマクロ定義の内容に従ってオブジェクトファイル2内にコード展開するのみならず、マクロ呼出し毎に、そのマクロ定義部分の引数のみを置換したソースコード(マクロ展開ソースコード情報3)を生成し、オブジェクトファイル2内に埋め込む。
また、そのマクロ定義内にさらにマクロ呼出しがある入れ子構造の場合は、元のマクロ呼出しの展開の際に、その入れ子になっているマクロ(子マクロ)においても、マクロ定義部分の引数のみを置換したソースコード(マクロ展開ソースコード情報3)を生成して、オブジェクトファイル2内に埋め込む。
At this time, the compiler C1 can selectively execute the macro definition and the macro call, and if the macro definition and the macro call are included in the source code, the compiler C1 sets the macro call part according to the contents of the macro definition. In addition to code expansion in the object file 2, for each macro call, source code (macro expansion source code information 3) in which only the argument of the macro definition portion is replaced is generated and embedded in the object file 2.
In the case of a nested structure that has further macro calls within the macro definition, only the arguments in the macro definition part are replaced in the nested macro (child macro) when the original macro call is expanded. The generated source code (macro expansion source code information 3) is generated and embedded in the object file 2.

例えば、図10に示すようなマクロ定義及びマクロ呼出しのあるC言語ソースがあった場合には、従来は、図11に示すように、単純に展開されるだけであるが、本実施形態ではこれに加えて、図10の(3)のマクロ呼び出しに対しては図12に示すようなソース行であるマクロ展開ソースコード情報3を生成し、また、入れ子である(4)のマクロ呼び出しについては、図13に示すようなマクロ展開ソースコード情報3を生成し、オブジェクトファイル2内に埋め込む。   For example, when there is a C language source having a macro definition and a macro call as shown in FIG. 10, conventionally, it is simply expanded as shown in FIG. In addition to the macro call of (3) in FIG. 10, the macro expansion source code information 3 which is a source line as shown in FIG. 12 is generated, and the nested macro call of (4) is generated. Then, macro expansion source code information 3 as shown in FIG. 13 is generated and embedded in the object file 2.

図9に戻り、これらのオブジェクトファイル2をリンカL1により結合処理を行い、実行形式プログラムP2を生成する。この実行形式プログラムP1内には、前述のように生成されたマクロ展開ソースコード情報3が含まれる。
シミュレータS1は、この実行形式プログラムP2に基づいてソース行デバッグを行う。シミュレータS1においてマクロ呼出しの1行毎のステップ実行が行われるとき、前述のように埋め込まれた情報(マクロ展開ソースコード情報3)に基づいて、そのマクロ呼出部に対応するマクロ引数置換されたマクロ定義を表示する。
これにより、このマクロ引数置換されたマクロ定義をステップ実行することができる。さらに、マクロ定義内に入れ子でマクロ呼び出しがあった場合は、そのマクロ呼び出し部からステップ動作する時に、さらにその子マクロでの引数置換された定義部を表示する。
Returning to FIG. 9, these object files 2 are combined by the linker L1, and an executable program P2 is generated. The execution format program P1 includes the macro expansion source code information 3 generated as described above.
The simulator S1 performs source line debugging based on the execution format program P2. When step-by-line execution of a macro call is performed in the simulator S1, a macro argument-replaced macro corresponding to the macro call unit is based on the embedded information (macro expansion source code information 3) as described above. Display the definition.
As a result, the macro definition with the macro argument replaced can be stepped. Further, when there is a nested macro call in the macro definition, when the step operation is performed from the macro call part, the definition part with the argument substitution in the child macro is further displayed.

具体的に説明すると、従来は、図10に示すような元のソース行表示か、あるいは展開された図11の表示がなされていたが、上記マクロ引数置換されたソース行が埋め込まれているため、例えば、図14に示すような元のマクロ定義内に書かれたコメント文と共にマクロの呼び出し状況、及びその入れ子の状態がわかるようなソース行を表示し、その表示上でステップ実行することが可能になる。あるいは、図10の(3)の行からステップ実行する場合、図12の表示に切り替えてステップ実行することも可能になる。このとき、さらに(4)の行からステップ実行する場合は、図13の表示に切り替わることになる。同様に、展開部分にブレークポイントを置くことも可能になる。   Specifically, in the past, the original source line display as shown in FIG. 10 or the expanded display of FIG. 11 was made, but the macro argument-replaced source line is embedded. For example, it is possible to display a source line that shows the macro call status and its nesting state together with a comment sentence written in the original macro definition as shown in FIG. 14, and execute step on the display. It becomes possible. Alternatively, when step execution is performed from the line (3) in FIG. 10, it is possible to switch to the display in FIG. 12 and execute step execution. At this time, when the step is further executed from the row (4), the display is switched to the display of FIG. Similarly, it is possible to place a breakpoint at the expanded portion.

このようにして、マクロ展開ソースコード情報3をオブジェクトファイル2内に備えることにより、オブジェクトファイル2をリンクして生成された実行形式プログラムP2を実行するシミュレータS1において、マクロ呼び出し部分の展開内容のステップ実行を行うときに、マクロ展開されてしまったコードではなく、マクロ定義部分の引数が置換された状態を表示してステップ実行するので、マクロ内デバッグを効率よく行うことができるようになる。   In this way, by providing the macro expansion source code information 3 in the object file 2, in the simulator S 1 that executes the executable program P 2 generated by linking the object file 2, the step of expanding the macro call portion When executing, not the code that has been expanded into a macro but the state in which the argument of the macro definition portion is replaced is displayed and step execution is performed, so that debugging within the macro can be performed efficiently.

さらに、同様に、オブジェクトファイル2をリンクして生成された実行形式プログラムP1を実行するエミュレータE1においても、マクロ呼び出し部分の展開内容のステップ実行を行うときに、マクロ展開されてしまったコードではなく、マクロ定義部分の引数が置換された状態を表示してステップ実行するので、マクロ内デバッグを効率よく行うことができる。   Further, similarly, in the emulator E1 that executes the executable program P1 generated by linking the object file 2, when executing the step execution of the expanded contents of the macro call portion, the code that has not been expanded is not the code. Since the macro definition part argument is replaced and displayed, the step execution is performed, so that debugging within the macro can be performed efficiently.

本発明の一実施の形態であるホストコンピュータの電気的な接続のブロック図である。It is a block diagram of the electrical connection of the host computer which is one embodiment of this invention. ホストコンピュータが実行する一連の処理の説明図である。It is explanatory drawing of a series of processes which a host computer performs. マクロ定義及びマクロ呼び出しのあるアセンブリ言語ソースの一例を示す説明図である。It is explanatory drawing which shows an example of the assembly language source with a macro definition and a macro call. 図3のアセンブリ言語ソースの従来における展開例の説明図である。It is explanatory drawing of the example of a conventional expansion | deployment of the assembly language source of FIG. 図3の(1)のマクロ呼び出しに対して生成されるマクロ展開ソースコード情報の説明図である。It is explanatory drawing of the macro expansion | deployment source code information produced | generated with respect to the macro call of (1) of FIG. 図3の(2)のマクロ呼び出しに対して生成されるマクロ展開ソースコード情報の説明図である。It is explanatory drawing of the macro expansion | deployment source code information produced | generated with respect to the macro call of (2) of FIG. シミュレータが実行する処理の説明図である。It is explanatory drawing of the process which a simulator performs. シミュレータが実行する処理の説明図である。It is explanatory drawing of the process which a simulator performs. ホストコンピュータが実行する一連の処理の他例の説明図である。It is explanatory drawing of the other example of a series of processes which a host computer performs. マクロ定義及びマクロ呼び出しのあるアセンブリ言語ソースの一例を示す説明図である。It is explanatory drawing which shows an example of the assembly language source with a macro definition and a macro call. 図10のC言語ソースの従来における展開例の説明図である。It is explanatory drawing of the example of a conventional expansion | deployment of the C language source of FIG. 図10の(3)のマクロ呼び出しに対して生成されるマクロ展開ソースコード情報の説明図である。It is explanatory drawing of the macro expansion | deployment source code information produced | generated with respect to the macro call of (3) of FIG. エミュレータが実行する処理の説明図である。It is explanatory drawing of the process which an emulator performs. エミュレータが実行する処理の説明図である。It is explanatory drawing of the process which an emulator performs. 従来のホストコンピュータが実行する一連の処理の説明図である。It is explanatory drawing of a series of processes which the conventional host computer performs.

符号の説明Explanation of symbols

1 ソースファイル
2 オブジェクトファイル
3 マクロ展開ソースコード情報
18 記憶媒体
A1 アセンブラ
E1 エミュレータ
H1 ホストコンピュータ
L1 リンカ
P1 実行形式プログラム
S1 シミュレータ
1 Source File 2 Object File 3 Macro Expansion Source Code Information 18 Storage Medium A1 Assembler E1 Emulator H1 Host Computer L1 Linker P1 Executable Program S1 Simulator

Claims (6)

ソースファイルからオブジェクトファイルを生成し、該生成に際しマクロ呼出しができる生成手段と、Generation means for generating an object file from a source file and making a macro call at the time of generation;
前記オブジェクトファイルをリンクして生成された実行形式プログラムを実行する実行手段と、Execution means for executing an executable program generated by linking the object file;
デバッグに必要な情報を表示する表示手段と、Display means for displaying information necessary for debugging;
を備えたプログラム開発支援システムであって、A program development support system comprising:
前記生成手段は、前記マクロ呼出しを行なう際、前記マクロ呼出しの部分をマクロ定義の内容に従って前記オブジェクトファイル内にコード展開し、前記マクロ呼出し毎に前記マクロ定義部分の引数のみを置換したソースコードであるマクロ展開ソースコード情報を生成して前記オブジェクトファイルと共に記憶し、When the macro call is performed, the macro call portion is expanded in the object file according to the contents of the macro definition, and source code in which only the argument of the macro definition portion is replaced for each macro call. Generate macro expansion source code information and store it together with the object file,
前記実行手段は、前記マクロ呼出し部分の展開内容のステップ実行を行う際、前記マクロ展開ソースコード情報を前記表示手段に表示するThe execution means displays the macro expansion source code information on the display means when performing step execution of the expansion contents of the macro calling portion.
ことを特徴とするプログラム開発支援システム。A program development support system characterized by this.
前記生成手段は、前記マクロ定義内にさらにマクロ呼出しがあるときは、当該マクロ呼出しについても前記マクロ展開ソースコード情報を生成して前記オブジェクトファイルと共に記憶するWhen there is a further macro call in the macro definition, the generation means generates the macro expansion source code information for the macro call and stores it with the object file.
ことを特徴とする請求項1に記載のプログラム開発支援システム。The program development support system according to claim 1.
前記生成手段は、アセンブラまたはコンパイラであることを特徴とする請求項1または2のいずれかに記載のプログラム開発支援システム。3. The program development support system according to claim 1, wherein the generation unit is an assembler or a compiler. 前記実行手段は、シミュレータまたはエミュレータであることを特徴とする請求項1から3までのいずれかに記載のプログラム開発支援システム。4. The program development support system according to claim 1, wherein the execution means is a simulator or an emulator. ソースファイルからオブジェクトファイルを生成し、該生成に際しマクロ呼出しができる生成手段と、Generation means for generating an object file from a source file and making a macro call at the time of generation;
前記オブジェクトファイルをリンクして生成された実行形式プログラムを実行する実行手段と、Execution means for executing an executable program generated by linking the object file;
デバッグに必要な情報を表示する表示手段と、Display means for displaying information necessary for debugging;
を備えたコンピュータに、On a computer with
前記マクロ呼出しを行なうときは前記マクロ呼出しの部分をマクロ定義の内容に従って前記オブジェクトファイル内にコード展開し、前記マクロ呼出し毎に前記マクロ定義部分の引数のみを置換したソースコードであるマクロ展開ソースコード情報を生成して前記オブジェクトファイル内と共に記憶させる処理と、When performing the macro call, the macro expansion source code is a source code in which the macro call portion is expanded in the object file according to the contents of the macro definition, and only the argument of the macro definition portion is replaced for each macro call. Processing to generate information and store it in the object file;
前記マクロ呼出し部分の展開内容のステップ実行を行う際、前記マクロ展開ソースコード情報を前記表示手段に表示させる処理と、を実行させるA step of displaying the macro expansion source code information on the display means when performing step execution of the expansion contents of the macro calling portion.
ことを特徴とするプログラム。  A program characterized by that.
請求項5に記載のプログラムを実行可能に記録した記録媒体。The recording medium which recorded the program of Claim 5 so that execution was possible.
JP2004338255A 2004-11-24 2004-11-24 Program development support system, program and recording medium Expired - Fee Related JP4594704B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004338255A JP4594704B2 (en) 2004-11-24 2004-11-24 Program development support system, program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004338255A JP4594704B2 (en) 2004-11-24 2004-11-24 Program development support system, program and recording medium

Publications (2)

Publication Number Publication Date
JP2006146731A JP2006146731A (en) 2006-06-08
JP4594704B2 true JP4594704B2 (en) 2010-12-08

Family

ID=36626314

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004338255A Expired - Fee Related JP4594704B2 (en) 2004-11-24 2004-11-24 Program development support system, program and recording medium

Country Status (1)

Country Link
JP (1) JP4594704B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116820798A (en) * 2023-05-23 2023-09-29 广州汽车集团股份有限公司 Data processing method and device and vehicle

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013137716A (en) * 2011-12-28 2013-07-11 Hitachi Information & Control Solutions Ltd Macro expansion device and program
JP6735482B2 (en) * 2015-01-16 2020-08-05 ナレルシステム株式会社 Fighting command simulator, method or programming therefor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63228239A (en) * 1987-03-17 1988-09-22 Nec Corp Test system for macro-expansion
JPH01125633A (en) * 1987-11-11 1989-05-18 Fujitsu Ltd System for debugging multi-processing system
JPH04337843A (en) * 1991-05-15 1992-11-25 Hitachi Ltd Program operation display method
JPH0588877A (en) * 1991-09-26 1993-04-09 Kobe Nippon Dekin Software Kk Test system for macro language

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63223930A (en) * 1987-03-13 1988-09-19 Hitachi Ltd Simulation system for program of exclusive processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63228239A (en) * 1987-03-17 1988-09-22 Nec Corp Test system for macro-expansion
JPH01125633A (en) * 1987-11-11 1989-05-18 Fujitsu Ltd System for debugging multi-processing system
JPH04337843A (en) * 1991-05-15 1992-11-25 Hitachi Ltd Program operation display method
JPH0588877A (en) * 1991-09-26 1993-04-09 Kobe Nippon Dekin Software Kk Test system for macro language

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116820798A (en) * 2023-05-23 2023-09-29 广州汽车集团股份有限公司 Data processing method and device and vehicle
CN116820798B (en) * 2023-05-23 2024-06-11 广州汽车集团股份有限公司 Data processing method and device and vehicle

Also Published As

Publication number Publication date
JP2006146731A (en) 2006-06-08

Similar Documents

Publication Publication Date Title
JP4909877B2 (en) Debugging apparatus and debugging method
JP4822817B2 (en) Compilation system
CN102279789B (en) Debugging system and debugging method for embedded system of production phase
JP4652680B2 (en) Compiling method and apparatus, and compiler
JP2008276735A (en) Program code converter and program code conversion method
JP2007310449A (en) Model generation program and model generation method for software/hardware cooperation design
JP4594704B2 (en) Program development support system, program and recording medium
JP4728563B2 (en) Code generation device, code generation program, function execution device, function execution program, model generation device, and model generation program
KR0125605B1 (en) Method and device for verifying operation of machine language program
JP2008305337A (en) Program converter, program conversion method, program, storage medium, debugging device, debugging method and program development system
JP2009258796A (en) Program development device and program development method
JP2007018313A (en) Circuit design program, circuit design device and circuit design method
JP2007226358A (en) Application generation device, application generation method, and application generation program
JP2017091070A (en) Executable code generation program and executable code generation device
JP2005174045A (en) Source program conversion device, source program conversion method, source program conversion program and program recording medium
JPH10293683A (en) Device for comparatively analyzing program, method therefor and mechanically readable recording medium recording comparative analytic program for program
JP2009217720A (en) Program generating device and program generating method
US20110099534A1 (en) Information processing apparatus, execution program operation modification method, and recording medium
CN114428630B (en) Chip algorithm upgrading method and device and chip
JP2007219893A (en) Firmware evaluation system and firmware evaluation method
JP2005301415A (en) Compile system, simulator, emulator, and program development supporting system
JP5034867B2 (en) Software verification support program, recording medium recording the program, software verification support apparatus, and software verification support method
Mannadiar et al. Modular artifact synthesis from domain-specific models
JP2002259121A (en) Source line debagging device
JP2007034650A (en) Software development system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091209

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100823

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100914

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100917

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees