JPH04296943A - Debugging system for function type language - Google Patents

Debugging system for function type language

Info

Publication number
JPH04296943A
JPH04296943A JP3044988A JP4498891A JPH04296943A JP H04296943 A JPH04296943 A JP H04296943A JP 3044988 A JP3044988 A JP 3044988A JP 4498891 A JP4498891 A JP 4498891A JP H04296943 A JPH04296943 A JP H04296943A
Authority
JP
Japan
Prior art keywords
break
breakpoint
execution
break point
address
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
JP3044988A
Other languages
Japanese (ja)
Inventor
Takehiro Ogoshi
丈弘 大越
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3044988A priority Critical patent/JPH04296943A/en
Publication of JPH04296943A publication Critical patent/JPH04296943A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To omit the resetting operation of a break point in a second debugging job despite the occurrence of such an event where the correspondence between the logical and physical addresses is changed by canceling and resetting automatically the break point through a break processing part if a program under execution is broken. CONSTITUTION:A break processing part is provided with a break point setting means, a means which offer the internal information on a register, a stack, etc., and a means which cancels and reset automatically the break point. A user sets a break point (23) with the break point setting means in a debugging state. When a debugged program is carried out (24), a break is produced (25) at the break point and a debugger is started (1) for execution of the break processing. Thus it is possible to deal with such an event where the correspondence between the logical and physical addresses is changed and to perform the operation that is so far inhibited with the input received from a console.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明はプログラムデバッグ方
式、特に関数型言語でプログラムされたソフトウェアの
プログラムデバッグ方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program debugging method, and more particularly to a program debugging method for software programmed in a functional language.

【0002】0002

【従来の技術】図6〜図9は例えば特開平2−1355
45号公報に示された従来のプログラムデバッグ方式の
実施例図であり、図6において、27はデバッガ、28
は命令実行部、29は被デバッグプログラム、30は割
込み処理プログラム、31はブレークポイント記憶領域
、32は割込みベクタテーブル、33は割込みベクタ保
存テーブル、34はトラップフラグ、35はスタックメ
モリ、36は割込み解析部、37はシングルステップ割
込み処理部である。図7において、38はコンソール入
力待ち状態、39はコマンド入力、40はブレークポイ
ントの格納、41は割込みベクタテーブルの複写、42
はトラップフラグをセットし実行開始、43は1つの命
令の実行、44は一般割込み発生である。図8において
、45はデバッガの割込み解析部の起動、46は割込み
処理プログラムの選択、47はトラップフラグを再設定
し割込み処理プログラム実行、48は1つの命令の実行
、49はシングルステップ割込み発生、図9において、
50はシングルステップ割込み処理部の起動、51はブ
レークポイントであるかの判定、52はブレークポイン
トでないと判定されたときの処理、53はブレークポイ
ントであると判定されたときの処理である。
[Prior Art] FIGS. 6 to 9 are, for example, Japanese Patent Application Laid-Open No. 2-1355.
6 is an example diagram of the conventional program debugging method shown in Publication No. 45, and in FIG. 6, 27 is a debugger, 28
is an instruction execution unit, 29 is a program to be debugged, 30 is an interrupt processing program, 31 is a breakpoint storage area, 32 is an interrupt vector table, 33 is an interrupt vector storage table, 34 is a trap flag, 35 is a stack memory, and 36 is an interrupt The analysis section 37 is a single step interrupt processing section. In FIG. 7, 38 is a console input waiting state, 39 is a command input, 40 is a break point storage, 41 is a copy of the interrupt vector table, 42
43 sets a trap flag and starts execution, 43 executes one instruction, and 44 generates a general interrupt. In FIG. 8, 45 starts the interrupt analysis section of the debugger, 46 selects an interrupt processing program, 47 resets the trap flag and executes the interrupt processing program, 48 executes one instruction, 49 generates a single step interrupt, In FIG. 9,
Reference numeral 50 indicates activation of the single-step interrupt processing section, reference numeral 51 indicates a determination as to whether a breakpoint exists, reference numeral 52 indicates a process performed when it is determined that a breakpoint is not present, and reference numeral 53 indicates a process performed when a breakpoint is determined.

