JPH02284236A - Program debugging processor - Google Patents

Program debugging processor

Info

Publication number
JPH02284236A
JPH02284236A JP1106261A JP10626189A JPH02284236A JP H02284236 A JPH02284236 A JP H02284236A JP 1106261 A JP1106261 A JP 1106261A JP 10626189 A JP10626189 A JP 10626189A JP H02284236 A JPH02284236 A JP H02284236A
Authority
JP
Japan
Prior art keywords
instruction
program
processing
debugger
debugged
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
JP1106261A
Other languages
Japanese (ja)
Inventor
Susumu Umatani
馬谷 晋
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 JP1106261A priority Critical patent/JPH02284236A/en
Publication of JPH02284236A publication Critical patent/JPH02284236A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily execute next debug processing by setting a break point in a next instruction by dummy-executing the instruction having set the break point in a debug processing program, and afterward, returning control to the former program to be debugged. CONSTITUTION:A debugger changes the instruction A into the debugger branch instruction 1-1 of the program 1a to be debugged by break point processing 5, and branches its execution to debugger processing 3. In the debugger processing 3, at first, the debug processing is executed, and after that, it is discriminated whether the execution of the next instruction is the instruction B or the instruction C by the dummy-execution of the instruction A. After that, the debugger branch instruction 1-1 by which the break point was set is returned into the former instruction A. The next instruction B or C is rewritten into the debugger branch instruction 1-2, and a program counter is set at the address (a) of the instruction A, and its control is returned to the program 1a to be debugged. Thus, since the break point can be set after deciding the next instruction, the debug processing can be easily repeated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンピユータのプログラムのデバッグ処理に
利用する。本発明は、後のデバッグ処理を容易にできる
ようにするものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention is used for debugging a computer program. The present invention facilitates subsequent debugging processing.

〔概要〕〔overview〕

本発明は、被デバッグプログラム内にブレークポイント
を設定してデバッグ処理を行うプログラムデバッグ処理
装置において、 デバッグ処理プログラム内でブレークポイントを設定し
た命令をダミー実行して次の命令にブレークポイントを
設定した後にもとの被デバッグプログラムに制御を戻す
ことにより、 後のデバッグ処理を容易に行えるようにするものである
The present invention provides a program debug processing device that performs debugging by setting breakpoints in a program to be debugged. By returning control to the original program to be debugged, subsequent debugging processing can be easily performed.

〔従来の技術〕[Conventional technology]

従来、この種のプログラムデバッグ処理は、第2図に示
すように処理されるものであった。
Conventionally, this type of program debugging processing has been performed as shown in FIG.

すなわち、被デパックプログラム1にデバッグ処理のた
めにブレークポイントを設定してデバッグ処理を行う場
合には、被デバッグプログラム1内の命令Aの場所にデ
バッガ分岐命令1−1を挿入してブレークポイントが設
定されたブレークポイント設定被デバッグプログラム1
aを作成する。
That is, when debugging is performed by setting a breakpoint in depacked program 1 for debugging, debugger branch instruction 1-1 is inserted at the location of instruction A in debugged program 1 and the breakpoint is set. Debug program 1 with breakpoints set
Create a.

そしてこのブレークポイントが設定された被デバッグプ
ログラム1a内で、命令Aが実行された場合にデバッグ
処理プログラムであるデバッガ2に分岐する。デバッガ
2では、デバッグ処理を行った後、デバッガ分岐命令1
−1をもとの命令Aに戻し、プログラムカウンタに命令
Aの存在するa番地を設定した後、被デバッグプログラ
ム1aに制御を戻す方式で行われていた。
When instruction A is executed in the debugged program 1a in which this breakpoint has been set, the program branches to the debugger 2, which is a debug processing program. In debugger 2, after debugging, debugger branch instruction 1
-1 is returned to the original instruction A, address a where instruction A exists is set in the program counter, and then control is returned to the program to be debugged 1a.

