JPH01250143A - Program correction system - Google Patents

Program correction system

Info

Publication number
JPH01250143A
JPH01250143A JP63079484A JP7948488A JPH01250143A JP H01250143 A JPH01250143 A JP H01250143A JP 63079484 A JP63079484 A JP 63079484A JP 7948488 A JP7948488 A JP 7948488A JP H01250143 A JPH01250143 A JP H01250143A
Authority
JP
Japan
Prior art keywords
program
address
modification
correction
execution
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
JP63079484A
Other languages
Japanese (ja)
Inventor
Kazuaki Iwamoto
和昭 岩本
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 JP63079484A priority Critical patent/JPH01250143A/en
Publication of JPH01250143A publication Critical patent/JPH01250143A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To correct a program without interrupting the execution of another program by stopping temporarily the partial program execution for correction. CONSTITUTION:A correction process program means 3 reads the correction contents 6, a correcting destination address 7 and a correction executing address 8 out of a correction information stored means 5 and loads them into an area 9 of an address memory 1. Then the means 3 obtains the correction executing address contained in a program under execution from the address 8 and writes an exception production code 10 into this obtained executing address. Furthermore the means 3 obtains an address to be corrected from the address 7 to correct the program by the correction contents 11 and writes again an unwritten instruction held in the memory 1 into the address where the code 10 is already written to restart execution of the program at and after the rewritten address. Thus it is possible to correct a program without stopping the execution of another program.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラムの修正方式に関する。特にオペレ
ーティングシステムなどの大規模プログラムの修正にお
いて、プログラムの実行を継続しながら修正を実施する
プログラム修正方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program modification method. In particular, the present invention relates to a program modification method for modifying a large-scale program such as an operating system while continuing program execution.

〔概要〕〔overview〕

本発明は情報処理などのプログラムを修正するプログラ
ムの修正方式において、 プログラムの実行中に、−時的にプログラムの部分的な
実行を停止して修正を行い、修正後にその実行を再開で
きるようにすることにより、実行中のプログラムを中断
することなく、プログラムの修正を行うことができ、修
正したプログラムの実行の正当性を保証できるようにし
たものである。
The present invention provides a program modification method for modifying information processing programs, etc., in which, while the program is being executed, the execution of a part of the program is temporarily stopped to make modifications, and the execution can be resumed after modification. By doing so, it is possible to modify the program without interrupting the program being executed, and the correctness of execution of the modified program can be guaranteed.

〔従来の技術〕[Conventional technology]

従来、プログラムの修正を行うにはプログラムをメモリ
ヘロードする前か、あるいはロード中に修正処理を実施
していた。
Conventionally, in order to modify a program, modification processing was performed before or during loading of the program into memory.

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

上述した従来のプログラム修正方式では、プログラムが
実行状態にあるときはそのプログラムの修正ができず、
修正の対象となるプログラムが長時間実行状態のままで
あるようなプログラムの場合には長時間にわたってプロ
グラムの修正ができない欠点があった。
In the conventional program modification method described above, it is not possible to modify the program while it is in the running state.
If the program to be modified remains running for a long time, there is a drawback that the program cannot be modified for a long period of time.

また、プログラム実行中にプログラムの命令を修正する
場合、修正実施時点でプログラムの実行している命令の
位置と修正する命令の位置によっては修正の内容がプロ
グラムの正当な実行を保証することができない欠点があ
った。
Additionally, when modifying program instructions during program execution, the content of the modification may not guarantee correct execution of the program depending on the position of the instruction being executed in the program at the time of modification and the position of the modified instruction. There were drawbacks.

本発明はこのような欠点を除去するもので、実行中のプ
ログラムを止めることなくプログラムの修正ができ、修
正後のプログラムの実行の正当性を保証することができ
る方式を提供することを目的とする。
The purpose of the present invention is to eliminate such drawbacks, and to provide a method that allows a program to be modified without stopping the program being executed, and that can guarantee the correctness of execution of the modified program. do.

