JPH01263723A - Simplified program patch system - Google Patents

Simplified program patch system

Info

Publication number
JPH01263723A
JPH01263723A JP63092779A JP9277988A JPH01263723A JP H01263723 A JPH01263723 A JP H01263723A JP 63092779 A JP63092779 A JP 63092779A JP 9277988 A JP9277988 A JP 9277988A JP H01263723 A JPH01263723 A JP H01263723A
Authority
JP
Japan
Prior art keywords
patch
instruction
program
address
additional
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
JP63092779A
Other languages
Japanese (ja)
Inventor
Akihiko Shimohata
下畑 明彦
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63092779A priority Critical patent/JPH01263723A/en
Publication of JPH01263723A publication Critical patent/JPH01263723A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To decrease the preparing quantity of an additional instruction by providing a means to shift a control from a patched program to an additional instruction to be patched by using a program interruption in a system way. CONSTITUTION:An additional instruction registering means 1, based on a patch executed address designated by an additional instruction 4, updates the pertinent instruction of a patched program 7 to an unjust instruction to generate the interruption at the time of execution. The pertinent address is registered to patch address control information 5, the patched program before updating is added to patch data 4 and registered to additional instruction information 6. When the patched program 7 is travelled and the interruption occurs by the unjust instruction, a patch discriminating means 2 compares an interruption address with a patch executed address and at the time of coincidence, is shifted to a patch data control shifting means 3. After the recovery at the time of generating the interruption of a register, etc., the control shifting is executed to the pertinent additional instruction and the pertinent patch is executed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置分野に利用される。[Detailed description of the invention] [Industrial application field] INDUSTRIAL APPLICABILITY The present invention is utilized in the field of information processing equipment.

本発明は、データ処理システムにおいて実行されるプロ
グラムにパッチによる命令の追加を行うパッチ方式に関
し、特に、プログラム割り込みを利用して当該追加命令
に制御移行するようにした簡易プログラムパンチ方式に
関する。
The present invention relates to a patch method for adding instructions to a program executed in a data processing system by patching, and particularly to a simple program punch method for transferring control to the added instruction using a program interrupt.

〔概要〕〔overview〕

本発明は、データ処理システムにおいて実行されるプロ
グラムにパッチによる命令の追加を行う手段を備えたパ
ッチ方式において、 パッチが施される被パッチプログラムから追加命令への
制御を移行する手段をプログラム割り込みを利用してシ
ステム的に設けることにより、追加命令の作成量を減少
させた簡易プログラムパッチ方式を実現したものである
The present invention provides a patch system that includes means for adding instructions to a program executed in a data processing system by means of a patch, and a method for transferring control from a patched program to which a patch is applied to an additional instruction using a program interrupt. By using this method and providing it systemically, a simple program patching method is realized that reduces the amount of additional instructions to be created.

〔従来の技術〕[Conventional technology]

従来、プログラムの特定箇所にパッチによる命令の追加
を行う場合は、追加命令の中に命令追加箇所の命令を追
加命令への制御移行命令に修正するデータと、当該命令
を設定することで破壊される被パッチプログラムの命令
を実行するためのデータを追加作成する必要があった。
Conventionally, when adding an instruction to a specific part of a program using a patch, the additional instruction includes data that modifies the instruction at the added instruction point to an instruction to transfer control to the additional instruction, and the data that is set in the added instruction makes it possible to prevent destruction. It was necessary to create additional data to execute the instructions of the patched program.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

前述した従来のパッチ方式は、たとえ1命令の追加パッ
チでも当該追加命令への制御移行のための命令作成のた
めに数ステップの追加命令となり、追加命令の量が多く
なる欠点があった。
The above-described conventional patching method has the disadvantage that even if one instruction is added, the number of additional instructions is increased because several steps are required to create an instruction for transferring control to the additional instruction.

