JP2008021067A - Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed - Google Patents

Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed Download PDF

Info

Publication number
JP2008021067A
JP2008021067A JP2006191317A JP2006191317A JP2008021067A JP 2008021067 A JP2008021067 A JP 2008021067A JP 2006191317 A JP2006191317 A JP 2006191317A JP 2006191317 A JP2006191317 A JP 2006191317A JP 2008021067 A JP2008021067 A JP 2008021067A
Authority
JP
Japan
Prior art keywords
program
image forming
forming apparatus
instruction
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006191317A
Other languages
Japanese (ja)
Inventor
Naoaki Fukuoka
直明 福岡
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.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Mita Corp
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 Kyocera Mita Corp filed Critical Kyocera Mita Corp
Priority to JP2006191317A priority Critical patent/JP2008021067A/en
Publication of JP2008021067A publication Critical patent/JP2008021067A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To shorten the error analysis period by easily adding a tracing function to an image forming apparatus having no tracing function. <P>SOLUTION: A communication section 33 communicates with a controllers for controlling peripheral equipment such as a scanner 15 and printer 16 included in the image forming apparatus 10, and stores the received peripheral equipment state in a memory buffer. A replacement section 41 replaces a return command from a subroutine constituting the communication section 33 with a jump command to a program of a communication logging section 46 whose word length is not longer than that of the return command. This program makes a DRAM 13D store the contents stored in the memory buffer as communication information based on a light pointer 481, updates the contents of the light pointer 481 to the address for the next storage, and then changes a command pointer of a processor 11 to the return address by executing a return command. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、コピー、プリント又はファクシミリ等の機能を備えた画像形成装置に係り、特に、必要時のみトレース機能を付加することが可能な画像形成装置用トレース機能付加方法及びプログラム並びにこのプログラムがインストールされた画像形成装置に関する。   BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image forming apparatus having functions such as copying, printing, and facsimile, and in particular, a tracing function adding method and program for an image forming apparatus capable of adding a tracing function only when necessary, and the program installed The present invention relates to an image forming apparatus.

画像形成装置のプログラム開発段階では、デバッグオプションを有効にしてそのソースコードをコンパイルすることにより、デバッグ用コードを挿入し、その実行プログラムをデバッガと組み合わせて動作させることにより、エラー原因を究明してこれに対処することができる。   At the program development stage of the image forming device, the debug option is enabled, the source code is compiled, the debug code is inserted, and the execution program is operated in combination with the debugger to investigate the cause of the error. This can be dealt with.

また、プログラム完成後のテスト段階では、さまざまなケースを想定してテストが行われる。   In the test stage after the program is completed, tests are performed assuming various cases.

製品化段階では、デバッグオプションが無効にされてソースコードがコンパイルされ、これにより、プログラムサイズが小さくなるとともに、処理速度の遅延が防止される。   At the commercialization stage, the debug option is disabled and the source code is compiled, thereby reducing the program size and preventing the processing speed from being delayed.

しかしながら、タイミングまで含めた全ての条件下でテストを行うのは不可能に近い。製品出荷後にエラーが発生した場合、画像形成装置にデバッグ機能が備えられていないので、エラー解析に長時間を要することになる。   However, it is almost impossible to test under all conditions including timing. If an error occurs after product shipment, the image forming apparatus is not equipped with a debugging function, so that error analysis takes a long time.

下記特許文献1には、デコード回路により、CPUによってアクセスされたアドレスに基づいて、アクセス先がどこであるかを判定し、アクセス分析回路により、CPUがアクセスした内容を分析し、ログ受送信DMAにより、アクセス分析結果を出力する、トレース機能を備えた画像形成装置が開示されている。   In Patent Document 1, the decoding circuit determines where the access destination is based on the address accessed by the CPU, the access analysis circuit analyzes the content accessed by the CPU, and the log receiving / transmitting DMA performs the analysis. An image forming apparatus having a trace function for outputting an access analysis result is disclosed.

しかし、画像形成装置にこのような回路が備えられていない場合には、エラーに至る動作をトレースすることができない。
特開2006−11969号公報
However, if the image forming apparatus is not provided with such a circuit, the operation leading to the error cannot be traced.
JP 2006-11969 A

本発明の目的は、このような問題点に鑑み、トレース機能を備えていない画像形成装置に対しトレース機能を容易に付加することによりエラー解析時間を短縮化可能な画像形成装置用トレース機能付加方法及びプログラム並びにこのプログラムがインストールされた画像形成装置を提供することにある。   In view of such problems, an object of the present invention is to provide a trace function adding method for an image forming apparatus capable of shortening an error analysis time by easily adding a trace function to an image forming apparatus not provided with a trace function. And an image forming apparatus in which the program is installed.

本発明の他の目的は、通常の動作を遅延させたりプログラムサイズを増大させたりすることなく、かつ、トレース用の特別な回路を備えることなく、エラーが発生したときにユーザの操作でデバッグ機能を追加することにより、エラー解析時間を短縮化可能な画像形成装置を提供することにある。   Another object of the present invention is to perform a debugging function by a user operation when an error occurs without delaying normal operation or increasing the program size and without providing a special circuit for tracing. Is to provide an image forming apparatus capable of shortening the error analysis time.

本発明の第1態様は、画像形成装置の記憶手段に格納された機械語プログラムにトレース機能を付加する画像形成装置用トレース機能付加プログラムであって、該記憶手段に格納される第1置換プログラムと第1ロギングプログラムとを有し、該機械語プログラムは、該画像形成装置に含まれる周辺機器を制御するコントローラとの間で通信を行い受信した周辺機器の状態をメモリバッファに格納させる通信サブルーチンを有し、
該第1置換プログラムは該画像形成装置のプロセッサ又は他のプロセッサに対し、該通信サブルーチンからのリターン命令を、語長が該リターン命令以下の、該第1ロギングプログラムへのジャンプ命令で置換させることを特徴とし、
該第1ロギングプログラムは該画像形成装置の該プロセッサに対し、
該メモリバッファに格納された内容を通信情報として、第1ライトポインタに基づき該記憶手段に格納させ、該第1ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させる、
ステップを有する。
A first aspect of the present invention is an image forming apparatus trace function addition program for adding a trace function to a machine language program stored in a storage unit of an image forming apparatus, the first replacement program being stored in the storage unit And a first logging program, and the machine language program communicates with a controller that controls the peripheral device included in the image forming apparatus, and stores the received peripheral device state in a memory buffer. Have
The first replacement program causes the processor of the image forming apparatus or another processor to replace a return instruction from the communication subroutine with a jump instruction to the first logging program whose word length is less than or equal to the return instruction. Features
The first logging program is sent to the processor of the image forming apparatus.
The content stored in the memory buffer is stored as communication information in the storage means based on the first write pointer, the content of the first write pointer is updated to the address to be stored next,
Changing the instruction pointer of the processor to the return address;
Has steps.

本発明による画像形成装置用トレース機能付加プログラムの第2態様では、第1態様において、該記憶手段に格納される第2置換プログラムと第2ロギングプログラムとをさらに有し、
該第2置換プログラムは該画像形成装置のプロセッサ又は他のプロセッサに対し、該機械語プログラムに含まれる、該通信サブルーチン以外のサブルーチンからのリターン命令を、語長が該リターン命令以下の、該第2ロギングプログラムへのジャンプ命令で置換させることを特徴とし、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対し、
該第2置換プログラムにより置換されたジャンプ命令を含むサブルーチンからの戻りアドレスを取得させ、
該戻りアドレスの直前に格納されているサブルーチンコール命令に関する情報を、第2ライトポインタに基づいて該記憶手段に格納させ、該第2ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させる、
ステップを有し、該機器通信情報と該サブルーチンコール命令に関する情報との組み合わせの時系列情報を得る。
In a second aspect of the trace function adding program for an image forming apparatus according to the present invention, in the first aspect, the program further comprises a second replacement program and a second logging program stored in the storage unit,
The second replacement program sends a return instruction from a subroutine other than the communication subroutine included in the machine language program to the processor of the image forming apparatus or another processor, and the second instruction having a word length equal to or less than the return instruction. 2 It is replaced with a jump instruction to the logging program,
The second logging program is sent to the processor of the image forming apparatus.
Obtaining a return address from a subroutine including a jump instruction replaced by the second replacement program;
Information related to the subroutine call instruction stored immediately before the return address is stored in the storage means based on the second write pointer, and the content of the second write pointer is updated to the address to be stored next,
Changing the instruction pointer of the processor to the return address;
Steps are provided to obtain time-series information of a combination of the device communication information and information related to the subroutine call instruction.

本発明による画像形成装置用トレース機能付加プログラムの第3態様では、第2態様において、
該通信サブルーチンからのリターン命令のアドレス及び該通信サブルーチン以外のサブルーチンからのリターン命令が記述されたアドレスデータをさらに有し、
該第1及び第2置換プログラムはいずれも、該画像形成装置のプロセッサ又は該他のプロセッサに対し、該アドレスデータに含まれるアドレスのリターン命令を該ジャンプ命令で置換させる。
In the third aspect of the trace function adding program for an image forming apparatus according to the present invention, in the second aspect,
Further including address data in which an address of a return instruction from the communication subroutine and a return instruction from a subroutine other than the communication subroutine are described;
Both the first and second replacement programs cause the processor of the image forming apparatus or the other processor to replace the return instruction of the address included in the address data with the jump instruction.

本発明による画像形成装置用トレース機能付加プログラムの第4態様では、第1乃至3態様のいずれか1つにおいて、
該第1ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該通信情報に通信IDを付加させて該記憶手段に格納させ、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該通信IDが該記憶手段に新たに追加されている場合には該通信IDを該サブルーチンコール命令に関する情報に付加させて該記憶手段に格納させる。
In the fourth aspect of the trace function addition program for an image forming apparatus according to the present invention, in any one of the first to third aspects,
The first logging program further causes the processor of the image forming apparatus to add a communication ID to the communication information and store it in the storage means,
The second logging program further causes the processor of the image forming apparatus to add the communication ID to information related to the subroutine call instruction when the communication ID is newly added to the storage means. Store in the means.