〔発明が解決しようとする問題点〕 上述した方式でのデバッグ処理では、−度命令Aの場所
において、デバッグ処理を行うことができる。しかし、
何度も命令Aのところで、デバッグ処理を行いたいとき
などには、デバッグ処理を行う利用者が命令Aが実行さ
れた後に、次の実行命令がどこにあるかを判断して、そ
の番地にブレークポイントを設定し、被デバッグプログ
ラムの実行を中断させて、デバッグ処理を行うために、
命令Aの場所に再度デバッガ分岐命令1−1を埋め込む
処理が必要である。このため、いちいちデバッグを行う
命令Aとその命令Aのある番地とを利用者が確認して行
わなければならず、利用者にはデバッグ処理のブレーク
ポイント設定が煩わしい問題があった。
[Problems to be Solved by the Invention] In the debugging process using the method described above, the debugging process can be performed at the location of the -degree instruction A. but,
When a user wants to perform debugging at instruction A many times, the user who performs the debugging determines where the next execution instruction is after instruction A has been executed, and sets a break at that address. To set a point, suspend execution of the debugged program, and perform debugging,
It is necessary to embed debugger branch instruction 1-1 again at the location of instruction A. For this reason, the user has to check the instruction A to be debugged and the address where the instruction A is located, and the user has a problem in that setting breakpoints for debugging is troublesome.

本発明は、利用者がブレークポイント設定だめの命令と
その番地をいちいち確認することなく、デバッグ処理を
容易に行うことができるプログラムデバッグ処理装置を
提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a program debugging processing device that allows a user to easily perform debugging processing without having to check each instruction and its address for which a breakpoint should be set.

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

本発明は、被デバッグプログラム内の任意の第一の命令
をデバッグ処理を行うデバッグ処理手段にその実行を移
す第一の分岐命令に変更する手段を備え、上記デバッグ
処理手段は上記第一の命令の実行前にメモリおよびレジ
スタの内容を表示または変更するデバッグ処理を行った
後制御を上記被デバッグプログラムに戻す手段を含むプ
ログラムデバッグ処理装置において、 上記デバッグ処理手段は、デバッグ処理を行った後上記
第一の命令をダミー実行する手段と、上記第一の分岐命
令を元の第一の命令に戻す手段と、次に実行する第二の
命令に第二の分岐命令を埋め込む手段と、プログラムカ
ウンタに上記第一の命令の存在する番地をセットする手
段と、被デバッグプログラムに制御を戻す手段とを含む
ことを特徴とする。
The present invention includes means for changing an arbitrary first instruction in a program to be debugged into a first branch instruction that transfers execution to a debug processing means that performs debug processing, and the debug processing means changes the first instruction from the first instruction. In a program debugging processing device including means for returning control to the debugged program after performing debugging processing to display or change the contents of memory and registers before execution of means for dummy executing a first instruction; means for returning the first branch instruction to the original first instruction; means for embedding the second branch instruction in a second instruction to be executed next; The program is characterized in that it includes means for setting an address at which the first instruction exists, and means for returning control to the program to be debugged.

〔作用〕[Effect]

第1のデバッガ分岐命令で分岐されたデバッガでの処理
において、第1の分岐命令が設定された命令をダミー実
行して次の命令が何かを判別して、デバッガ分岐命令を
もとの命令に戻したのち、次の命令を第2の分岐命令に
設定する。そしてプログラムカウンタにもとの命令の番
地を入れて、被デバッグプログラムにその制御を移す。
In processing in a debugger that is branched by the first debugger branch instruction, the instruction to which the first branch instruction is set is dummy executed to determine what the next instruction is, and the debugger branch instruction is returned to the original instruction. After returning to , the next instruction is set as the second branch instruction. Then, the address of the original instruction is entered in the program counter, and control is transferred to the program to be debugged.