〔問題点を解決するための手段〕 本発明は、メモリに含まれたプログラムを修正するプロ
グラム修正方式において、上記メモリに接続され、上記
プログラムの修正内容、修正先アドレスおよび実際に修
正処理を実施する上記プログラム上の修正実施アドレス
を格納する修正情報格納手段を備え、上記メモリには、
上記修正情報格納手段を上記メモリにロードして実行中
の上記プログラムを修正し、修正のために一時停止され
ている上記プログラムの実行を再開する修正処理プログ
ラム手段と、特定の例外が発生したときに、例外が発生
した実行中の上記プログラムを一時停止し上記修正処理
プログラム手段を起動する例外処理手段とを含ごとを特
徴とする。
[Means for Solving the Problems] The present invention provides a program modification method for modifying a program contained in a memory. The memory includes a modification information storage means for storing a modification address on the program, and the memory includes:
correction processing program means for loading the correction information storage means into the memory to correct the running program and restarting execution of the program that has been paused for correction; and when a specific exception occurs; The present invention is characterized in that it includes exception handling means for temporarily stopping the running program in which an exception has occurred and activating the correction processing program means.

〔作用〕[Effect]

修正処理プログラム手段が修正情報格納手段から、修正
内容、修正先アドレス、修正実施アドレスを読みとりメ
モリ内のエリアにロードし、この修正実施アドレスから
実行中のプログラムの修正実施アドレスを求め、このア
ドレスの命令コードをメモリ内のエリアに格納し、代わ
りにこのアドレスに例外発生コードを書き込み待ちには
いる。
The modification processing program means reads the modification contents, the modification destination address, and the modification implementation address from the modification information storage means, loads them into an area in memory, obtains the modification implementation address of the program being executed from this modification implementation address, and reads the modification address of the program being executed. The instruction code is stored in an area in memory, and an exception generation code is written to this address instead.

また実行中のプログラムは、前記修正実施アドレスの書
き込まれた例外発生コードに制御がわたされると例外を
発生し、その結果例外処理手段が起動されてプログラム
自身待ちにはいり、例外処理手段は待ちになっていた修
正処理プログラムを起動し、起動された修正プログラム
はメモリ内の修正先アドレスから修正するアドレスを求
め、メモリ内の修正内容でプログラムを修正して以前例
外発生コードを書き込んだアドレスにメモリ内に保持し
た書き込み以前の命令を書きもどし、例外発生のため待
ちになっていたプログラムの実行を書きもどしたアドレ
スから再開する。
In addition, the program being executed generates an exception when control is passed to the exception generation code written at the modification execution address, and as a result, the exception handling means is activated and the program itself enters the waiting state, and the exception handling means waits for itself. The started modification program searches for the address to be modified from the modification destination address in memory, modifies the program with the modification contents in memory, and writes the memory to the address where the exception generation code was previously written. The instructions held in the memory before writing are written back, and the execution of the program that was waiting due to the occurrence of an exception is resumed from the address written back.

このようにして、実行中のプログラムを止めることなく
プログラムの修正を行うことができ、修正を行ったプロ
グラムの実行の正当性を保証することができる。
In this way, the program can be modified without stopping the program being executed, and the correctness of execution of the modified program can be guaranteed.

〔実施例〕〔Example〕

次に、本発明実施例を図面に基づいて説明する。 Next, embodiments of the present invention will be described based on the drawings.

第1図は本発明実施例の構成を示すブロック図、第2図
は本発明実施例のプログラム修正を行う手順を示す図で
ある。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 is a diagram showing a procedure for modifying a program in the embodiment of the present invention.