本発明による画像形成装置用トレース機能付加プログラムの第5態様では、第1乃至3態様のいずれか1つにおいて、
該第2ライトポインタは該第1ライトポインタと同一であり、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、その実行中での該第1ロギングプログラムの割込を禁止させる。
In a fifth aspect of the trace function addition program for an image forming apparatus according to the present invention, in any one of the first to third aspects,
The second write pointer is identical to the first write pointer;
The second logging program further prohibits the processor of the image forming apparatus from interrupting the first logging program during its execution.

本発明による画像形成装置用トレース機能付加プログラムの第6態様では、第1乃至5態様のいずれか1つにおいて、
該機械語プログラムは、高級言語のソースプログラムをコンパイルして生成されたものであり、
該機械語プログラム中のサブルーチンに対応する該ソースプログラム中の関数名と、該サブルーチンのアドレスと、が対応付けられた関数情報テーブルをさらに有し、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該関数情報テーブルを参照させて、該サブルーチンコール命令のオペランドである分岐先アドレスに対応した関数名を、該サブルーチンコール命令に関する情報の一部又は全部として取得させる。
In a sixth aspect of the trace function addition program for an image forming apparatus according to the present invention, in any one of the first to fifth aspects,
The machine language program is generated by compiling a high-level language source program,
A function information table in which a function name in the source program corresponding to a subroutine in the machine language program is associated with an address of the subroutine;
The second logging program further causes the processor of the image forming apparatus to refer to the function information table so that a function name corresponding to a branch destination address that is an operand of the subroutine call instruction is obtained. As part or all of

本発明による画像形成装置用トレース機能付加プログラムの第7態様では、第1乃至6態様のいずれか1つにおいて、
該画像形成装置の該記憶手段に格納される逆置換プログラムをさらに有し、
該逆置換プログラムは該画像形成装置の該プロセッサに対し、該第1ロギングプログラムへのジャンプ命令及び該第2ロギングプログラムへのジャンプ命令をそれぞれサブルーチンからのリターン命令に置換させる。
In a seventh aspect of the trace function adding program for an image forming apparatus according to the present invention, in any one of the first to sixth aspects,
A reverse replacement program stored in the storage unit of the image forming apparatus;
The reverse replacement program causes the processor of the image forming apparatus to replace the jump instruction to the first logging program and the jump instruction to the second logging program, respectively, with a return instruction from a subroutine.

上記第1態様の構成によれば、画像形成装置に含まれる周辺機器を制御するコントローラとの間で通信を行い受信した周辺機器の状態をメモリバッファに格納させる通信サブルーチンを該画像形成装置の機械語プログラムが備え、第1置換プログラムが該画像形成装置のプロセッサ又は他のプロセッサに対し、該通信サブルーチンからのリターン命令を、語長が該リターン命令以下の、該第1ロギングプログラムへのジャンプ命令で置換させ、該第1ロギングプログラムが該画像形成装置の該プロセッサに対し、該メモリバッファに格納された内容を通信情報として、第1ライトポインタに基づき該記憶手段に格納させ、該第1ライトポインタの内容を、次に格納すべきアドレスに更新させ、該プロセッサの命令ポインタを該戻りアドレスに変更させるので、トレース機能を備えていない画像形成装置に周辺機器動作のトレース機能を容易に付加することができ、これによりエラー解析時間を短縮することが可能となるという効果を奏する。   According to the configuration of the first aspect, a communication subroutine for communicating with the controller that controls the peripheral device included in the image forming apparatus and storing the received peripheral device state in the memory buffer is provided in the machine of the image forming apparatus. A word program, and a first replacement program sends a return instruction from the communication subroutine to the processor of the image forming apparatus or another processor, and a jump instruction to the first logging program whose word length is less than or equal to the return instruction. The first logging program causes the processor of the image forming apparatus to store the contents stored in the memory buffer as communication information in the storage means based on the first write pointer, and to store the first write The contents of the pointer are updated to the address to be stored next, and the instruction pointer of the processor is updated to the return address. Since the calico, an effect that can be easily added trace function of the peripheral device operation in the image forming apparatus having no trace function, which makes it possible to shorten the error analysis time.

また、エラーが発生しなければ該トレース機能を付加する必要がないので、通常の動作が遅延せず且つそのプログラムサイズが大きくなるのを抑止することができるという効果を奏する。   In addition, since there is no need to add the trace function unless an error occurs, the normal operation is not delayed and the program size can be prevented from increasing.

さらに、トレース用の特別な回路を画像形成装置に備える必要がないという効果を奏する。   Furthermore, there is an effect that it is not necessary to provide a special circuit for tracing in the image forming apparatus.

上記第2態様の構成によれば、第2置換プログラムが該画像形成装置のプロセッサ又は他のプロセッサに対し、該機械語プログラムに含まれる、該通信サブルーチン以外のサブルーチンからのリターン命令を、語長が該リターン命令以下の、該第2ロギングプログラムへのジャンプ命令で置換させ、第2ロギングプログラムが該画像形成装置の該プロセッサに対し、該第2置換プログラムにより置換されたジャンプ命令を含むサブルーチンからの戻りアドレスを取得させ、該戻りアドレスの直前に格納されているサブルーチンコール命令に関する情報を、第2ライトポインタに基づいて該記憶手段に格納させ、該第2ライトポインタの内容を、次に格納すべきアドレスに更新させ、該プロセッサの命令ポインタを該戻りアドレスに変更させるので、該画像形成装置にさらに、サブルーチン単位のトレース機能を、周辺機器動作のトレース機能と関連づけて付加することができ、これによりエラー解析時間をさらに短縮することが可能となるという効果を奏する。   According to the configuration of the second aspect, the second replacement program sends a return instruction from a subroutine other than the communication subroutine included in the machine language program to the processor of the image forming apparatus or another processor. Is replaced with a jump instruction to the second logging program that is less than or equal to the return instruction, and the second logging program instructs the processor of the image forming apparatus from a subroutine including the jump instruction replaced by the second replacement program. Information about the subroutine call instruction stored immediately before the return address is stored in the storage means based on the second write pointer, and the contents of the second write pointer are stored next. And update the processor instruction pointer to the return address. In, the image forming apparatus further tracing subroutine units, can be added in association with trace function peripherals operation, thereby an effect that it is possible to further reduce the error analysis time.

上記第3態様の構成によれば、該通信サブルーチンからのリターン命令のアドレス及び該通信サブルーチン以外のサブルーチンからのリターン命令が記述されたアドレスデータをさらに有し、該第1及び第2置換プログラムがいずれも、該画像形成装置のプロセッサ又は該他のプロセッサに対し、該アドレスデータに含まれるアドレスのリターン命令を該ジャンプ命令で置換させるので、トレースが必要な関数のみをトレースすることが可能になるという効果を奏する。   According to the configuration of the third aspect, it further includes address data in which an address of a return instruction from the communication subroutine and a return instruction from a subroutine other than the communication subroutine are described, and the first and second replacement programs have In any case, since the return instruction of the address included in the address data is replaced with the jump instruction for the processor of the image forming apparatus or the other processor, it is possible to trace only the function that needs to be traced. There is an effect.

上記第4態様の構成によれば、該第1ロギングプログラムが該画像形成装置の該プロセッサに対しさらに、該通信情報に通信IDを付加させて該記憶手段に格納させ、該第2ロギングプログラムが該画像形成装置の該プロセッサに対しさらに、該通信IDが該記憶手段に新たに追加されている場合には該通信IDを該サブルーチンコール命令に関する情報に付加させて該記憶手段に格納させるので、複雑化を避けて両ログを関連付けるとともにまとめることができ、しかも、該通信サブルーチンを間接的に呼び出す割込を受け付けても関数ログ取得中に通信ログをとるということを避けることができるという効果を奏する。   According to the configuration of the fourth aspect, the first logging program further causes the processor of the image forming apparatus to add a communication ID to the communication information and store the communication information in the storage unit. Further, when the communication ID is newly added to the storage unit, the communication ID is added to the information related to the subroutine call instruction and stored in the storage unit. Both logs can be associated and combined to avoid complications, and even if an interrupt that indirectly calls the communication subroutine is accepted, it is possible to avoid taking a communication log during function log acquisition. Play.

上記第5態様の構成によれば、該第2ロギングプログラムの実行中での該第1ロギングプログラムの割込を禁止させるので、該第2ライトポインタを該第1ライトポインタと同一にすることができ、トレース機能の構成が簡単になるという効果を奏する。   According to the configuration of the fifth aspect, since the interrupt of the first logging program during execution of the second logging program is prohibited, the second write pointer can be made the same as the first write pointer. This is advantageous in that the configuration of the trace function is simplified.

上記第6態様の構成によれば、該機械語プログラムが、高級言語のソースプログラムをコンパイルして生成されたものであり、該機械語プログラム中のサブルーチンに対応する該ソースプログラム中の関数名と、該サブルーチンのアドレスと、が対応付けられた関数情報テーブルをさらに有し、該第2ロギングプログラムが該画像形成装置の該プロセッサに対しさらに、該関数情報テーブルを参照させて、該サブルーチンコール命令のオペランドである分岐先アドレスに対応した関数名を、該サブルーチンコール命令に関する情報の一部又は全部として取得させるので、エラー解析が容易になるという効果を奏する。   According to the configuration of the sixth aspect, the machine language program is generated by compiling a high-level language source program, and the function name in the source program corresponding to the subroutine in the machine language program , The subroutine address, and the second logging program further causes the processor of the image forming apparatus to refer to the function information table so that the subroutine call instruction is associated with the subroutine address. Since the function name corresponding to the branch destination address that is the operand of is acquired as part or all of the information related to the subroutine call instruction, an error analysis is facilitated.