被デバッグプログラムは次の命令のところで、第2の分
岐命令でデバッガでのデバッグ処理に分岐して、デバッ
グ処理を行った後、上記と同様な分岐命令の設定処理を
行った後被デバッグプログラムの実行に制御を移す。
At the next instruction, the debugged program branches to debug processing in the debugger using the second branch instruction, and after performing the debugging process, the same branch instruction setting process as above is performed, and then the debugged program is Transfer control to execution.

このため、次の命令を判断してブレークポイントが設定
できるため、デバッグ処理の繰り返しを容易に行うこと
ができる。
Therefore, breakpoints can be set by determining the next instruction, making it easy to repeat the debugging process.

〔実施例〕〔Example〕

以下、図面を参照して本発明の詳細な説明する。 Hereinafter, the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例の構成を説明する図である。FIG. 1 is a diagram illustrating the configuration of an embodiment of the present invention.

被デバッグプログラム1はその中に命令ASB。The program to be debugged 1 has an instruction ASB in it.

Cを持っており、命令Aから命令Cに戻るループを構成
することができる。符号5は、デバッガによるブレーク
ポイント処理を示すものであり、デバッグ処理のために
ブレークポイントを被デバッグプログラム1の命令Aに
対して設定したいという要求があったときに行われる処
理である。符号1aはブレークポイントが設定された被
デバッグプログラム1を示すものであり、ブレークポイ
ント処理5により、命令Aの部分(a番地)にデバッグ
処理を行うデバッガへのデバッガ分岐命令1−1が設定
された状態を示している。符号3および4はデバッガで
の処理動作を示すものであり、このデバッガでのデバッ
ガ処理3に本発明の特徴がある。
C, and can construct a loop returning from instruction A to instruction C. Reference numeral 5 indicates breakpoint processing by the debugger, and is processing performed when there is a request to set a breakpoint for instruction A of the program to be debugged 1 for debugging. Reference numeral 1a indicates a debugged program 1 in which a breakpoint has been set, and by breakpoint processing 5, a debugger branch instruction 1-1 to the debugger that performs debugging processing is set in the instruction A portion (address a). It shows the condition. Reference numerals 3 and 4 indicate processing operations in the debugger, and debugger processing 3 in the debugger is a feature of the present invention.

すなわち、本発明は、デバッグ処理3において、デバッ
グ処理を行った後命令Aをダミー実行する手段と、分岐
命令1−1を元の命令Aに戻す手段と、次に実行する命
令B(命令Cに戻るときは命令C)に第2の分岐命令1
−2を埋め込む手段と、プログラムカウンタに第1の命
令である命令Aの存在する番地をセットする手段と、被
デバッグプログラム1aに制御を戻す手段とを含んでい
ることを特徴としている。
That is, in the debug processing 3, the present invention includes means for dummy executing instruction A after debug processing, means for returning branch instruction 1-1 to the original instruction A, and means for executing instruction B (instruction C) to be executed next. When returning to instruction C), the second branch instruction 1 is sent to instruction C).
-2, means for setting the address of the first instruction A in the program counter, and means for returning control to the program to be debugged 1a.

次に本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

まず、デバッグ処理を行おうとする利用者は、被デバッ
グプログラム1の命令Aのところにブレークポイントを
設定してデバッグ処理を行うことをデバッガに指示する
First, a user who wishes to perform debug processing instructs the debugger to set a breakpoint at instruction A of the program to be debugged 1 and to perform debug processing.

デバッガは、ブレークポイント処理5により、命令Aを
デバッガにその制御を移すデバッガ分岐命令1−1に変
更する。その状態が第1図のブレークポイントが設定さ
れた被デバッグプログラム1aに示される。
Through breakpoint processing 5, the debugger changes instruction A to a debugger branch instruction 1-1 that transfers control to the debugger. This state is shown in the debugged program 1a in which breakpoints are set in FIG.