本発明の目的は、前記の欠点を除去することにより、追
加命令には被パッチプログラムの命令追加箇所のアドレ
スと追加命令のみ作成すれば、必要なパッチが実現でき
るようにした、簡易プログラムパッチ方式を提供するこ
とにある。
An object of the present invention is to eliminate the above-mentioned drawbacks, and to provide a simple program patching method that enables necessary patches to be realized by creating only the address of the instruction addition location in the patched program and the additional instructions. Our goal is to provide the following.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、パッチが施される被パッチプログラムが格納
された被パッチプログラム部を備えたパッチ方式におい
て、パッチを行う追加命令のパッチアドレス管理情報を
格納するパッチアドレス情報部と、追加命令情報を格納
する追加命令情報部と、前記被パッチプログラムのパッ
チアドレスにより該当命令を割り込みを発生する不当命
令に更 ′新する手段、前記パッチアドレスを前記パッ
チアドレス管理情報に登録する手段および更新前の被パ
ッチプログラムの命令を追加した追加命令を前記追加命
令情報に登録する手段を有する追加命令登録手段と、前
記被パッチプログラムの走行時に前記不当命令により割
り込みが発生したときにその割り込みアドレスと前記パ
ッチアドレス管理情報とを比較する手段および比較の結
果一致したときに制御を次に移す手段とを有するパッチ
判別手段と、前記パッチ判別手段から制御を渡たされて
状態を割り込み発生時点に回復する手段および回復後前
記追加命令情報上の該当追加命令に制御を移行する手段
を有する追加命令制御移行手段とを含むことを特徴とす
る。
The present invention provides a patch method including a patch target program section storing a patch target program to be patched, and a patch address information section storing patch address management information of an additional instruction for patching, and a patch address information section storing additional instruction information. an additional instruction information section to store; a means for updating a corresponding instruction to an illegal instruction that generates an interrupt according to a patch address of the patched program; a means for registering the patch address in the patch address management information; and a target program before updating. additional instruction registration means having means for registering an additional instruction added with a patch program instruction in the additional instruction information; and an interrupt address and the patch address when an interrupt occurs due to the illegal instruction while the patched program is running. patch discriminating means having means for comparing with management information and means for transferring control to the next one when the comparison results in a match; means for restoring the state to the point at which the interrupt occurs when control is passed from the patch discriminating means; and and additional instruction control transfer means having means for transferring control to the corresponding additional instruction on the additional instruction information after recovery.

〔作用〕[Effect]

追加命令登録手段は、被パッチプログラムのパッチアド
レスにより該当命令を割り込みを発生する不当命令に更
新し、前記パッチアドレスをパッチアドレス情報に登録
し、更新前の被パッチプログラムの命令を追加した追加
命令を追加命令情報に登録する。そして、パッチ判別手
段は、前記被パッチプログラムが起動された走行時に、
前記不当命令により割り込みが発生したとき、その割り
込みアドレスと前記パッチアドレス情報に登録されたパ
ッチアドレスとを比較し、一致したとき制御を追加命令
制御移行手段に移行する。そして、追加命令制御移行手
段は、レジスタ等の状態を割り込み発生時点に回復し、
回復後前記追加命令情報上の該当追加命令に制御を移行
する。これにより所定のパッチが実行される。
The additional instruction registration means updates the corresponding instruction to an illegal instruction that generates an interrupt based on the patch address of the patched program, registers the patch address in the patch address information, and generates an additional instruction to which the instruction of the patched program before the update is added. Register in the additional instruction information. Then, the patch determining means is configured to detect, when the patched program is started and running,
When an interrupt occurs due to the illegal instruction, the interrupt address is compared with the patch address registered in the patch address information, and when they match, control is transferred to additional instruction control transfer means. Then, the additional instruction control transition means restores the state of registers etc. to the time of occurrence of the interrupt,
After recovery, control is transferred to the corresponding additional command on the additional command information. This causes the specified patch to be executed.

従って、追加命令を追加命令登録手段に入力するだけで
、後は自動的に各手段間の制御移行がなされパッチが実
行され、追加命令の作成量を減らすことが可能となる。
Therefore, by simply inputting an additional command into the additional command registration means, control is automatically transferred between each means and the patch is executed, making it possible to reduce the amount of additional commands to be created.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明する
Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例を示すブロック構成図、およ
び第2図は本発明を用いる情報処理システムの一例を示
すブロック構成図である。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of an information processing system using the present invention.