【0003】次に動作について説明する。デバッガ27
はコンソールからの入力待ち状態38にある。利用者が
コンソールから、実行制御コマンド及びそのパラメタ(
実行開始アドレス、ブレークポイント)の入力39をす
る。ここで、実行開始アドレスはプログラム29内に、
ブレークポイントは割込み処理プログラム30内に存在
するものとする。デバッガ27はブレークポイントをブ
レークポイント記憶領域31に格納40をし、割込みベ
クタテーブル32を割込みベクタ保存テーブル33に複
写41をする。そして、トラップフラグ34をセットし
、プログラム29に実行を移して実行開始アドレスから
実行を開始42をする。命令実行部28にいて、プログ
ラム29の1つの命令が実行され、その際トラップフラ
グ34がセットされているので、一般割込み44が発生
する。
Next, the operation will be explained. Debugger 27
is in a state 38 waiting for input from the console. The user can input the execution control command and its parameters (
Input 39 the execution start address and breakpoint). Here, the execution start address is in the program 29,
It is assumed that a breakpoint exists within the interrupt processing program 30. The debugger 27 stores 40 the breakpoint in the breakpoint storage area 31 and copies 41 the interrupt vector table 32 to the interrupt vector storage table 33. Then, the trap flag 34 is set, execution is shifted to the program 29, and execution is started 42 from the execution start address. In the instruction execution unit 28, one instruction of the program 29 is executed, and since the trap flag 34 is set at that time, a general interrupt 44 is generated.

【0004】一般割込み44が発生すると、トラップフ
ラグ34はリセットされ、実行アドレスがスタックメモ
リ29に退避され、割込み解析部30の起動42が行わ
れる。割込み解析部30は、割込みのタイプ(割込み発
生原因)を解析し、割込みタイプに対応した割込み処理
プログラム30のエントリアドレスを求める46を行い
、トラップフラグ28を再びセットし、割込み処理プロ
グラム30に実行を移す47を行う。命令実行部33に
おいて、割込み処理プログラム30の1つの命令の実行
45が行われ、その際トラップフラグ34がセットされ
ているので、1つの命令を実行する毎にシングルステッ
プ割込み処理49が発生する。
When a general interrupt 44 occurs, the trap flag 34 is reset, the execution address is saved in the stack memory 29, and the interrupt analysis section 30 is activated 42. The interrupt analysis unit 30 analyzes the type of interrupt (cause of interrupt occurrence), performs step 46 to obtain the entry address of the interrupt processing program 30 corresponding to the interrupt type, sets the trap flag 28 again, and causes the interrupt processing program 30 to execute. Perform step 47 to move. In the instruction execution unit 33, one instruction of the interrupt processing program 30 is executed 45, and since the trap flag 34 is set at this time, a single step interrupt processing 49 occurs every time one instruction is executed.

【0005】シングルステップ割込み処理49が発生す
ると、トラップフラグ28はリセットされ、実行アドレ
ススタックメモリ35に退避され、シングルステップ割
込み処理部37の起動50がなされる。シングルステッ
プ割込み処理部37は、スタックメモリ35に最新に退
避された実行アドレスとブレークポイント記憶領域31
のアドレスとについて、一致/不一致をチェック51を
行う。両者が一致した場合、シングルステップ割込み処
理部37は、ブレークポイントまで実行したものと判断
して、実行を中止し、指定されたアドレスで実行を中止
した旨をコンソールに表示しコンソール入力待ち53と
なる。両者が一致しない場合、シングルステップ割込み
処理部37は、まだブレークポイントまで実行していな
いものと判断して、実行を継続するためにトラップフラ
グ34を再びセット52を行い、スタックメモリ35に
最新に退避された実行アドレスに実行を戻して割込み処
理プログラム30を実行する。
When the single step interrupt processing 49 occurs, the trap flag 28 is reset and saved in the execution address stack memory 35, and the single step interrupt processing section 37 is activated 50. The single-step interrupt processing unit 37 stores the latest execution address saved in the stack memory 35 and the breakpoint storage area 31.
A match/mismatch check 51 is performed with respect to the address. If the two match, the single-step interrupt processing unit 37 determines that the execution has reached the breakpoint, stops execution, displays on the console that execution has been stopped at the specified address, and waits for console input 53. Become. If the two do not match, the single-step interrupt processing unit 37 determines that execution has not yet reached the breakpoint, sets the trap flag 34 again 52 to continue execution, and stores the latest information in the stack memory 35. Execution is returned to the saved execution address and the interrupt processing program 30 is executed.