利用者が被デバッグプログラム1aを実行して命令Aの
ある箇所を実行すると、デバッガ分岐命令1−1により
、その実行がデバッガ処理3に分岐する。
When the user executes the program to be debugged 1a and executes a certain part of instruction A, the execution branches to debugger processing 3 by debugger branch instruction 1-1.

デバッガ処理3ではまずデバッグ処理を行う。In debugger processing 3, debugging processing is first performed.

その後、命令Aのダミー実行を行う。このダミー実行は
、被デバッグプログラム1a内の一切のメモリ内容およ
びレジスタの変更をさせない状態で仮に実行させるもの
である。これは、次に実行されるべき命令を判別するた
めである。すなわち、命令Aのダミー実行により、次の
命令の実行が命令Bであるか、命令Cであるかを判別す
る。
Thereafter, dummy execution of instruction A is performed. This dummy execution is performed temporarily without changing any memory contents or registers in the program to be debugged 1a. This is to determine the next instruction to be executed. That is, by dummy execution of instruction A, it is determined whether the next instruction to be executed is instruction B or instruction C.

このダミー実行の後、ブレークポイントが設定された被
デバッグプログラム1a内のデバッガ分岐命令1−1を
もとの命令Aに戻す。その後、ダミー実行の次の命令B
(命令Aが分岐命令でかつ被デバッグプログラム1がル
ープしている場合には命令C)をデバッガ分岐命令1−
2に書換えプログラムカウンタを命令Aの番地a番地に
設定しした後に、被デバッグプログラム1aにその制御
を戻す。
After this dummy execution, the debugger branch instruction 1-1 in the debugged program 1a in which the breakpoint was set is returned to the original instruction A. After that, the next instruction B for dummy execution
(If instruction A is a branch instruction and debugged program 1 is in a loop, instruction C) is transferred to debugger branch instruction 1-
After setting the rewrite program counter to address a of instruction A in step 2, control is returned to the program to be debugged 1a.

被デバッグプログラム1aは命令Aを実行した後命令B
(分岐されて戻るときは命令C)を実行する。このとき
、命令B(または命令C)は、上述のようにデバッガ分
岐命令1−2に変更されているので、再度デバッガ処理
4にその制御が移る。
The debugged program 1a executes instruction A and then executes instruction B.
(Instruction C is executed when branching and returning). At this time, since the instruction B (or instruction C) has been changed to the debugger branch instruction 1-2 as described above, the control is transferred to the debugger processing 4 again.

このデバッガ処理4では、再度命令Aの箇所にデバッガ
分岐命令1−1を埋め込み、デバッガ分岐命令1−2を
命令B(または命令C)に戻し、プログラムカウンタを
b番地(またはC番地)に設定して被デバッグプログラ
ム1の実行に戻る。
In this debugger processing 4, debugger branch instruction 1-1 is embedded again at instruction A, debugger branch instruction 1-2 is returned to instruction B (or instruction C), and the program counter is set to address b (or address C). Then, the program returns to execution of the program to be debugged 1.

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

以上説明したように、本発明では、被デバッグプログラ
ムのブレークポイントが設定されるごとにデバッグ処理
を行うことができるため、利用者はいちいち命令の種類
と番地を確認する必要はないため、デバッグ処理の煩わ
しさがなくなる効果がある。
As explained above, in the present invention, the debugging process can be performed every time a breakpoint is set in the debugged program, so the user does not need to check the type and address of the instruction each time. It has the effect of eliminating the hassle of

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

第1図は本発明一実施例を説明する図。 第2図は従来例を説明する図。 1.1a・・・被デバッグプログラム、3.4・・・デ
バッガ処理、5・・・ブレークポイント処理。
FIG. 1 is a diagram explaining one embodiment of the present invention. FIG. 2 is a diagram explaining a conventional example. 1.1a... Program to be debugged, 3.4... Debugger processing, 5... Breakpoint processing.

Claims (1)