本発明実施例は、メモリlに接続され、プログラムの修
正内容6、修正先アドレス7および実際に修正処理を実
施するプログラム上の修正実施アドレス8を格納する修
正情報格納手段5を備え、メモリ1には、修正情報格納
手段5をメモリ1にロードして実行中のプログラムを修
正し、修正のために一時停止されているプログラムの実
行を再開する修正処理プログラム3と、特定の例外が発
生したときに、例外が発生した実行中のプログラムを一
時停止して修正処理プログラム手段3を起動する例外処
理手段4と、修正情報格納手段5からの修正内容6、修
正先アドレス7および修正実施アドレス8をロードする
エリア9と、例外発生コード10および修正内容11を
含むプログラム2とを備える。
The embodiment of the present invention includes a modification information storage means 5 which is connected to a memory 1 and stores modification contents 6 of the program, a modification destination address 7, and a modification execution address 8 on the program to which modification processing is actually performed. The correction processing program 3 loads the correction information storage means 5 into the memory 1, corrects the running program, and restarts the execution of the program that has been paused for correction. When an exception occurs, the exception handling means 4 suspends the running program and starts the modification processing program means 3, the modification contents 6 from the modification information storage means 5, the modification destination address 7, and the modification execution address 8. and a program 2 including an exception generation code 10 and modification contents 11.

実行中のプログラム2を修正処理プログラム3が例外処
理手段4を利用して動的に変更していく手順は第2図に
示すように、修正処理プログラム手段3が修正情報格納
手段5から、修正内容6、修正先アドレス7、修正実施
アドレス8を読み取りメモリl内のエリア9にロードし
くステップ21)、修正実施アドレス8から実行中のプ
ログラム中の修正実施アドレスを求め(ステップ22)
、このアドレスの命令コードをメモリl内のエリア9′
に格納しくステップ23)、代わりにこのアドレスに例
外発生コード10を書き込み(ステップ24)、待ちに
はいる(ステップ25)。
The modification processing program 3 dynamically changes the running program 2 using the exception handling means 4, as shown in FIG. Read the content 6, correction destination address 7, and correction implementation address 8 and load it into area 9 in memory l (step 21), and find the correction implementation address in the program being executed from the correction implementation address 8 (step 22).
, the instruction code at this address is stored in area 9' in memory l.
Instead, the exception generation code 10 is written to this address (step 24), and the process enters a wait state (step 25).

実行中のプログラムは、修正実施アドレス8の書き込ま
れた例外発生コード10に制御がわたされると例外を発
生しくステップ26)、その結果例外処理手段4が起動
され(ステップ27)、プログラム自身待ちにはいる(
ステップ28)。例外処理手段4は待ちになっていた修
正処理プログラム手段3を起動する(ステップ29)。
The program being executed generates an exception when control is passed to the exception generation code 10 written in the correction execution address 8 (step 26), and as a result, the exception handling means 4 is activated (step 27), and the program itself waits. Yes (
Step 28). The exception handling means 4 starts the waiting correction processing program means 3 (step 29).

起動された修正処理プログラム手段3は、メモリ1内に
ロードされた修正先アドレス7から修正するアドレスを
求め(ステップ30)、修正内容11によりプログラム
を修正しくステップ31)、以前例外発生コードlOを
書き込んだアドレスメモリ1内に保持した書き込み以前
の命令を書きもどしくステップ32)、例外発生のため
待ちになっていたプログラムの実行を書きもどしたアド
レスから再開する(ステップ33)。
The activated correction processing program means 3 obtains the address to be corrected from the correction destination address 7 loaded in the memory 1 (step 30), corrects the program according to the correction contents 11 (step 31), and executes the previous exception occurrence code lO. The instructions before writing held in the written address memory 1 are written back (step 32), and the execution of the program that was on standby due to the occurrence of an exception is resumed from the written address (step 33).

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

以上説明したように本発明によれば、実行中のプログラ
ムの修正を行う場合に、実行中のプログラムを止めるこ
となくプログラムの修正を行うことができ、また修正内
容と共に修正を実施するプログラム実行地点を修正実施
アドレスによって設定することができるために修正を実
施してもそのプログラムの実行の正当性を保証すること
ができる効果がある。
As explained above, according to the present invention, when modifying a program that is being executed, the program can be modified without stopping the program that is being executed, and the program execution point where the modification is performed as well as the content of the modification can be set by a modification execution address, which has the effect of guaranteeing the correctness of program execution even after modification.

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