第1図によると、本実施例は、パッチが施される被パッ
チプログラム7が格納された被パッチプログラム部7a
を備えたパッチ方式において、パッチを行う追加命令4
のパッチアドレス管理情報5を格納するパッチアドレス
情報部5aと、追加命令情報6を格納する追加命令情報
部6aと、被パッチプログラム7のパッチアドレスによ
り該当命令を割り込みを発生する不当命令に更新する手
段、前記パッチアドレスをパッチアドレス管理情報5に
登録する手段および更新前の被パッチプログラム7の命
令を追加した追加命令を追加命令情報6に登録する手段
を有する追加命令登録手段1と、被パッチプログラム7
の走行時に前記不当命令により割り込みが発生したとき
、その割り込みアドレスとパッチアドレス管理情報5と
を比較する手段および比較の結果一致したときに制御を
次に移す手段とを有するパッチ判別手段2と、パッチ判
別手段2から制御を渡たされて状態を割り込み発生時点
に回復する手段および回復後追加命令情報6上の該当追
加命令に制御を移行する手段を有する追加命令制御移行
手段3とを含んでいる。
According to FIG. 1, in this embodiment, a patched program section 7a in which a patched program 7 to be patched is stored.
Additional instruction 4 for patching in a patch method with
A patch address information section 5a that stores patch address management information 5, an additional instruction information section 6a that stores additional instruction information 6, and a patch address of the patched program 7 to update the corresponding instruction to an illegal instruction that generates an interrupt. means for registering the patch address in the patch address management information 5; and means for registering in the additional instruction information 6 an additional instruction added with an instruction of the patched program 7 before update; Program 7
patch determining means 2 having means for comparing the interrupt address with patch address management information 5 when an interrupt occurs due to the illegal instruction during running; and means for transferring control to the next when the comparison results in a match; The additional instruction control transfer means 3 includes a means for restoring the state to the point in time when an interrupt occurs upon receiving control from the patch determination means 2, and a means for transferring control to the corresponding additional instruction on the additional instruction information 6 after recovery. There is.

なお、第1図において、8aは走行中の走行被パッチプ
ログラム8を格納する走行被パッチプログラム部である
In FIG. 1, reference numeral 8a represents a running patched program section that stores the running patched program 8 that is currently running.

第2図によると、本発明に用いる情報処理システム10
は、プログラムが走行する中央処理装置11と、主記憶
装着2と、データの人力装置3と、補助記憶装置14と
を含んでいる。
According to FIG. 2, the information processing system 10 used in the present invention
includes a central processing unit 11 on which programs run, a main memory 2, a data storage device 3, and an auxiliary memory 14.

そして、第1図における、追加命令登録手段1、パッチ
制御手段2および追加命令制御移行手段3は中央処理装
置11内に設けられ、パッチアドレス情報部5as追加
命令情報部6aおよび走行被パッチプログラム部8aは
主記憶装置12内に設けられ、被パッチプログラム部7
aは補助記憶装置14内に設けられる。
The additional instruction registration means 1, the patch control means 2, and the additional instruction control transfer means 3 shown in FIG. 8a is provided in the main storage device 12 and is connected to the patched program section 7.
a is provided in the auxiliary storage device 14.

本発明の特徴は、第1図において、追加命令登録手段1
と、パッチ判別手段2と、追加命令制御移行手段3と、
パッチアドレス管理情報5を格納したパッチアドレス情
報部5aと、追加命令情報6を格納する追加命令情報部
6aとを設けたことにある。
The feature of the present invention is that in FIG.
, patch determination means 2, additional command control transfer means 3,
This is because a patch address information section 5a storing patch address management information 5 and an additional command information section 6a storing additional command information 6 are provided.

次に、第3図に示す流れ図を参照して本実施例の動作に
ついて説明する。
Next, the operation of this embodiment will be explained with reference to the flowchart shown in FIG.