【特許請求の範囲】 1、被デバッグプログラム内の任意の第一の命令をデバ
ッグ処理を行うデバッグ処理手段にその実行を移す第一
の分岐命令に変更する手段を備え、上記デバッグ処理手
段は上記第一の命令の実行前にメモリおよびレジスタの
内容を表示または変更するデバッグ処理を行った後制御
を上記被デバッグプログラムに戻す手段を含む プログラムデバッグ処理装置において、 上記デバッグ処理手段は、 デバッグ処理を行った後上記第一の命令をダミー実行す
る手段と、 上記第一の分岐命令を元の第一の命令に戻す手段と、 次に実行する第二の命令に第二の分岐命令を埋め込む手
段と、 プログラムカウンタに上記第一の命令の存在する番地を
セットする手段と、 被デバッグプログラムに制御を戻す手段と を含むことを特徴とするプログラムデバッグ処理装置。
[Scope of Claims] 1. Means for changing an arbitrary first instruction in a program to be debugged into a first branch instruction that transfers execution to a debug processing means that performs debug processing, the debug processing means In a program debugging processing device including means for returning control to the debugged program after performing debugging processing for displaying or changing contents of memory and registers before execution of a first instruction, the debugging processing means performs debugging processing. means for dummy executing the first instruction after execution; means for returning the first branch instruction to the original first instruction; and means for embedding the second branch instruction in the second instruction to be executed next. A program debug processing device comprising: means for setting an address at which the first instruction exists in a program counter; and means for returning control to the program to be debugged.
JP1106261A 1989-04-26 1989-04-26 Program debugging processor Pending JPH02284236A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1106261A JPH02284236A (en) 1989-04-26 1989-04-26 Program debugging processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1106261A JPH02284236A (en) 1989-04-26 1989-04-26 Program debugging processor

Publications (1)

Publication Number Publication Date
JPH02284236A true JPH02284236A (en) 1990-11-21

Family

ID=14429156

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1106261A Pending JPH02284236A (en) 1989-04-26 1989-04-26 Program debugging processor

Country Status (1)

Country Link
JP (1) JPH02284236A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263340A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Execution monitoring point decreasing system
US5963741A (en) * 1997-01-29 1999-10-05 Nec Corporation Information processor which rewrites instructions in program to dynamically change program structure and method therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04263340A (en) * 1991-02-18 1992-09-18 Fujitsu Ltd Execution monitoring point decreasing system
US5963741A (en) * 1997-01-29 1999-10-05 Nec Corporation Information processor which rewrites instructions in program to dynamically change program structure and method therefor

Similar Documents

Publication Publication Date Title
US6718294B1 (en) System and method for synchronized control of system simulators with multiple processor cores
US5630049A (en) Method and apparatus for testing software on a computer network
KR970011212B1 (en) Data processor with developement support features
JP2005317023A (en) Breakpoint logic unit, debug logic, and breakpoint method for data processing apparatus
JP2005070949A (en) Program processing apparatus
JPH0728670A (en) Information processor
JP2003015906A (en) Remote debugging method and device
US6425122B1 (en) Single stepping system and method for tightly coupled processors
JPH02284236A (en) Program debugging processor
JP3085730B2 (en) Parallel simulation method for complex CPU system
JP4149047B2 (en) Simulator
JPH02181236A (en) Debug device
JPH02135545A (en) Execution control processing system for debugger
JPH0239332A (en) Software break system
JPH01274253A (en) Software break system
JPH02277146A (en) Program debugging system
JPS6214240A (en) Program inspecting system
JPS61138361A (en) Parallel processing system
JPH06348543A (en) Connection method with I / O simulator
KR100658485B1 (en) Microprocessor Development System
JPS6198455A (en) Device simulation system
JPS63229533A (en) Multi-window/multi-task system
JPH02120940A (en) Debugging supporting circuit
JPH0264827A (en) Data processor
JPS59202548A (en) Debugging device