【0006】[0006]

【発明が解決しようとする課題】従来の方法では、ブレ
ークポイントの論理アドレスを格納していたため、論理
アドレスと物理アドレスとの対応が変更される事象が発
生すると、格納していた論理アドレスが本来ブレークし
たい場所でなくなる。そのため再度デバッグするときは
ブレークポイントの再設定が必要で、また、ブレークさ
れるとコンソールからの入力になるため、被デバッグプ
ログラムの参照を自由にできなくなる等、操作が制限さ
れるなどの問題があった。
[Problem to be solved by the invention] In the conventional method, the logical address of the breakpoint was stored, so when an event occurs that changes the correspondence between the logical address and the physical address, the stored logical address becomes It's not where you want to break. Therefore, when debugging again, it is necessary to reset the breakpoints, and when a break occurs, input becomes from the console, which causes problems such as being unable to freely reference the debugged program and restricting operations. there were.

【0007】この発明は上記のような問題点を解消する
ためになされたもので、論理アドレスと物理アドレスと
の対応が変更される事象が発生してもブレークポイント
の再設定なしでデバッグできることを目的としており、
さらにブレーク時での操作の制限を解消することを目的
とする。
[0007] This invention was made to solve the above problems, and it is possible to debug without resetting breakpoints even if an event occurs that changes the correspondence between logical addresses and physical addresses. The purpose is
Furthermore, the purpose is to eliminate restrictions on operations during breaks.

【0008】[0008]

【課題を解決するための手段】この発明に係わる関数型
言語のデバッグ方式は、プログラム実行中ブレークされ
たとき、ブレーク処理部で自動的にブレークポイントの
解除、再設定をするとともに、ブレーク時のブレーク処
理部でレジスタ、スタック等の内部情報を提供するもの
である。
[Means for Solving the Problems] A debugging method for a functional language according to the present invention is such that when a break occurs during program execution, the break processing unit automatically cancels and resets the breakpoint, and also It provides internal information such as registers and stacks in the break processing section.

【0009】[0009]

【作用】この発明における関数型言語のデバッグ方式は
、ブレークポイントを設定する手段によりブレークポイ
ントが設定され、ブレーク処理部は起動の際、ブレーク
した場所がユーザが設定したところかブレーク処理部自
身が設定したところかを判断する。ユーザが設定したと
ころであればユーザの命令入力後、ブレークポイントを
解除し次に実行されるアドレスにうブレークを設定し再
実行する。ブレーク処理部自身が設定したところであれ
ばブレークポイントを解除し前回実行されたアドレスに
ブレークポイントを設定し再実行する。
[Operation] In the debugging method of a functional language according to the present invention, a breakpoint is set by means of setting a breakpoint, and when the break processing section is started, the break processing section determines whether the break location is set by the user or the break processing section itself. Determine whether it has been set. If the user has set it, after the user inputs the command, the breakpoint is canceled, a break is set at the next address to be executed, and the execution is re-executed. If the break point was set by the break processing unit itself, the break point is canceled, a break point is set at the address that was previously executed, and the process is re-executed.

【0010】0010