上記第7態様の構成によれば、逆置換プログラムが該画像形成装置の該プロセッサに対し、該第1ロギングプログラムへのジャンプ命令及び該第2ロギングプログラムへのジャンプ命令をそれぞれサブルーチンからのリターン命令に置換させるので、トレース後に該逆置換プログラムを実行させることにより、トレース後においても、通常の動作が遅延せず且つそのプログラムサイズが大きくなるのを抑止することができるという効果を奏する。   According to the configuration of the seventh aspect, the reverse replacement program sends a jump instruction to the first logging program and a jump instruction to the second logging program to the processor of the image forming apparatus, respectively. Therefore, by executing the reverse replacement program after tracing, it is possible to prevent the normal operation from being delayed and the program size from being increased even after the tracing.

本発明の他の目的、構成及び効果は以下の説明から明らかになる。   Other objects, configurations and effects of the present invention will become apparent from the following description.

図8は、本発明の実施例1に係る画像形成装置10のハードウェア構成を示す概略ブロック図である。   FIG. 8 is a schematic block diagram illustrating a hardware configuration of the image forming apparatus 10 according to the first embodiment of the invention.

この画像形成装置10では、MPU11がインタフェース12を介して、ROM13R、NVRAM13N、DRAM13D、ハードディスク14、スキャナ15、プリンタ16、モデム17、NIC18及び操作パネル19に結合されている。図9では、簡単化のため、複数のインタフェースを1つのブロックで示している。   In this image forming apparatus 10, the MPU 11 is coupled to a ROM 13 R, NVRAM 13 N, DRAM 13 D, hard disk 14, scanner 15, printer 16, modem 17, NIC 18, and operation panel 19 via an interface 12. In FIG. 9, a plurality of interfaces are shown as one block for the sake of simplicity.

ROM13Rには、ブートストラップ及びBIOSが格納されている。NVRAM13Nは、例えばフラッシュメモリであり、これには、オペレーティングシステム(OS)、OSの上層で動作するアプリケーション及びOSの下層で動作する各種デバイスドライバ並びに各種設定値が格納されている。該アプリケーションは、画像形成装置10を複合機として機能させるためのものを含んでおり、この機能には、コピー、スキャン、プリント及びファクシミリがある。DRAM13Dは主メモリ用である。DRAM13Dは、原因不明のエラーが生じた場合に、後述のトレーサプログラム格納用としても用いられる。ハードディスク14は、主にデータ格納用であり、後述のログファイルが格納される。   The ROM 13R stores bootstrap and BIOS. The NVRAM 13N is, for example, a flash memory, and stores an operating system (OS), an application that operates on the upper layer of the OS, various device drivers that operate on the lower layer of the OS, and various setting values. The application includes an application for causing the image forming apparatus 10 to function as a multifunction peripheral. The functions include copying, scanning, printing, and facsimile. The DRAM 13D is for main memory. The DRAM 13D is also used for storing a tracer program to be described later when an unknown error occurs. The hard disk 14 is mainly used for data storage, and stores a log file to be described later.

スキャナ15は、コピー及びファックス送信での画像入力用である。プリンタ16は、プリントエンジン、定着器並びに用紙の給紙部、搬送部及び排紙部を備えており、印刷データとして供給されるビットマップデータに基づいてプリントエンジンの感光ドラムに静電潜像を形成し、これをトナーで現像し、用紙に転写し定着させた後に排紙する。モデム17は、ファックス送受信用である。NIC18は、ネットワーク上のホストコンピュータ20に結合されて、プリントジョブ、ハードディスク14に対するファイルアクセス及び上記トレーサプログラムのインストールの際に用いられる。操作パネル19は、設定値又は指示を入力し、設定画面や状態などを表示させるためのものである。   The scanner 15 is for image input for copying and fax transmission. The printer 16 includes a print engine, a fixing device, a paper feed unit, a conveyance unit, and a paper discharge unit, and generates an electrostatic latent image on a photosensitive drum of the print engine based on bitmap data supplied as print data. The toner is formed, developed with toner, transferred to a sheet, fixed, and discharged. The modem 17 is for fax transmission / reception. The NIC 18 is coupled to the host computer 20 on the network, and is used for print jobs, file access to the hard disk 14, and installation of the tracer program. The operation panel 19 is used for inputting a setting value or an instruction and displaying a setting screen or a state.

ユーザ使用段階で原因不明のエラーが生じた場合、全アプリケーションプログラムを、デバッグオプションを有効にしてコンパイルしたプログラムに置き換え、さらにデバッガを追加すると、時間がかかるとともに、プログラムサイズが大きくなり過ぎてメモリを追加しなければならなくなり、実用的でない。   If an unknown error occurs in the user usage stage, replacing all application programs with programs compiled with the debug option enabled and adding a debugger will take time, and the program size will become too large and memory will be increased. It must be added and is not practical.

一方、エラーが生じた場合のプログラムの流れを機能単位で把握することができれば、エラー原因究明が容易になる。   On the other hand, if the program flow when an error occurs can be grasped in units of functions, the cause of the error can be easily determined.

そこで、本実施例1では、以下のようにして、既存の機械プログラムにトレース機能を付加する。   Thus, in the first embodiment, a trace function is added to an existing machine program as follows.

図3(A)は、C言語で記述されたメインルーチンと、サブルーチン(関数)との関係を示す。    FIG. 3A shows the relationship between a main routine written in C language and a subroutine (function).

この例では、メインルーチンで関数fnc1(x0、y0)が呼び出され、この関数のreturn命令が実行されると、メインルーチン内の関数呼び出し命令の次のステップへ戻る。   In this example, when the function fnc1 (x0, y0) is called in the main routine and the return instruction of this function is executed, the process returns to the step next to the function call instruction in the main routine.

図3(B)は、図3(A)のソースコードをコンパイルして機械語を生成し、これをニーモニックで記載したものである。コンパイラは、予め定められた規則に従ってコンパイルを行うので、関数呼び出しと関数からメインルーチンへの復帰について、C言語とアセンブリ言語のプログラム間で一定の対応関係がある。   FIG. 3B shows a machine language generated by compiling the source code shown in FIG. 3A and described in mnemonics. Since the compiler compiles according to a predetermined rule, there is a certain correspondence between the C language and assembly language programs with respect to function calls and return from functions to the main routine.

すなわち、関数呼び出しの機械語においては、引数であるx0及びy0がそれぞれメモリからレジスタeaxへロードされた後、push命令によりこのレジスタの内容がスタックエリアにプッシュされる。次いでサブルーチンコール命令call fnc1が実行されて、この命令の次の命令のアドレスが戻りアドレスとして、Pentium(登録商標)の場合にはスタックエリアにプッシュされた後、PowerPC(登録商標)の場合にはリンクレジスタlrに格納された後(以下同様)、アドレスfnc1へジャンプする。   That is, in the machine language for function calls, after the arguments x0 and y0 are loaded from the memory to the register eax, the contents of this register are pushed to the stack area by the push instruction. Next, the subroutine call instruction call fnc1 is executed, and the address of the instruction next to this instruction is returned as a return address. In the case of Pentium (registered trademark), it is pushed to the stack area, and in the case of PowerPC (registered trademark). After being stored in the link register lr (the same applies hereinafter), the program jumps to the address fnc1.

この関数fnc1では、スタックエリアから引数x0及びy0がそれぞれスタックエリアからポップされて、これらが用いられる。関数fnc1の最後のリターン命令ret(PowerPCの場合のリターン命令はブランチリンクレジスタ命令blr、以下単にリターン命令retと称す。)により、スタックエリアから戻りアドレスがポップされ又はリンクレジスタlrに格納された戻りアドレスに基づいて、メインルーチンへ戻る。   In this function fnc1, arguments x0 and y0 are popped from the stack area from the stack area and used. The return address popped from the stack area or stored in the link register lr by the last return instruction ret of the function fnc1 (the return instruction in the case of PowerPC is a branch link register instruction blr, hereinafter simply referred to as a return instruction ret). Return to the main routine based on the address.

本実施例1では、図4に示す如く、既存の機械語プログラムに関数ロギングルーチンfncLoggingを追加するとともに、各関数の最後のリターン命令retをこの関数ロギングルーチンへの無条件ジャンプ命令jmpに置換する。これにより、関数ロギングルーチンの最後のリターン命令retが、置換前のリターン命令と同じ役割を果たすことになる。   In the first embodiment, as shown in FIG. 4, a function logging routine fncLogging is added to an existing machine language program, and the last return instruction ret of each function is replaced with an unconditional jump instruction jmp to this function logging routine. . Thereby, the last return instruction ret of the function logging routine plays the same role as the return instruction before replacement.

本実施例1を実現させるためには、無条件ジャンプ命令jmpのバイト数が、リターン命令のそれ以下であることが要求される。この条件は、多くのプロセッサで満たされる。   In order to realize the first embodiment, the number of bytes of the unconditional jump instruction jmp is required to be less than that of the return instruction. This condition is satisfied with many processors.

関数ロギングルーチンでは、pop命令を実行して得られるレジスタの内容又はリンクレジスタの内容により、関数fnc1からの本来の戻りアドレスを得る。このアドレスから、サブルーチンコール命令のバイト数を減算することにより、サブルーチンコール命令のアドレスを得る。なお、このpop命令を実行した場合には、スタックポインタレジスタの内容をpop命令実行前の値に戻しておく。   In the function logging routine, the original return address from the function fnc1 is obtained from the contents of the register obtained by executing the pop instruction or the contents of the link register. By subtracting the number of bytes of the subroutine call instruction from this address, the address of the subroutine call instruction is obtained. When this pop instruction is executed, the contents of the stack pointer register are returned to the values before the pop instruction is executed.