追加命令登録手段1は起動される(ステップS1)と、
追加命令4で指定されたパッチ施工アドレスをもとに、
被パッチプログラム7の該当命令を、実行時に割り込み
の発生する不当命令に更新する(ステップS2)。そし
て、当該アドレスをパッチアドレス管理情報5に登録(
ステップ33)し、パッチデータ4に不当命令に更新前
の被パッチプログラムの命令を追加して追加命令情報6
に登録する(ステップ34)。
When the additional command registration means 1 is activated (step S1),
Based on the patch construction address specified in additional instruction 4,
The relevant instruction in the patched program 7 is updated to an illegal instruction that causes an interrupt during execution (step S2). Then, register the address in patch address management information 5 (
Step 33) Add the instructions of the patched program before the update to the illegal instructions in the patch data 4, and add the instructions to the additional instruction information 6.
(Step 34).

その後、被パッチプログラム7が起動され主記憶装置上
の走行被パッチプログラム部8aに走行被パッチプログ
ラム8としてロード後走行する(ステップS5)と、前
記不当命令で割り込みが発生し、パッチ判別手段2に制
御移行する(ステップS6)。
Thereafter, when the patched program 7 is started and loaded into the running patched program section 8a on the main storage device and runs as the running patched program 8 (step S5), an interrupt occurs due to the above-mentioned illegal instruction, and the patch discriminating means 2 The control shifts to (step S6).

パッチ判別手段2は、当該割り込みアドレスとパッチア
ドレス管理情報5に登録されたバッチ施工アドレスをチ
エツクしくステップS7)、パッチ施工箇所ならばパッ
チデータ制御移行手段3に制御移行する(ステップ38
)。
The patch determination means 2 checks the interrupt address and the batch construction address registered in the patch address management information 5 (step S7), and if it is a patch construction location, transfers control to the patch data control transfer means 3 (step S7).
).

パッチデータ制御移行手段3は、レジスタ等を割り込み
発生時点に回復後、パッチデータ情報6上の該当追加命
令に制御移行し該当パッチが実行される(ステップS9
)。
After restoring the registers and the like to the point of occurrence of the interrupt, the patch data control transfer means 3 transfers control to the corresponding additional instruction on the patch data information 6, and the corresponding patch is executed (step S9).
).

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、被パッチプログラムか
ら追加命令への制御移行をプログラム割り込みを利用し
てシステム的に行わせることで、追加命令の作成量を減
らす効果がある。
As described above, the present invention has the effect of reducing the amount of additional instructions to be created by systematically transferring control from the patched program to the additional instructions using program interrupts.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示すブロック構成図。 第2図は本発明を用いる情報処理システムの一例を示す
ブロック構成図。 第3図は本実施例の動作を示す流れ図。 1・・・パッチデータ登録手段、2・・・パッチ判別手
段、3・・・パッチデータ制御移行手段、4・・・追加
命令、5・・・パッチアドレス管理情報、5a・・・パ
ッチアドレス管理情報部、6・・・パッチデータ情報、
6a・・・パッチデータ情報部、7・・・被パッチプロ
グラム、7a・・・被パッチプログラム部、訃・・走行
被パッチプログラム、8a・・・走行被パッチプログラ
ム部、10・・・情報処理システム、11・・・中央処
理装置、12・・・主記憶装置、13・・・人力装置、
14・・・補助記憶装置、81〜S9・・・ステップ。
FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 2 is a block diagram showing an example of an information processing system using the present invention. FIG. 3 is a flowchart showing the operation of this embodiment. DESCRIPTION OF SYMBOLS 1... Patch data registration means, 2... Patch discrimination means, 3... Patch data control transfer means, 4... Additional command, 5... Patch address management information, 5a... Patch address management Information department, 6...patch data information,
6a... patch data information section, 7... patched program, 7a... patched program section, death... running patched program, 8a... running patched program section, 10... information processing System, 11... Central processing unit, 12... Main storage device, 13... Human power device,
14...Auxiliary storage device, 81-S9...Step.

Claims (1)