【実施例】以下、この発明の一実施例を図について説明
する。図1はこの発明の一実施例を示したものである。 図1において、1はデバッガ起動、2は現ブレークポイ
ントがユーザによって設定されたものであるかの判定、
3は現ブレークポイントがユーザによって設定されたも
のであった時に行う処理1、4はデバッガ自身が設定し
た時に行う処理2、5は処理1あるいは処理2が行われ
た後に実行される処理3、6はデバッガの終了である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows an embodiment of this invention. In Figure 1, 1 is the start of the debugger, 2 is the determination of whether the current breakpoint was set by the user,
3 is process 1 that is executed when the current breakpoint is set by the user; 4 is process 2 that is executed when the debugger itself sets it; 5 is process 3 that is executed after process 1 or process 2 is performed; 6 is the end of the debugger.

【0011】図2は現ブレークポイントがユーザによっ
て設定された時に行う処理1の説明図である。図2にお
いて、7は処理1の起動、8はフラグセット、9は内部
情報の提供、10は処理1終了の判定、11は処理1の
終了である。
FIG. 2 is an explanatory diagram of process 1 performed when the current breakpoint is set by the user. In FIG. 2, 7 is the start of the process 1, 8 is a flag set, 9 is the provision of internal information, 10 is the determination of the end of the process 1, and 11 is the end of the process 1.

【0012】図3は現ブレークポイントがデバッガ自身
で設定された時に行う処理2の説明図である。図3にお
いて、12は処理2の起動、13はフラグリセット、1
4は処理2の終了である。
FIG. 3 is an explanatory diagram of process 2 performed when the current breakpoint is set by the debugger itself. In FIG. 3, 12 is the start of process 2, 13 is a flag reset, 1
4 is the end of process 2.

【0013】図4は処理1あるいは処理2が行われた後
に実行される処理3の説明図である。図4において、1
5は処理3の起動、16は現ブレークポイントの解除、
17はフラグチェック、18は次回実行されるアドレス
のブレークポイント設定、19は前回実行されたアドレ
スのチェック、20は前回実行のアドレスのブレークポ
イント設定、21は処理3の終了である。
FIG. 4 is an explanatory diagram of process 3 that is executed after process 1 or process 2 is performed. In Figure 4, 1
5 starts process 3, 16 cancels the current breakpoint,
17 is a flag check, 18 is a break point setting for the next executed address, 19 is a check for the previously executed address, 20 is a break point setting for the previously executed address, and 21 is the end of process 3.

【0014】図5は本発明の構成例を示したものである
。図5において、22はデバッグの開始、23はユーザ
によるブレークポイントの設定、24は被デバッグプロ
グラムの実行、25はブレークポイントでブレークされ
ることを示し、1はブレーク後デバッガの起動、26は
デバッグの終了である。
FIG. 5 shows an example of the structure of the present invention. In FIG. 5, 22 is the start of debugging, 23 is a breakpoint set by the user, 24 is execution of the debugged program, 25 is a break at the breakpoint, 1 is the activation of the debugger after the break, and 26 is debugging. This is the end of

【0015】ユーザはデバッグを行うとき、あらかじめ
ブレークポイントを設定する手段を用いてブレークポイ
ントの設定23を行う。次に被デバッグプログラム実行
24を行うと、ブレークポイントでブレーク25が発生
し、ブレークの処理を行うためにデバッガ起動1が行わ
れる。
When debugging, the user sets breakpoints 23 using a means for setting breakpoints in advance. Next, when the program to be debugged is executed 24, a break 25 occurs at the breakpoint, and a debugger activation 1 is performed to process the break.

【0016】次にデバッガの処理について説明する。デ
バッガは起動1が発生すると現ブレークポイントがユー
ザによって設定されたものであるかの判定2を行い、そ
のブレークポイントがユーザによって設定されたもので
あると判定した場合は処理1、そうでない場合処理2を
実行する。処理1あるいは処理2が実行されると、処理
3を行いデバッガの終了6となる。
Next, the processing of the debugger will be explained. When activation 1 occurs, the debugger performs judgment 2 to determine whether the current breakpoint was set by the user, and if it judges that the breakpoint was set by the user, process 1, otherwise process Execute 2. When process 1 or process 2 is executed, process 3 is performed and the debugger ends 6.