さらにこのアドレスを遡ってpush命令の規則的使用回数nを検出し、又は、予めこのnの値を求めておいて後述のようにテーブル化しておき、これを参照してnの値を取得する。次いで、n回pop命令を実行して、スタックエリアからこの関数の全引数を取り出す。   Further, this address is traced back to detect the regular use count n of the push instruction, or the value of n is obtained in advance and tabulated as described later, and the value of n is obtained by referring to this. . Next, the pop instruction is executed n times to extract all arguments of this function from the stack area.

このようにして、関数ロギングルーチンは、これにジャンプする前の関数の呼び出し元での関数呼び出し情報を得ることができる。関数ロギングルーチンは、この関数呼び出し情報を取得してこれをメモリのログバッファ領域に格納し、さらに格納先アドレスを更新する。   In this way, the function logging routine can obtain function call information at the function caller before jumping to this. The function logging routine acquires this function call information, stores it in the log buffer area of the memory, and further updates the storage destination address.

このような処理により、呼出順の関数列のログをとることができる。この関数は、ネストされた関数であってもよい。   By such processing, it is possible to log the function sequence in the calling order. This function may be a nested function.

C言語のソースプログラムをコンパイルし、得られたオブジェクトプログラム間をリンクすると、C言語で定義した関数名とその関数のアドレスとを対応させた情報を含むシンボルテーブルが得られる。   When a C language source program is compiled and the obtained object programs are linked, a symbol table including information in which a function name defined in C language is associated with an address of the function is obtained.

図6は、このシンボルテーブルから抽出された関数名及びその入口アドレスと、その関数の全引数のワード数nと、この関数でのリターン命令のアドレス(出口アドレス)とを含む関数情報テーブルを示す。関数ロギングルーチンでは、このテーブルを参照して引数の値を取得し、関数名とその引数を含む関数呼出情報を、図7(A)に示すように記述して、ログをとる。各引数のバイト数は同じとは限らないが、本実施例では説明の簡単化のため、同一とする。取得した引数列の区切りは、解析時に実際の区切りに直せばよい。   FIG. 6 shows a function information table including the function name extracted from the symbol table and its entry address, the number of words n of all arguments of the function, and the address (exit address) of the return instruction in this function. . In the function logging routine, the value of the argument is obtained by referring to this table, and the function name and the function call information including the argument are described as shown in FIG. Although the number of bytes of each argument is not necessarily the same, in the present embodiment, the number of bytes is the same for the sake of simplicity. The obtained argument string delimiter may be changed to the actual delimiter at the time of analysis.

なお、上記シンボルテーブルを参照し又はソースコードから、各引数のタイプ及びバイト数を取得して関数情報テーブルに格納しておき、関数呼出情報を該ソースコードでの記述形式と同じにしてもよい。   Note that the type and number of bytes of each argument may be obtained by referring to the symbol table or from the source code and stored in the function information table, and the function call information may be the same as the description format in the source code. .

また、リターン命令のアドレスは、図6中のサブルーチンのアドレスをインクリメントしながらリターン命令retを検出してそのアドレスを該サブルーチンのリターン命令のアドレスと決定する構成であってもよい。この場合、トレース対象のサブルーチンのアドレスが分かれば、画像形成装置10の型式によらず同一プログラムで画像形成装置10にトレース機能を付加することができる。   The return instruction address may be configured to detect the return instruction ret while incrementing the subroutine address in FIG. 6 and determine the address as the return instruction address of the subroutine. In this case, if the address of the subroutine to be traced is known, the trace function can be added to the image forming apparatus 10 with the same program regardless of the type of the image forming apparatus 10.

図1は、画像形成装置のデバック機能に関する機能ブロック図である。   FIG. 1 is a functional block diagram relating to the debug function of the image forming apparatus.

図1中、ブロック30〜34及び14は、画像形成装置10に既存の構成であり、これに、トレーサ40が付加される。   In FIG. 1, blocks 30 to 34 and 14 are existing configurations in the image forming apparatus 10, and a tracer 40 is added thereto.

アプリケーションプログラム30は、トレース対象の機械語プログラムであって、画像形成装置10を複合機として機能させるプログラムの全部又はその一部である。周辺機器31は、図8のスキャナ15及びプリンタ16のハードウェア構成であって、コントローラ32により制御される。コントローラ32は、スキャナ15を制御するためのワンチップマイクロコンピュータと、プリンタ16を制御するためのワンチップマイクロコンピュータとを備えている。アプリケーションプログラム30の通信部33は、これを構成するサブルーチンがMPU11に対し、これらワンチップマイクロコンピュータと通信を行わせて、コントローラ32へ制御用コマンド(要求)、例えばスキャン指令、給紙指令、ビットマップデータ送信開始指令及び後処理指令等を送信し、また、コントローラ32から周辺機器31の状態、例えば各給紙段の用紙の有無、スキャナの状態、紙詰まり等のエラー、トナー残量の程度、各カバーの開閉状態及びスイッチ操作状態等を取得する。これら要求及び状態は、OS及び通信バッファ34を介して行われる。すなわち、通信部33は、OSに通信の要求をし、また、OSを介し通信バッファ34に受信した状態データを取得する。通信バッファ34は、DRAM13D内の共有領域の一部である。   The application program 30 is a machine language program to be traced, and is all or a part of a program that causes the image forming apparatus 10 to function as a multifunction peripheral. The peripheral device 31 is a hardware configuration of the scanner 15 and the printer 16 in FIG. 8 and is controlled by the controller 32. The controller 32 includes a one-chip microcomputer for controlling the scanner 15 and a one-chip microcomputer for controlling the printer 16. The communication unit 33 of the application program 30 causes the MPU 11 to communicate with the one-chip microcomputer by a subroutine constituting the application program 30, and causes the controller 32 to send a control command (request) such as a scan command, a paper feed command, and a bit. Transmits map data transmission start command, post-processing command, and the like, and also the status of the peripheral device 31 from the controller 32, for example, whether or not there is paper in each paper feed stage, scanner status, paper jam error, etc. The open / close state and switch operation state of each cover are acquired. These requests and states are made via the OS and communication buffer 34. That is, the communication unit 33 requests communication from the OS, and acquires the status data received by the communication buffer 34 via the OS. The communication buffer 34 is a part of the shared area in the DRAM 13D.

コントローラ32からのエラーやカバー開閉の変化などの状態通知は割込ルーチンで処理されるが、通信部33での処理は他のルーチンからでも必要となるので、割込ルーチンから通信部33のサブルーチンが呼び出される。   Status notifications such as errors and cover opening / closing changes from the controller 32 are processed in the interrupt routine, but processing in the communication unit 33 is also required from other routines, so the subroutine from the interrupt routine to the communication unit 33 is processed. Is called.

次に、トレーサ40について説明する。   Next, the tracer 40 will be described.

トレーサ40は、MPU11用のソフトウェア構成(ログバッファを含む)であり、原因不明のエラーが発生した場合、その原因を究明するため、後述のようにユーザの操作により、一時的にDRAM13Dに格納される。   The tracer 40 has a software configuration for the MPU 11 (including a log buffer). When an unknown error occurs, the tracer 40 is temporarily stored in the DRAM 13D by a user operation as will be described later. The

トレーサ40は、ブロック41〜52を備え、これらのうちログバッファ43、バッファポインタ44、ログバッファ47及びバッファポインタ48は、DRAM13D内の共有データ領域に構成される。   The tracer 40 includes blocks 41 to 52, of which the log buffer 43, the buffer pointer 44, the log buffer 47, and the buffer pointer 48 are configured in a shared data area in the DRAM 13D.

置換部41は、正置換部と逆置換部とを備え、この正置換部は、図6の関数情報テーブルに含まれる、各リターン命令retのアドレスについて、このアドレスに格納されているリターン命令retを、上述のように、関数ロギングルーチンへの無条件ジャンプ命令jmp fncLoggingで置換する。但し、通信部33を構成する関数のリターン命令retのアドレスについては、このアドレスに格納されているリターン命令retを、後述の通信ロギングルーチンへの無条件ジャンプ命令jmp comLoggingで置換する。   The replacement unit 41 includes a normal replacement unit and a reverse replacement unit. The normal replacement unit includes the return instruction ret stored in this address with respect to the address of each return instruction ret included in the function information table of FIG. Is replaced with the unconditional jump instruction jmp fncLogging to the function logging routine as described above. However, for the address of the return instruction ret of the function constituting the communication unit 33, the return instruction ret stored at this address is replaced with an unconditional jump instruction jmp commlogging to the communication logging routine described later.

図5は、図1の置換部41による置換後のアセンブリ言語プログラムの概略説明図である。この図において、"interrupt"はコントローラ32からの受信に応答して実行される割込ルーチンであり、この割込ルーチンで通信部33のサブルーチン"com"が呼び出される。サブルーチン"com"は、"main"ルーチンからも呼び出される。   FIG. 5 is a schematic explanatory diagram of the assembly language program after replacement by the replacement unit 41 of FIG. In this figure, “interrupt” is an interrupt routine executed in response to reception from the controller 32, and a subroutine “com” of the communication unit 33 is called by this interrupt routine. The subroutine “com” is also called from the “main” routine.

上記逆置換部は、正置換部と逆の置換を行って、アプリケーションプログラム30を元の状態に戻す。   The reverse replacement unit performs reverse replacement with the normal replacement unit, and returns the application program 30 to the original state.

ロギング部42は、上記関数ロギングルーチンで構成されている。置換部41での正置換処理終了後にアプリケーションプログラム30を起動させると、図6の関数情報テーブル内のシンボルで表されるロギング対象関数が呼び出される毎に、その関数からロギングルーチンへジャンプする。   The logging unit 42 includes the function logging routine. When the application program 30 is started after the normal replacement process in the replacement unit 41 is completed, each time the logging target function represented by the symbol in the function information table in FIG. 6 is called, the function jumps to the logging routine.