【特許請求の範囲】 1、パッチが施される被パッチプログラム(7)が格納
された被パッチプログラム部(7a)を備えたパッチ方
式において、 パッチを行う追加命令のパッチアドレス管理情報(5)
を格納するパッチアドレス情報部(5a)と、 追加命令情報(6)を格納する追加命令情報部(6a)
と、 前記被パッチプログラムのパッチアドレスにより該当命
令を割り込みを発生する不当命令に更新する手段、前記
パッチアドレスを前記パッチアドレス管理情報に登録す
る手段および更新前の被パッチプログラムの命令を追加
した追加命令を前記追加命令情報に登録する手段を有す
る追加命令登録手段(1)と、 前記被パッチプログラムの走行時に前記不当命令により
割り込みが発生したときにその割り込みアドレスと前記
パッチアドレス管理情報とを比較する手段および比較の
結果一致したときに制御を次に移す手段を有するパッチ
判別手段(2)と、前記パッチ判別手段から制御を渡た
されて状態を割り込み発生時点に回復する手段および回
復後前記追加命令情報上の該当追加命令に制御を移行す
る手段を有する追加命令制御移行手段(3)とを含むこ
とを特徴とする簡易プログラムパッチ方式。
[Claims] 1. In a patch method including a patch target program section (7a) storing a patch target program (7) to be patched, patch address management information (5) of an additional instruction to perform patching.
a patch address information section (5a) that stores the information, and an additional instruction information section (6a) that stores the additional instruction information (6).
and means for updating the corresponding instruction to an illegal instruction that generates an interrupt based on the patch address of the patched program, means for registering the patch address in the patch address management information, and addition of an instruction of the patched program before updating. additional instruction registration means (1) having means for registering an instruction in the additional instruction information; and when an interrupt occurs due to the illegal instruction while the patched program is running, the interrupt address is compared with the patch address management information. patch discriminating means (2) having means for transferring the control to the next one when the result of comparison matches, means for restoring the state to the point in time when the interrupt occurs when control is passed from the patch discriminating means, and A simple program patch method characterized by comprising an additional instruction control transfer means (3) having means for transferring control to a corresponding additional instruction on additional instruction information.
JP63092779A 1988-04-14 1988-04-14 Simplified program patch system Pending JPH01263723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63092779A JPH01263723A (en) 1988-04-14 1988-04-14 Simplified program patch system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63092779A JPH01263723A (en) 1988-04-14 1988-04-14 Simplified program patch system

Publications (1)

Publication Number Publication Date
JPH01263723A true JPH01263723A (en) 1989-10-20

Family

ID=14063909

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63092779A Pending JPH01263723A (en) 1988-04-14 1988-04-14 Simplified program patch system

Country Status (1)

Country Link
JP (1) JPH01263723A (en)

Similar Documents

Publication Publication Date Title
JPH06242990A (en) Memory patching device
JP2001195241A (en) Computer
US6871173B1 (en) Method and apparatus for handling masked exceptions in an instruction interpreter
US6502176B1 (en) Computer system and methods for loading and modifying a control program without stopping the computer system using reserve areas
JPH01263723A (en) Simplified program patch system
JP7418494B2 (en) Update management system and update management method
KR100222620B1 (en) Multiprogram download method
JP2001010772A (en) Control device for elevator
JPS5835648A (en) Program execution controlling system
JPH0546378A (en) Correction processing method for program
KR100436003B1 (en) Method for loading a device driver, more specifically correlated to loading the device driver on a memory through a dos prompt after a computer system is completely booted up
JPH05216649A (en) Dynamic changing system for system program
JPS6318222B2 (en)
JPH0235529A (en) Check point dumping acquisition system
JPH01201728A (en) Program correcting system
JPS60126731A (en) Program control method
JPS60126732A (en) Realizing system of insert batch
JP2887488B2 (en) Multi-process processing equipment
JPH02114329A (en) Terminal software path execution system
JPH03166689A (en) Program checking method
JPH02231634A (en) Method for maintaining interchangeability of software
JPH06290033A (en) Method for managing updating of software
JPH01251142A (en) Program trace system
JPH0243642A (en) Multi-host system data control system
JPH0535499A (en) Data processing device and method