【0017】処理1では、処理1起動7がされると、処
理1が起動されたことを示すためにフラグのセット8を
行う。そして現ブレークポイントでのレジスタ、スタッ
ク等の内部情報を提供する手段を用いてユーザに内部情
報の提供9をする。次にデバッガ終了の判定10を行い
終了でないと判定した場合9に戻り、終了であると判定
した場合処理1の終了11となる。
In process 1, when process 1 activation 7 is performed, a flag is set 8 to indicate that process 1 has been activated. Then, internal information is provided 9 to the user using means for providing internal information such as registers and stacks at the current breakpoint. Next, it is determined 10 whether the debugger has ended, and if it is determined that the debugger has not ended, the process returns to 9, and if it is determined that the debugger has ended, the process 1 ends 11.

【0018】処理2では、処理2起動12がされると、
処理2が起動されたことを示すためにフラグのリセット
13を行う。そして、処理2終了14となる。
In process 2, when process 2 activation 12 is performed,
A flag is reset 13 to indicate that process 2 has been activated. Then, the process 2 ends 14.

【0019】処理3では、ブレークポイントを自動的に
解除する方法用いて現ブレークポイントの解除16を行
う。次に、処理1、処理2のどちらが起動されたかを判
定するためにフラグのチェック17を行いフラグがセッ
トされていれば次回実行アドレスにブレークポイントの
設定18を行い、リセットされていれば何もしない。次
に現ブレークポイントが実行される前に実行されたアド
レスがブレークポイントであるかの判定19を行い、ブ
レークポイントであると判断すれば、自動的に設定する
手段を用いて前回実行アドレスにブレークポイントの設
定20を行い、そうでなければ何もしない。以上の実行
が終了すると、処理3終了21となる。
In process 3, the current breakpoint is canceled 16 using a method for automatically canceling the breakpoint. Next, a flag check 17 is performed to determine whether process 1 or process 2 has been started, and if the flag is set, a breakpoint is set 18 at the next execution address, and if it is reset, nothing is done. do not. Next, it is determined 19 whether the address executed before the current breakpoint is executed is a breakpoint, and if it is determined to be a breakpoint, a break is made to the previously executed address using automatic setting means. Set points 20, otherwise do nothing. When the above execution is completed, the process 3 ends 21.

【0020】デバッガが終了すると被デバッグプログラ
ムの再実行が行われ、ブレークが発生せず、被デバッグ
プログラムの実行が終了したらデバッグ終了26となる
When the debugger ends, the program to be debugged is re-executed, no break occurs, and when the execution of the program to be debugged ends, debugging ends 26.

【0021】[0021]

【発明の効果】以上のように、この発明によれば、論理
アドレスにブレークポイントを設定したため論理アドレ
スと物理アドレスとの対応が変更される事象が発生して
も、再度デバッグ時、ブレークポイントの再設定を省略
でき、また、レジスタ、スタック等の内部情報の提供を
ソフトウェアで実現したため、被デバッグプログラムの
ソースの参照等ができるようになるという効果がある。
As described above, according to the present invention, even if an event occurs in which the correspondence between a logical address and a physical address is changed because a breakpoint is set at a logical address, when debugging is performed again, the breakpoint is set. Since resetting can be omitted, and internal information such as registers and stacks is provided by software, it is possible to refer to the source of the program to be debugged.

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

【図1】この発明の一実施例処理説明図である。FIG. 1 is a process explanatory diagram of an embodiment of the present invention.

【図2】図1中の処理1の説明図である。FIG. 2 is an explanatory diagram of process 1 in FIG. 1;