ロギング部42は、該関数の呼出元の関数呼出情報を上述のように取得して、これをログバッファ43に格納させる。ログバッファ43は、そのリードアドレスからライトアドレス−1まで有効データが格納されているループバッファ(範囲の上限アドレスから下限アドレスへ戻るエンドレスバッファ)であり、かつ、FIFOバッファであって、リードポインタ440及びライトポインタ441を含むバッファポインタ44を用いて管理される。すなわち、ロギング部42は、ライトポインタ441で示されるアドレスから上記情報を書き込み開始するとともに、ライトポインタ441の内容を次の書込アドレスに更新する。   The logging unit 42 acquires the function call information of the function call source as described above, and stores it in the log buffer 43. The log buffer 43 is a loop buffer (an endless buffer that returns from the upper limit address of the range to the lower limit address) in which valid data is stored from the read address to the write address −1, and is a FIFO buffer that includes a read pointer 440. And a buffer pointer 44 including a write pointer 441. That is, the logging unit 42 starts writing the information from the address indicated by the write pointer 441 and updates the content of the write pointer 441 to the next write address.

ログ収集部45は、ログバッファ43への書込完了毎に起動され、バッファポインタ44の内容からログバッファ43の使用率を求め、これが例えば90%以上のときに、又は、画像形成装置10がレディー状態のときに、バッファポインタ44を参照して、ログバッファ43の内容をハードディスク14にログファイルとして退避させ、リードポインタ440の内容を更新する。   The log collection unit 45 is activated each time writing to the log buffer 43 is completed, and obtains the usage rate of the log buffer 43 from the contents of the buffer pointer 44. When this is 90% or more, for example, or the image forming apparatus 10 In the ready state, the contents of the log buffer 43 are saved as a log file in the hard disk 14 with reference to the buffer pointer 44, and the contents of the read pointer 440 are updated.

一方、通信ロギング部46は、上述の置換による通信部33からのジャンプ毎に、ロギング部42と同様にして、通信バッファ34に新たに書き込まれた通信データをログバッファ47に格納させる。この通信データは、通信バッファ34に書き込まれたものであればよく、受信データのみでもよい。受信データは、送信データ(要求)に対応したものと、エラー状態のようにコントローラ32から一方的に供給されるものを含むからである。バッファポインタ48は、バッファポインタ44と同様に、通信ロギング部46及びログ収集部45で用いられるとともに更新される。ログ収集部45は、ログバッファ47に対しても、ログバッファ43に対する処理と同様のことを行う。   On the other hand, the communication logging unit 46 stores the communication data newly written in the communication buffer 34 in the log buffer 47 in the same manner as the logging unit 42 for each jump from the communication unit 33 by the above-described replacement. The communication data may be any data written in the communication buffer 34, and may be only received data. This is because the received data includes data corresponding to transmission data (request) and data unilaterally supplied from the controller 32 as in an error state. The buffer pointer 48 is used and updated by the communication logging unit 46 and the log collection unit 45 in the same manner as the buffer pointer 44. The log collection unit 45 performs the same processing on the log buffer 47 as the processing on the log buffer 43.

通信ロギング部46はまた、ログバッファ47へ通信データを格納させる際、このデータを識別する通信ID(シリアル番号)を通信データと対応させて格納させ、次いでメモリの共有エリア内の通知フラグFをセットすることにより、新たな通信データが格納されたことをロギング部42へ通知する。図7(B)は通信ログ説明図であり、"com01"等は通信IDである。ロギング部42は、通知フラグFが‘1’であれば未格納の通信IDをログバッファ43に格納し、次いで関数呼出情報をログバッファ43に格納する。   When the communication logging unit 46 stores communication data in the log buffer 47, the communication logging unit 46 stores a communication ID (serial number) for identifying this data in association with the communication data, and then sets a notification flag F in the shared area of the memory. By setting, the logging unit 42 is notified that new communication data has been stored. FIG. 7B is an explanatory diagram of a communication log, and “com01” and the like are communication IDs. If the notification flag F is “1”, the logging unit 42 stores an unstored communication ID in the log buffer 43, and then stores function call information in the log buffer 43.

データ圧縮部49は、ハードディスク14に格納されたログデータを圧縮する。この圧縮には、同一引数を用いた同一関数の繰り返しをその繰り返し回数で表現することによる圧縮と、通常の圧縮とがある。前者は例えば、fnc1(10、18)が50回繰り返された場合、これをfnc1(10、18)×50と表記することにより圧縮する。関数列を単位とする繰り返しについても同様である。   The data compression unit 49 compresses log data stored in the hard disk 14. This compression includes compression by expressing the repetition of the same function using the same argument by the number of repetitions, and normal compression. For example, when fnc1 (10, 18) is repeated 50 times, the former is compressed by expressing it as fnc1 (10, 18) × 50. The same applies to the repetition in units of function sequences.

暗号化部50は、この圧縮されたデータを暗号化する。これは、ログデータを解析することにより、プログラムの構造及び動作に関する秘密情報が漏洩するのを防止するためである。   The encryption unit 50 encrypts the compressed data. This is to prevent leakage of secret information related to the structure and operation of the program by analyzing the log data.

ログ送信部51は、圧縮され且つ暗号化されたログデータを、予め設定されたアドレスに、電子メールで送信する。   The log transmission unit 51 transmits the compressed and encrypted log data to a predetermined address by e-mail.

ユーザインタフェース部52は、ホストコンピュータ20からのコマンドに応じて、置換部41の正置換部を起動させ又はデータ圧縮部49を起動させる。   The user interface unit 52 activates the primary replacement unit of the replacement unit 41 or the data compression unit 49 in response to a command from the host computer 20.

図2は、ロギング部42の動作を示す詳細フローチャートである。以下、括弧内は図2中のステップ識別符号である。   FIG. 2 is a detailed flowchart showing the operation of the logging unit 42. Hereinafter, the parenthesized characters are step identification codes in FIG.

(S0〜S2)通知フラグFがセットされていれば、ログバッファ47内の新しい通信IDを改行コードとともにログバッファ43に格納し、通知フラグFをリセットする。   (S0 to S2) If the notification flag F is set, the new communication ID in the log buffer 47 is stored in the log buffer 43 together with the line feed code, and the notification flag F is reset.

(S3)pop命令を実行してそのレジスタeaxから又はリンクレジスタlrから、戻りアドレスを取得する。   (S3) The pop instruction is executed to obtain the return address from the register eax or from the link register lr.

(S4)サブルーチンコール命令callが例えば4バイトである場合、この戻りアドレスから4を減算して、サブルーチン呼出元のアドレスを求める。   (S4) If the subroutine call instruction “call” is, for example, 4 bytes, 4 is subtracted from this return address to obtain the address of the subroutine call source.

(S5)該アドレスのサブルーチンコール命令callのオペランドである分岐先アドレスを求め、関数情報テーブルを参照して、このアドレスに対応する関数名及び引数取得用ポップ命令繰返し数nを取得する。   (S5) The branch destination address that is the operand of the subroutine call instruction “call” at the address is obtained, and the function name and argument acquisition pop instruction repetition number n corresponding to this address are obtained by referring to the function information table.

(S6)関数名に"("を付加したものをログバッファ43に格納し、ライトポインタ441を更新する。   (S6) The function name with “(” added is stored in the log buffer 43, and the write pointer 441 is updated.

(S7)スタックポインタに−4nを加算する。但し、プッシュ命令及びポップ命令のそれぞれで1ワード=4バイトのデータが移動するとする。   (S7) -4n is added to the stack pointer. However, it is assumed that 1 word = 4 bytes of data moves in each of the push instruction and the pop instruction.

以下、S8とS11の間の処理をn回繰り返す。   Thereafter, the process between S8 and S11 is repeated n times.

(S9)スタック領域からレジスタeaxへポップする。   (S9) Pop from the stack area to the register eax.

(S10)実引数(eax)を区切り記号","とともにログバッファ43に格納し、ライトポインタ441を更新する。ここに、(eax)はレジスタeaxの内容を意味する。   (S10) The actual argument (eax) is stored in the log buffer 43 together with the delimiters “,” and the write pointer 441 is updated. Here, (eax) means the contents of the register eax.

(S12)ログバッファ43に最後に格納した区切り記号","を閉じ括弧")"+改行コードで置換し、ライトポインタ441を更新する。   (S12) The delimiter symbol “,” stored last in the log buffer 43 is replaced with a closing parenthesis “)” + line feed code, and the write pointer 441 is updated.

このような処理により、C言語で記述された、引数を含む関数名を、関数が実行される毎に、順次ログバッファに格納させることができる。   By such processing, function names including arguments described in C language can be sequentially stored in the log buffer every time the function is executed.

次に、上記の如く構成されたトレーサ40の使用方法を説明する。   Next, a method of using the tracer 40 configured as described above will be described.

トレーサ40のプログラムと、これを画像形成装置10のDRAM13DにNIC18を介しインストールするプログラムとは、まとめて圧縮され、画像形成装置メーカーのWebサーバの外部記憶装置に格納されており、Webページからこれをダウンロード可能になっている。トレーサ40のプログラムには、ログ送信部42で用いられる上述の送信先アドレスが含まれている。このアドレスは例えば、メーカーのエラー解析担当者の電子メールアドレスである。   The program for the tracer 40 and the program for installing the program in the DRAM 13D of the image forming apparatus 10 via the NIC 18 are compressed together and stored in the external storage device of the Web server of the image forming apparatus manufacturer. Can be downloaded. The program of the tracer 40 includes the above-described transmission destination address used by the log transmission unit 42. This address is, for example, the e-mail address of the person in charge of error analysis at the manufacturer.

画像形成装置に原因不明のエラーが生じた場合、ユーザは、画像形成装置10をリセットさせて初期状態に戻し、ホストコンピュータ20を操作してこのプログラムを該Webページからダウンロードし、これを解凍させ、インストールプログラムを起動させて、NIC18を介しDRAM13Dにトレーサ40のプログラムを格納させる。   When an unknown error occurs in the image forming apparatus, the user resets the image forming apparatus 10 to return to the initial state, operates the host computer 20 to download the program from the Web page, and decompresses the program. Then, the installation program is started and the program of the tracer 40 is stored in the DRAM 13D via the NIC 18.