第°1図は本発明実施例プログラムの修正方式の構成を
示すブロック図。 第2図は本発明実施例プログラム修正の手順を示す図。 l・・・メモリ、2・・・プログラム、3・・・修正処
理プログラム、4・・・例外処理手段、5・・・修正情
報格納手段、6・・・修正内容、7・・・修正先アドレ
ス、8・・・修正実施アドレス、9・・・エリア、10
・・・例外発生コード、11・・・修正内容。
FIG. 1 is a block diagram showing the configuration of a modification method for a program according to an embodiment of the present invention. FIG. 2 is a diagram showing a procedure for modifying a program according to an embodiment of the present invention. l...Memory, 2...Program, 3...Modification processing program, 4...Exception handling means, 5...Modification information storage means, 6...Modification content, 7...Modification destination Address, 8... Correction implementation address, 9... Area, 10
...Exception code, 11...Modification details.

Claims (1)

【特許請求の範囲】 1、メモリ(1)に含まれたプログラム(2)を修正す
るプログラム修正方式において、上記メモリに接続され
、上記プログラムの修正内容、修正先アドレスおよび実
際に修正処理を実施する上記プログラム上の修正実施ア
ドレスを格納する修正情報格納手段(5)を備え、 上記メモリには、 上記修正情報格納手段を上記メモリにロードして実行中
の上記プログラムを修正し、修正のために一時停止され
ている上記プログラムの実行を再開する修正処理プログ
ラム手段(3)と、 特定の例外が発生したときに、例外が発生した実行中の
上記プログラムを一時停止し上記修正処理プログラム手
段を起動する例外処理手段(4)と を含むことを特徴とするプログラムの修正方式。
[Scope of Claims] 1. In a program modification method for modifying a program (2) contained in a memory (1), a program connected to the memory, including modification contents of the program, a modification destination address, and actually performing modification processing. A correction information storage means (5) for storing a correction execution address on the program to be corrected; correction processing program means (3) for restarting the execution of the above-mentioned program which has been temporarily stopped; A method for modifying a program, comprising: an exception handling means (4) for activating.
JP63079484A 1988-03-30 1988-03-30 Program correction system Pending JPH01250143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63079484A JPH01250143A (en) 1988-03-30 1988-03-30 Program correction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63079484A JPH01250143A (en) 1988-03-30 1988-03-30 Program correction system

Publications (1)

Publication Number Publication Date
JPH01250143A true JPH01250143A (en) 1989-10-05

Family

ID=13691168

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63079484A Pending JPH01250143A (en) 1988-03-30 1988-03-30 Program correction system

Country Status (1)

Country Link
JP (1) JPH01250143A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5983018A (en) * 1998-01-09 1999-11-09 Mitsubishi Denki Kabushiki Kaisha Debug interrupt-handling microcomputer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5983018A (en) * 1998-01-09 1999-11-09 Mitsubishi Denki Kabushiki Kaisha Debug interrupt-handling microcomputer

Similar Documents

Publication Publication Date Title
JPH01250143A (en) Program correction system
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JPH01217635A (en) Register saving system
JPH0261724A (en) Program correcting system
JPH0319972B2 (en)
JPH07160352A (en) Program execution system
JP3029355B2 (en) Single-step instruction execution method
JPS60117337A (en) Program changing method
JPH01123337A (en) Interactive program debugging system
JPH01191938A (en) Information processor
JPH05189227A (en) Microcomputer incorporating one time programmable rom
JPH01201728A (en) Program correcting system
JPH04167146A (en) Address tracing system for information processor
JPH0279129A (en) Check point restarting system
JPH07210403A (en) Task switching system
JPH0844570A (en) System and method for program execution
JPH0789326B2 (en) Host computer
JPH07152541A (en) Switching method for system non-interruption program
JPS5968067A (en) Specifying system for number of run steps
JPS63228341A (en) Program syntax checking system
JPS61255440A (en) Program interruption control system
JPS62219126A (en) Program control system
JPH01185729A (en) Overlay structure program execution system
JPH0363827A (en) Register saving system
JPS638936A (en) Interrupt processor