【図3】図1中の処理2の説明図である。FIG. 3 is an explanatory diagram of process 2 in FIG. 1;

【図4】図1中の処理3の説明図である。FIG. 4 is an explanatory diagram of process 3 in FIG. 1;

【図5】この発明の構成例である。FIG. 5 is a configuration example of the present invention.

【図6】従来の実施例構成図である。FIG. 6 is a configuration diagram of a conventional embodiment.

【図7】従来例のデバッグ実行制御処理説明図である。FIG. 7 is an explanatory diagram of a conventional debug execution control process.

【図8】従来例のデバッグ実行制御処理説明図である。FIG. 8 is an explanatory diagram of a conventional debug execution control process.

【図9】従来例のデバッグ実行制御処理説明図である。FIG. 9 is an explanatory diagram of a conventional debug execution control process.

【符号の説明】[Explanation of symbols]

2  ユーザ設定によるブレークポイントかの判定8 
 フラグセット 9  内部情報の提供 13  フラグリセット 16  現ブレークポイントの解除 17  フラグチェック 18  次回実行アドレスにブレークポイント設定19
  前回実行アドレスがユーザ設定によるブレークポイ
ントかの判定 20  前回実行アドレスにブレークポイント設定23
  ブレークポイントの設定
2 Determining whether it is a breakpoint based on user settings 8
Flag set 9 Provide internal information 13 Flag reset 16 Cancel current breakpoint 17 Flag check 18 Set breakpoint at next execution address 19
Determining whether the previous execution address is a breakpoint set by the user 20 Setting a breakpoint at the previous execution address 23
Setting breakpoints

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  プログラムデバッグ方式において、ブ
レークポイントを設定する手段、再実行の際、現ブレー
クポイントを自動的に解除、再設定する手段、現ブレー
クポイントにおけるレジスタの情報と使用されているス
タックの情報を提供する手段、を有する関数型言語のデ
バッグ方式。
Claim 1: In a program debugging method, means for setting a breakpoint, means for automatically canceling and resetting the current breakpoint upon re-execution, register information at the current breakpoint and information on the stack being used. A debugging method for a functional language having a means for providing information.
JP3044988A 1991-03-11 1991-03-11 Debugging system for function type language Pending JPH04296943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3044988A JPH04296943A (en) 1991-03-11 1991-03-11 Debugging system for function type language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3044988A JPH04296943A (en) 1991-03-11 1991-03-11 Debugging system for function type language

Publications (1)

Publication Number Publication Date
JPH04296943A true JPH04296943A (en) 1992-10-21

Family

ID=12706832

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3044988A Pending JPH04296943A (en) 1991-03-11 1991-03-11 Debugging system for function type language

Country Status (1)

Country Link
JP (1) JPH04296943A (en)

Similar Documents

Publication Publication Date Title
JPH04296943A (en) Debugging system for function type language
JPH03113648A (en) Program debug system
JPH0588933A (en) Parallel processing system with debugging function
JPH02135545A (en) Execution control processing system for debugger
JP2800577B2 (en) Debug device
JPH1049401A (en) Method for debugging program
JP2000181748A (en) Debug system for multi-memory space program and its debug method
JP2697230B2 (en) Debug support device
JPS5868162A (en) Retry processing system
JPH0816431A (en) Debugging process system for user program
JPH0232651B2 (en)
JPH03209534A (en) Back-up device for development of program
JP2002196950A (en) Debugging system
JPH1040131A (en) Program debug method
JPH02244232A (en) Information processor
JPH04310139A (en) Debug support tool for compiler language
JPH0239332A (en) Software break system
JPH01244547A (en) Program development debugging backup system
JPH04184544A (en) Break point control system
JPH06214828A (en) Interactive debug controller
JP2003330751A (en) Debug system for micro-processor
JPS60254251A (en) Debug system
JPH01154252A (en) Program debug back-up device for parallel processors
JPH08185326A (en) Interpreter language processor
JPS638946A (en) Program debug supporting system