ユーザは、ホストコンピュータ20を操作して、ユーザインタフェース部52を介し置換部41の正置換部を起動させる。この置換が終了した後に、ユーザは、該エラーが生じた場合と同じ条件になるように操作パネル19を操作する。これにより、ハードディスク14に関数ログが周辺機器ログとともに格納される。   The user operates the host computer 20 to activate the normal replacement unit of the replacement unit 41 via the user interface unit 52. After the replacement is completed, the user operates the operation panel 19 so as to satisfy the same conditions as when the error has occurred. As a result, the function log is stored in the hard disk 14 together with the peripheral device log.

エラーが再現されると、ユーザは、ホストコンピュータ20を操作して、ユーザインタフェース部52を介しデータ圧縮部49を起動させる。これにより、ログデータが圧縮され、さらに後暗号化され、そのデータが上記アドレスに電子メールで送信される。   When the error is reproduced, the user operates the host computer 20 to activate the data compression unit 49 via the user interface unit 52. As a result, the log data is compressed and further encrypted, and the data is transmitted to the address by e-mail.

次いで置換部41の逆置換部が起動されて、アプリケーションプログラム30が元の状態に戻る。ユーザは、画像形成装置10をリセットさせて初期状態に戻す。これにより、トレーサ40がDRAM13Dから消去された状態、すなわち画像形成装置10が元の状態になる。   Next, the reverse replacement unit of the replacement unit 41 is activated, and the application program 30 returns to the original state. The user resets the image forming apparatus 10 to return to the initial state. As a result, the tracer 40 is erased from the DRAM 13D, that is, the image forming apparatus 10 is in the original state.

エラー解析担当者は、受信したデータを復号し、解凍して、エラー発生原因を究明する。この際、例えば、デバッガでこのログデータを用いて、該エラーに至る動作を再現させる。   The person in charge of error analysis decrypts the received data, decompresses it, and investigates the cause of the error. At this time, for example, the log data is used by a debugger to reproduce the operation leading to the error.

本実施例1によれば、画像形成装置10に含まれるスキャナ15やプリンタ16などの周辺機器を制御するコントローラとの間で通信を行い受信した周辺機器状態をメモリバッファに格納させる、通信部33を構成するサブルーチンを、画像形成装置10の機械語プログラム(アプリケーションプログラム)30が備え、置換部41のプログラムが画像形成装置10のプロセッサ11に対し、通信部33を構成するサブルーチンからのリターン命令を、語長が該リターン命令以下の、通信ロギング部46のプログラムへのジャンプ命令で置換させ、このプログラムが画像形成装置10のプロセッサ11に対し、該メモリバッファに格納された内容を通信情報として、ライトポインタ481に基づきDRAM13Dに格納させ、ライトポインタ481の内容を、次に格納すべきアドレスに更新させ、リターン命令実行によりプロセッサ11の命令ポインタを戻りアドレスに変更させるので、トレース機能を備えていない画像形成装置10に周辺機器動作のトレース機能を容易に付加することができ、これによりエラー解析時間を短縮することが可能となるという効果を奏する。   According to the first embodiment, the communication unit 33 communicates with a controller that controls peripheral devices such as the scanner 15 and the printer 16 included in the image forming apparatus 10 and stores the received peripheral device state in the memory buffer. Is included in the machine language program (application program) 30 of the image forming apparatus 10, and the program of the replacement unit 41 sends a return instruction from the subroutine of the communication unit 33 to the processor 11 of the image forming apparatus 10. , The word length is replaced with a jump instruction to the program of the communication logging unit 46 whose length is equal to or less than the return instruction, and the content stored in the memory buffer is transmitted to the processor 11 of the image forming apparatus 10 as communication information. Based on the write pointer 481, it is stored in the DRAM 13D, and the write pointer Since the contents of 81 are updated to the address to be stored next, and the instruction pointer of the processor 11 is changed to the return address by executing the return instruction, the image forming apparatus 10 that does not have the tracing function has a tracing function of peripheral device operation. It can be easily added, and this brings about an effect that the error analysis time can be shortened.

また、エラーが発生しなければ、トレース機能を付加する必要がないので、通常の動作が遅延せず且つそのプログラムサイズが大きくなるのを抑止することができるという効果を奏する。   If no error occurs, there is no need to add a trace function, so that the normal operation is not delayed and the program size can be prevented from increasing.

さらに、トレース用の特別な回路を画像形成装置10に備える必要がないという効果を奏する。   Furthermore, there is an effect that it is not necessary to provide the image forming apparatus 10 with a special circuit for tracing.

また、置換部41のプログラムが画像形成装置10のプロセッサ11に対し、機械語プログラム30に含まれる、通信部33を構成するサブルーチン以外のサブルーチンからのリターン命令を、語長が該リターン命令以下の、ロギング部42のプログラムへのジャンプ命令で置換させ、ロギング部42のプログラム11が画像形成装置10のプロセッサ11に対し、置換部41のプログラムにより置換されたジャンプ命令を含むサブルーチンからの戻りアドレスを取得させ、該戻りアドレスの直前に格納されているサブルーチンコール命令に関する情報を、ライトポインタ441に基づいてDRAM13Dに格納させ、ライトポインタ441の内容を、次に格納すべきアドレスに更新させ、リターン命令実行によりプロセッサ11の命令ポインタを該戻りアドレスに変更させるので、画像形成装置10にさらに、サブルーチン単位のトレース機能を、周辺機器動作のトレース機能と関連づけて付加することができ、これによりエラー解析時間をさらに短縮することが可能となるという効果を奏する。   In addition, the program of the replacement unit 41 gives the processor 11 of the image forming apparatus 10 a return instruction from a subroutine other than the subroutine constituting the communication unit 33 included in the machine language program 30, and the word length is equal to or less than the return instruction. , The program 11 of the logging unit 42 replaces the processor 11 of the image forming apparatus 10 with the jump instruction to the program of the logging unit 42, and the return address from the subroutine including the jump instruction replaced by the program of the replacement unit 41. Information about the subroutine call instruction stored immediately before the return address is stored in the DRAM 13D based on the write pointer 441, the contents of the write pointer 441 are updated to the address to be stored next, and the return instruction The instruction poi of the processor 11 by execution Since the data is changed to the return address, a trace function for each subroutine can be added to the image forming apparatus 10 in association with the trace function for peripheral device operation, thereby further reducing the error analysis time. There is an effect that it becomes possible.

さらに、置換部41のプログラムが画像形成装置10のプロセッサ11に対し、図6の関数情報テーブルに含まれるアドレスのリターン命令をジャンプ命令で置換させるので、トレースが必要な関数のみをトレースすることが可能になるという効果を奏する。   Further, since the program of the replacement unit 41 causes the processor 11 of the image forming apparatus 10 to replace the return instruction at the address included in the function information table of FIG. 6 with a jump instruction, only the functions that need to be traced can be traced. There is an effect that it becomes possible.

また、通信ロギング部42のプログラムが画像形成装置10のプロセッサ11に対し、通信情報に通信IDを付加させてログバッファ47に格納させ、ロギング部42のプログラムが画像形成装置10のプロセッサ11に対し、通信IDがログバッファ47に新たに追加されていることを通信フラグFの値で知得した場合には、関数ログ書き込み前にこの通信IDをサブルーチンコール命令に関する情報に付加させてログバッファ43に格納させるので、複雑化を避けて両ログを関連付けるとともにまとめることができ、しかも、通信部33のサブルーチンを間接的に呼び出す割込を受け付けても、サブルーチンログ取得中に通信ログをとるということを避けることができるという効果を奏する。   Further, the program of the communication logging unit 42 adds the communication ID to the communication information to the processor 11 of the image forming apparatus 10 and stores it in the log buffer 47, and the program of the logging unit 42 transmits to the processor 11 of the image forming apparatus 10. When the communication flag F indicates that a communication ID has been newly added to the log buffer 47, this log ID is added to the information related to the subroutine call instruction before writing the function log. Therefore, it is possible to associate and combine both logs while avoiding complications, and even if an interrupt that indirectly calls a subroutine of the communication unit 33 is accepted, a communication log is taken while the subroutine log is being acquired. The effect that can be avoided.

さらにまた、機械語プログラム30が、C言語等の高級言語のソースプログラムをコンパイルして生成されたものであり、機械語プログラム30中のサブルーチンに対応するソースプログラム中の関数名とこれに対応した機械語サブルーチンのアドレスとをフィールドとして有する関数情報テーブルを備え、ロギング部42のプログラムが画像形成装置10のプロセッサ11に対しさらに、該関数情報テーブルを参照させて、機械語サブルーチンコール命令のオペランドである分岐先アドレスに対応した関数名を、該サブルーチンコール命令に関する情報の一部として取得させるので、エラー解析が容易になるという効果を奏する。   Furthermore, the machine language program 30 is generated by compiling a source program in a high-level language such as C language, and the function name in the source program corresponding to the subroutine in the machine language program 30 corresponds to this. A function information table having a machine language subroutine address as a field, and the program of the logging unit 42 further causes the processor 11 of the image forming apparatus 10 to refer to the function information table and use the operand of the machine language subroutine call instruction. Since the function name corresponding to a certain branch destination address is acquired as a part of the information related to the subroutine call instruction, an error analysis is facilitated.

また、置換部41の逆置換プログラムが画像形成装置10のプロセッサ11に対し、ロギング部42及び46へのジャンプ命令をそれぞれサブルーチンからのリターン命令に置換させるので、トレース後に該逆置換プログラムを実行させることにより、トレース後においても、通常の動作が遅延せず且つそのプログラムサイズが大きくなるのを抑止することができるという効果を奏する。   Also, the reverse replacement program of the replacement unit 41 causes the processor 11 of the image forming apparatus 10 to replace the jump instructions to the logging units 42 and 46 with return instructions from the subroutines, so that the reverse replacement program is executed after tracing. As a result, even after tracing, the normal operation is not delayed and the program size can be prevented from increasing.

なお、本発明には外にも種々の変形例が含まれる。   Note that the present invention includes various other modifications.

例えば、図6の関数名の替わりにそのアドレス又はオペランドにこれを含むサブルーチンコールのコードのログをとり、エラー解析者側のプログラムでこれを関数名に変換してもよい。また、1つのプロセッサ11でログをとっているので、ロギング部42での処理中に通信部33での割込が生じないようにし(割込マスクをして)、ログバッファ43とログバッファ47とを1つにまとめた構成であってもよく、この場合、トレース機能の構成が簡単になるという効果を奏する。さらに、関数名列のログだけでもエラー解析に有効であるので、関数の引数までログをとらない構成であってもよい。   For example, instead of the function name shown in FIG. 6, a log of a subroutine call code including the address or operand may be taken and converted into a function name by a program on the error analyst side. In addition, since the log is taken by one processor 11, the interrupt in the communication unit 33 is prevented from occurring during the processing in the logging unit 42 (with an interrupt mask), and the log buffer 43 and the log buffer 47. In this case, the configuration of the trace function is simplified. Furthermore, since only the log of the function name string is effective for error analysis, a configuration may be adopted in which no log is taken up to the function argument.

また、アプリケーションプログラム30と同一のプログラムを、ホストコンピュータ20にロードさせてホストコンピュータ20側で上記置換を行わせ、又は、メーカー側で置換済のものを備えてユーザにこれをWebページからダウンロードさせ、次いでこれを画像形成装置10に格納させる構成であってもよい。   Also, the same program as the application program 30 is loaded on the host computer 20 and the host computer 20 performs the above replacement, or the manufacturer has a replacement and the user downloads it from the web page. Then, this may be configured to be stored in the image forming apparatus 10.

さらに、メモリ13R、13N若しくはHDD14又はUSBメモリなどのリムーバブル記憶装置にトレーサ40のプログラムを予め格納しておき、上記同様にして必要時のみトレース機能を付加する構成であってもよい。   Further, the program of the tracer 40 may be stored in advance in a removable storage device such as the memory 13R, 13N, HDD 14 or USB memory, and the trace function may be added only when necessary in the same manner as described above.

画像形成装置のトレース機能に関する機能ブロック図である。It is a functional block diagram regarding the trace function of the image forming apparatus. 図1中のロギング部の動作を示す詳細フローチャートである。It is a detailed flowchart which shows operation | movement of the logging part in FIG. (A)はC言語で記述されたメインルーチンとサブルーチン(関数)との関係を示す説明図であり、(B)はさらに関数ロギングルーチンfncLoggingを追加したものの説明図である。(A) is explanatory drawing which shows the relationship between the main routine described in C language, and a subroutine (function), (B) is explanatory drawing which added the function logging routine fncLogging further. 図3(B)に対応した機械語プログラムをニーモニックで記述したものの説明図である。It is explanatory drawing of what described the machine language program corresponding to FIG. 3 (B) by the mnemonic. 図1の置換部による置換後のアセンブリ言語プログラムの概略説明図である。It is a schematic explanatory drawing of the assembly language program after the replacement by the replacement part of FIG. シンボルテーブルから抽出された関数名及びそのアドレスと、その関数の全引数のワード数nと、この関数でのリターン命令のアドレスとを含む関数情報テーブルを示す図である。It is a figure which shows the function information table containing the function name extracted from the symbol table, its address, the word number n of all the arguments of the function, and the address of the return instruction in this function. (A)は、図1のトレーサで得られた関数ログの説明図であり、(B)は、このトレーサで得られた通信ログの説明図である。(A) is explanatory drawing of the function log obtained with the tracer of FIG. 1, (B) is explanatory drawing of the communication log obtained with this tracer. 画像形成装置のハードウェア構成を示す概略ブロック図である。FIG. 2 is a schematic block diagram illustrating a hardware configuration of the image forming apparatus.

符号の説明Explanation of symbols

10 画像形成装置
11 MPU
12 インタフェース
13R ROM
13N NVRAM
13D DRAM
14 ハードディスク
15 スキャナ
16 プリンタ
17 モデム
18 NIC
19 操作パネル
20 ホストコンピュータ
30 アプリケーションプログラム
31 周辺機器
32 コントローラ
33 通信部
34 通信バッファ
40 トレーサ
41 置換部
42 ロギング部
43、47 ログバッファ
44、48 バッファポインタ
440、480 リードポインタ
441、481 ライトポインタ
45 ログ収集部
46 通信ロギング部
49 データ圧縮部
50 暗号化部
51 ログ送信部
52 ユーザインタフェース部
10 Image forming apparatus 11 MPU
12 interface 13R ROM
13N NVRAM
13D DRAM
14 Hard disk 15 Scanner 16 Printer 17 Modem 18 NIC
19 Operation Panel 20 Host Computer 30 Application Program 31 Peripheral Device 32 Controller 33 Communication Unit 34 Communication Buffer 40 Tracer 41 Replacement Unit 42 Logging Unit 43, 47 Log Buffer 44, 48 Buffer Pointer 440, 480 Read Pointer 441, 481 Write Pointer 45 Log Collection unit 46 Communication logging unit 49 Data compression unit 50 Encryption unit 51 Log transmission unit 52 User interface unit

Claims (10)

画像形成装置の記憶手段に格納された機械語プログラムにトレース機能を付加する画像形成装置用トレース機能付加プログラムであって、該記憶手段に格納される第1置換プログラムと第1ロギングプログラムとを有し、該機械語プログラムは、該画像形成装置に含まれる周辺機器を制御するコントローラとの間で通信を行い受信した周辺機器の状態をメモリバッファに格納させる通信サブルーチンを有し、
該第1置換プログラムは該画像形成装置のプロセッサ又は他のプロセッサに対し、該通信サブルーチンからのリターン命令を、語長が該リターン命令以下の、該第1ロギングプログラムへのジャンプ命令で置換させることを特徴とし、
該第1ロギングプログラムは該画像形成装置の該プロセッサに対し、
該メモリバッファに格納された内容を通信情報として、第1ライトポインタに基づき該記憶手段に格納させ、該第1ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させる、
ステップを有することを特徴とする画像形成装置用トレース機能付加プログラム。
A tracing function addition program for an image forming apparatus that adds a tracing function to a machine language program stored in a storage unit of the image forming apparatus, and includes a first replacement program and a first logging program stored in the storage unit. The machine language program has a communication subroutine for communicating with a controller that controls peripheral devices included in the image forming apparatus and storing the received peripheral device status in a memory buffer.
The first replacement program causes the processor of the image forming apparatus or another processor to replace a return instruction from the communication subroutine with a jump instruction to the first logging program whose word length is less than or equal to the return instruction. Features
The first logging program is sent to the processor of the image forming apparatus.
The content stored in the memory buffer is stored as communication information in the storage means based on the first write pointer, the content of the first write pointer is updated to the address to be stored next,
Changing the instruction pointer of the processor to the return address;
A tracing function addition program for an image forming apparatus, comprising a step.
該記憶手段に格納される第2置換プログラムと第2ロギングプログラムとをさらに有し、
該第2置換プログラムは該画像形成装置のプロセッサ又は他のプロセッサに対し、該機械語プログラムに含まれる、該通信サブルーチン以外のサブルーチンからのリターン命令を、語長が該リターン命令以下の、該第2ロギングプログラムへのジャンプ命令で置換させることを特徴とし、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対し、
該第2置換プログラムにより置換されたジャンプ命令を含むサブルーチンからの戻りアドレスを取得させ、
該戻りアドレスの直前に格納されているサブルーチンコール命令に関する情報を、第2ライトポインタに基づいて該記憶手段に格納させ、該第2ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させる、
ステップを有し、該機器通信情報と該サブルーチンコール命令に関する情報との組み合わせの時系列情報を得ることを特徴とする請求項1に記載の画像形成装置用トレース機能付加プログラム。
A second replacement program and a second logging program stored in the storage means;
The second replacement program sends a return instruction from a subroutine other than the communication subroutine included in the machine language program to the processor of the image forming apparatus or another processor, and the second instruction having a word length equal to or less than the return instruction. 2 It is replaced with a jump instruction to the logging program,
The second logging program is sent to the processor of the image forming apparatus.
Obtaining a return address from a subroutine including a jump instruction replaced by the second replacement program;
Information related to the subroutine call instruction stored immediately before the return address is stored in the storage means based on the second write pointer, and the content of the second write pointer is updated to the address to be stored next,
Changing the instruction pointer of the processor to the return address;
2. The trace function addition program for an image forming apparatus according to claim 1, further comprising a step of obtaining time-series information of a combination of the device communication information and information on the subroutine call instruction.
該通信サブルーチンからのリターン命令のアドレス及び該通信サブルーチン以外のサブルーチンからのリターン命令が記述されたアドレスデータをさらに有し、
該第1及び第2置換プログラムはいずれも、該画像形成装置のプロセッサ又は該他のプロセッサに対し、該アドレスデータに含まれるアドレスのリターン命令を該ジャンプ命令で置換させる、
ことを特徴とする請求項2に記載の画像形成装置用トレース機能付加プログラム。
Further including address data in which an address of a return instruction from the communication subroutine and a return instruction from a subroutine other than the communication subroutine are described;
Both the first and second replacement programs cause the processor of the image forming apparatus or the other processor to replace the return instruction of the address included in the address data with the jump instruction.
The trace function addition program for an image forming apparatus according to claim 2, wherein:
該第1ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該通信情報に通信IDを付加させて該記憶手段に格納させ、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該通信IDが該記憶手段に新たに追加されている場合には該通信IDを該サブルーチンコール命令に関する情報に付加させて該記憶手段に格納させる、
ことを特徴とする請求項1乃至3のいずれか1つに記載の画像形成装置用トレース機能付加プログラム。
The first logging program further causes the processor of the image forming apparatus to add a communication ID to the communication information and store it in the storage means,
The second logging program further causes the processor of the image forming apparatus to add the communication ID to information related to the subroutine call instruction when the communication ID is newly added to the storage means. Stored in the means,
4. The tracing function addition program for an image forming apparatus according to claim 1, wherein the tracing function addition program is for an image forming apparatus.
該第2ライトポインタは該第1ライトポインタと同一であり、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、その実行中での該第1ロギングプログラムの割込を禁止させる、
ことを特徴とする請求項1乃至3のいずれか1つに記載の画像形成装置用トレース機能付加プログラム。
The second write pointer is identical to the first write pointer;
The second logging program further prohibits the processor of the image forming apparatus from interrupting the first logging program during execution thereof.
4. The tracing function addition program for an image forming apparatus according to claim 1, wherein the tracing function addition program is for an image forming apparatus.
該機械語プログラムは、高級言語のソースプログラムをコンパイルして生成されたものであり、
該機械語プログラム中のサブルーチンに対応する該ソースプログラム中の関数名と、該サブルーチンのアドレスと、が対応付けられた関数情報テーブルをさらに有し、
該第2ロギングプログラムは該画像形成装置の該プロセッサに対しさらに、該関数情報テーブルを参照させて、該サブルーチンコール命令のオペランドである分岐先アドレスに対応した関数名を、該サブルーチンコール命令に関する情報の一部又は全部として取得させる、
ことを特徴とする請求項1乃至5のいずれか1つに記載の画像形成装置用トレース機能付加プログラム。
The machine language program is generated by compiling a high-level language source program,
A function information table in which a function name in the source program corresponding to a subroutine in the machine language program is associated with an address of the subroutine;
The second logging program further causes the processor of the image forming apparatus to refer to the function information table so that a function name corresponding to a branch destination address that is an operand of the subroutine call instruction is obtained. As part or all of
6. The tracing function addition program for an image forming apparatus according to claim 1, wherein the tracing function addition program is for an image forming apparatus.
該画像形成装置の該記憶手段に格納される逆置換プログラムをさらに有し、
該逆置換プログラムは該画像形成装置の該プロセッサに対し、該第1ロギングプログラムへのジャンプ命令及び該第2ロギングプログラムへのジャンプ命令をそれぞれサブルーチンからのリターン命令に置換させる、
ことを特徴とする請求項1乃至6のいずれか1つに記載の画像形成装置用トレース機能付加プログラム。
A reverse replacement program stored in the storage unit of the image forming apparatus;
The reverse replacement program causes the processor of the image forming apparatus to replace a jump instruction to the first logging program and a jump instruction to the second logging program, respectively, with a return instruction from a subroutine.
7. The tracing function addition program for an image forming apparatus according to claim 1, wherein the tracing function addition program is for an image forming apparatus.
プロセッサと、
該プロセッサに結合され、請求項7に記載の第1及び第2置換プログラムと第1及び第2ロギングプログラムと逆置換プログラムとが格納される記憶手段と、
を有し、該第1及び第2置換プログラムと、該第1及び第2ロギングプログラムと、該逆置換プログラムとを、この順に実行させることによりエラー発生時のみトレース機能を付加できるようにしたことを特徴とする画像形成装置。
A processor;
Storage means coupled to the processor for storing the first and second replacement programs, the first and second logging programs and the reverse replacement program according to claim 7;
The trace function can be added only when an error occurs by executing the first and second replacement programs, the first and second logging programs, and the reverse replacement program in this order. An image forming apparatus.
画像形成装置の記憶手段に格納された機械語プログラムにトレース機能を付加する画像形成装置用トレース機能付加方法であって、該記憶手段に格納される第1置換プログラムと第1ロギングプログラムとを用い、該機械語プログラムは、該画像形成装置に含まれる周辺機器を制御するコントローラとの間で通信を行い受信した周辺機器の状態をメモリバッファに格納させる通信サブルーチンを有し、
該第1置換プログラムにより該画像形成装置のプロセッサ又は他のプロセッサに対し、該通信サブルーチンからのリターン命令を、語長が該リターン命令以下の、該第1ロギングプログラムへのジャンプ命令で置換させ、
該第1ロギングプログラムにより該画像形成装置の該プロセッサに対し、
該メモリバッファに格納された内容を通信情報として、第1ライトポインタに基づき該記憶手段に格納させ、該第1ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させる、
ステップを有することを特徴とする画像形成装置用トレース機能付加方法。
An image forming apparatus trace function adding method for adding a trace function to a machine language program stored in a storage unit of an image forming apparatus, using a first replacement program and a first logging program stored in the storage unit The machine language program has a communication subroutine for communicating with a controller for controlling peripheral devices included in the image forming apparatus and storing the received peripheral device status in a memory buffer.
The first replacement program causes the processor of the image forming apparatus or another processor to replace the return instruction from the communication subroutine with a jump instruction to the first logging program whose word length is equal to or less than the return instruction.
With respect to the processor of the image forming apparatus by the first logging program,
The content stored in the memory buffer is stored as communication information in the storage means based on the first write pointer, the content of the first write pointer is updated to the address to be stored next,
Changing the instruction pointer of the processor to the return address;
And a tracing function adding method for an image forming apparatus.
該記憶手段に格納される第2置換プログラムと第2ロギングプログラムとをさらに用い、
該第2置換プログラムにより該画像形成装置のプロセッサ又は他のプロセッサに対し、該機械語プログラムに含まれる、該通信サブルーチン以外のサブルーチンからのリターン命令を、語長が該リターン命令以下の、該第2ロギングプログラムへのジャンプ命令で置換させ、
該第2ロギングプログラムにより該画像形成装置の該プロセッサに対し、
該第2置換プログラムにより置換されたジャンプ命令を含むサブルーチンからの戻りアドレスを取得させ、
該戻りアドレスの直前に格納されているサブルーチンコール命令に関する情報を、第2ライトポインタに基づいて該記憶手段に格納させ、該第2ライトポインタの内容を、次に格納すべきアドレスに更新させ、
該プロセッサの命令ポインタを該戻りアドレスに変更させて、
該機器通信情報と該サブルーチンコール命令に関する情報との組み合わせの時系列情報を得ることを特徴とする請求項9に記載の画像形成装置用トレース機能付加方法。
Further using a second replacement program and a second logging program stored in the storage means,
A return instruction from a subroutine other than the communication subroutine included in the machine language program is sent to the processor of the image forming apparatus or another processor by the second replacement program, and the word length is less than or equal to the return instruction. 2 Replace with a jump instruction to the logging program,
With respect to the processor of the image forming apparatus by the second logging program,
Obtaining a return address from a subroutine including a jump instruction replaced by the second replacement program;
Information related to the subroutine call instruction stored immediately before the return address is stored in the storage means based on the second write pointer, and the content of the second write pointer is updated to the address to be stored next,
Change the instruction pointer of the processor to the return address;
10. The trace function adding method for an image forming apparatus according to claim 9, wherein time series information of a combination of the device communication information and information on the subroutine call instruction is obtained.
JP2006191317A 2006-07-12 2006-07-12 Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed Pending JP2008021067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006191317A JP2008021067A (en) 2006-07-12 2006-07-12 Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006191317A JP2008021067A (en) 2006-07-12 2006-07-12 Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed

Publications (1)

Publication Number Publication Date
JP2008021067A true JP2008021067A (en) 2008-01-31

Family

ID=39076956

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006191317A Pending JP2008021067A (en) 2006-07-12 2006-07-12 Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed

Country Status (1)

Country Link
JP (1) JP2008021067A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018135A (en) * 2009-07-07 2011-01-27 Ricoh Co Ltd Electronic device, information processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018135A (en) * 2009-07-07 2011-01-27 Ricoh Co Ltd Electronic device, information processing method, and program
US8713570B2 (en) 2009-07-07 2014-04-29 Ricoh Company, Ltd. Electronic device, information processing method, and storage medium

Similar Documents

Publication Publication Date Title
US8635633B2 (en) Image forming apparatus, function adding method, and computer-readable recording medium
JP4398538B2 (en) Data processing system for executing process in response to instructions in instruction set and instruction processing method thereof
US20080120604A1 (en) Methods, Systems, And Computer Program Products For Providing Program Runtime Data Validation
JP5268694B2 (en) License management system, image forming apparatus, and license management method
JP2014170515A (en) Device, information storage program, and information storage method
US20060036800A1 (en) Process management method and image forming apparatus
US20030140174A1 (en) Method for generating application for information processing apparatus and image forming apparatus
JP2008021067A (en) Tracing function adding method for image forming apparatus, its program, and image forming apparatus having this program installed
JP2008021066A (en) Tracing function adding method for image forming apparatus, its program, and image forming apparatus having program installed
JP6179200B2 (en) Information processing apparatus, device, information processing system, information processing method, and information processing program
CN101841620B (en) Information processing apparatus, information processing method
JP2009098872A (en) Source program analysis device, source program analysis method and computer program
US9892216B2 (en) Information processing apparatus, method, and program product for simulating processes with parent-child and sibling relationships
JP2006260404A (en) Image processor, and information setting method
JPH11110256A (en) Device and method for debugging program, and computer readable recording medium recorded with the method for the same
Lawall et al. Tarantula: Killing driver bugs before they hatch
JP2008140124A (en) Data processor
JP2006129362A (en) Digital composite machine
JP2011170576A (en) Method, program and apparatus for creation of installation package, and installation system
JP6222058B2 (en) Image forming apparatus
JP2013080386A (en) Information processing device and address management method
JP2011060236A (en) Information processor, development support program, and software integrated development environment
JP5144624B2 (en) Image forming apparatus
JP5337686B2 (en) Application program generation method and image forming apparatus
JP5216624B2 (en) Software development system and software development method