JPH01188957A - Program exception processing system - Google Patents

Program exception processing system

Info

Publication number
JPH01188957A
JPH01188957A JP63013266A JP1326688A JPH01188957A JP H01188957 A JPH01188957 A JP H01188957A JP 63013266 A JP63013266 A JP 63013266A JP 1326688 A JP1326688 A JP 1326688A JP H01188957 A JPH01188957 A JP H01188957A
Authority
JP
Japan
Prior art keywords
program
address
source
machine language
source program
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
JP63013266A
Other languages
Japanese (ja)
Inventor
Tetsuo Nagashima
長島 哲男
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 JP63013266A priority Critical patent/JPH01188957A/en
Publication of JPH01188957A publication Critical patent/JPH01188957A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To point out a source program name through an address where a program exception is produced by securing the correspondence between the names of source programs and the executing addresses of machine word instructions and holding the correspondence data. CONSTITUTION:The machine word instructions are allocated to a source program 11 at and after an address 4000 of an executable program 21 together with the machine word instructions allocated to a source program 12 at and after an address 4800, and the machine word instructions allocated to a source program 13 at and after an address 5200 respectively. A correspondence production means 2 delivers the names of source programs 11-13 and the correspondence data 22 on the allocated addresses. If a program exception occurs in an address 5000, for example, an information means 3 informs the address 5000 to a deciding means 5. The means 5 decides the source program 12 as a source program name via a reference means 4 and displays it on a display device 40.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、コンピュータシステムにおけるプログラム実
行中に発生するプログラム例外の処理方式に関し、特に
、プログラム例外が発生したソースプログラムの名前を
指摘することを可能とするプログラム例外処理方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a method for handling program exceptions that occur during program execution in a computer system, and particularly to pointing out the name of a source program in which a program exception has occurred. This article relates to a program exception handling method that makes it possible to handle program exceptions.

(従来の技術) 従来、プログラム例外発生時に、プログラム例外の原因
となった命令を指摘する情報として、コンパイルの結果
プログラムに割当てられた機械語命令の番地を用いてい
た。
(Prior Art) Conventionally, when a program exception occurs, the address of a machine language instruction assigned to the program as a result of compilation has been used as information pointing out the instruction that caused the program exception.

(発明が解決しようとする課題) 上述した従来のプログラム例外処理方式は、プログラム
例外の原因となった命令を指摘するための情報が主記憶
の番地や機械語命令形式すなわちハードウェアの構造に
依存しているので、特に高級言語を用いてプログラミン
グを行うプログラマにとっては、有意な情報とはいえな
い。つまり、指摘された情報だけでは、どのソースプロ
グラムでプログラム例外が発生したのかを判別すること
ができないという問題点があった。
(Problems to be Solved by the Invention) In the conventional program exception handling method described above, the information for pointing out the instruction that caused the program exception depends on the main memory address and machine language instruction format, that is, the hardware structure. Therefore, it cannot be said to be meaningful information, especially for programmers who program using high-level languages. In other words, there was a problem in that it was not possible to determine in which source program the program exception occurred only from the indicated information.

(課題を解決するための手段) 上述の問題点を解決するために本発明が提供するプログ
ラム例外処理方式は、1つ以上のソースプログラムをコ
ンパイルし、機械語命令の集合である実行可能な形式の
プログラムを作成するコンピュータシステムのプログラ
ム実行方式において、前記ソースプログラムの名前と、
このソースプログラムがコンパイルされてなる前記実行
可能な形式のプログラムに割当てられた前記WIiiI
i語命令の実行番地とを対応付ける手段と、この対応付
は手段により対応付けられた前記ソースプログラムの名
前と前記機械語命令実行番地との対応データを前記実行
可能な形式のプログラムとともに実行可能な形式のモジ
ュールとして形成する手段と、このモジュール形成手段
により形成された前記実行可能な形式のモジュール内の
前記対応データを参照する手段と、プログラム例外が発
生した前記機械語命令実行番地を通知する手段と、この
通知手段により通知された前記機械語命令実行番地と前
記参照手段により参照した前記対応データとに基づいて
、前記プログラム例外が発生したソースプログラムの名
前を決定する手段とを有することを特徴とする。
(Means for Solving the Problems) In order to solve the above-mentioned problems, the program exception handling method provided by the present invention compiles one or more source programs into an executable format that is a set of machine language instructions. In a program execution method for a computer system that creates a program, the name of the source program;
The WIiiiI assigned to the program in an executable format obtained by compiling this source program
means for associating an execution address of an i-word instruction; and a means for making correspondence between the name of the source program and the execution address of the machine language instruction, which are associated by the means, together with the program in an executable format. means for forming the module as a module in the executable format, means for referencing the corresponding data in the module in the executable format formed by the module forming means, and means for notifying the execution address of the machine language instruction where the program exception has occurred. and means for determining the name of the source program in which the program exception has occurred, based on the machine language instruction execution address notified by the notification means and the corresponding data referenced by the reference means. shall be.

(実施例) 以下、本発明の一実施例について図面を参照して説明す
る。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のプログラム例外方式の構成
を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a program exception system according to an embodiment of the present invention.

図中、1はモジュール形成手段、2は対応付は手段、3
は通知手段、4は参照手段、5は決定手段、11〜13
はソースプログラム、20は実行可能形式モジュール、
21は実行可能形式プログラム、22は対応データ、3
0は主記憶、40は表示装置をそれぞれ示す。
In the figure, 1 is a module forming means, 2 is a corresponding means, and 3
is a notification means, 4 is a reference means, 5 is a determination means, 11 to 13
is a source program, 20 is an executable module,
21 is an executable program, 22 is corresponding data, 3
0 indicates a main memory, and 40 indicates a display device.

ソースプログラム11〜13は、コンパイルされて機械
語命令の集合である実行可能形式プログラム21となる
。この実行可能形式プログラム21は、対応付は手段2
により対応付けられたソースプログラム11〜13の名
前と実行可能形式プログラム21の機械語命令実行番地
との対応データ22とともに、モジュール形成手段1に
よって実行可能型式モジュール20を形成する。また、
実行可能形式プログラム21は、主記憶30上で動体す
ることにより処理を行う。
The source programs 11 to 13 are compiled into an executable program 21 which is a set of machine language instructions. This executable program 21 is associated with means 2.
The executable module 20 is formed by the module forming means 1 together with the correspondence data 22 between the names of the source programs 11 to 13 and the machine language instruction execution addresses of the executable program 21, which are associated with each other. Also,
The executable program 21 performs processing by moving on the main memory 30.

次に、本実施例の具体例について説明する。Next, a specific example of this embodiment will be explained.

第1図において、ソースプログラム11は実行可能型式
プログラム21の4000番地から機械語命令が割当て
られ、ソースプログラム12は実行可能型式プログラム
21の4800番地から機械語命令が割当てられ、ソー
スプログラム13は実行可能型式プログラム21の52
00番地から機械語命令が割当てられたとする。このと
き、対応付は手段2により出力される対応データ22は
、ソースプログラム11〜13の名前と、割当てられた
番地となっている。つまり、ソースプログラム11に対
してはr4000J 、ソースプログラム12に対して
は「4800」、ソースプログラム13に対してはr 
5200Jがそれぞれ対応付けられている。実行可能形
式プログラム21が主記憶30にロードされて実行され
ているときに、例えば、5000番地でプログラム例外
が発生したとすると、通知手段3によりプログラム例外
の発生した実行可能形式プログラム21の番地「500
0」が通知される。決定手段5は、通知手段3により通
知された番地r5000.をもとに、参照手段4を用い
て、実行可能形式モジュール20内の対応データ22を
参照し、第2図に示すようなフローチャートに従って、
プログラム例外の発生したソースプログラムの名前とし
てソースプログラム12を決定し、表示装置40へ表示
する。
In FIG. 1, source program 11 is assigned machine language instructions from address 4000 of executable program 21, source program 12 is assigned machine language instructions from address 4800 of executable program 21, and source program 13 is executed. Possible model program 21-52
Assume that machine language instructions are assigned starting from address 00. At this time, the correspondence data 22 outputted by the correspondence means 2 includes the names of the source programs 11 to 13 and the assigned addresses. In other words, r4000J for source program 11, "4800" for source program 12, and r for source program 13.
5200J are associated with each other. For example, if a program exception occurs at address 5000 while the executable program 21 is being loaded into the main memory 30 and being executed, the notification means 3 will notify the executable program 21 at the address "5000" where the program exception has occurred. 500
0” is notified. The determining means 5 selects the address r5000. notified by the notifying means 3. Based on this, the reference means 4 is used to refer to the corresponding data 22 in the executable format module 20, and according to the flowchart shown in FIG.
The source program 12 is determined as the name of the source program in which the program exception has occurred, and is displayed on the display device 40.

第2図は第1図の決定手段5の処理の流れを示すフロー
チャートである。決定手段5は、通知手段3からプログ
ラム例外が発生した番地を通知されると、参照手段4に
より対応データ22内を参照し、この番地に該当するプ
ログラム名を決定する。
FIG. 2 is a flowchart showing the processing flow of the determining means 5 of FIG. When the determining means 5 is notified of the address at which the program exception has occurred from the notifying means 3, the determining means 5 refers to the correspondence data 22 using the reference means 4 and determines the program name corresponding to this address.

(発明の効果) 以上に説明したように本発明は、ソースプログラムの名
前と、このソースプログラムがコンパイルされてなる実
行可能な形式のプログラムに割当てられた機械語命令の
実行番地とを対応付け、その対応データを保持しておく
ことにより、プログラム例外が発生した番地からこのプ
ログラム例外が発生したソースプログラムの名前を指摘
することができる。
(Effects of the Invention) As explained above, the present invention associates the name of a source program with the execution address of a machine language instruction assigned to an executable program obtained by compiling this source program. By retaining the corresponding data, it is possible to point out the name of the source program in which the program exception occurred from the address where the program exception occurred.

そこで、プログラマが障害調査を行う上で、以下のよう
な効果がある。
Therefore, when a programmer investigates a fault, it has the following effects.

番地の割当て、番地の展開方法または機械語命令等のハ
ードウェアの知識がなくても、プログラム例外が発生し
たソースプログラムの名前を知ることができるので、障
害調査が容易となる。また、コンパイラかどのように機
械語命令を生成しているのかを知らなくても、プログラ
ム例外が発生したソースプログラムの名前を知ることが
できる。
Even without knowledge of hardware such as address allocation, address expansion methods, or machine language instructions, the name of the source program in which a program exception has occurred can be known, making fault investigation easier. Furthermore, even if you do not know how the compiler generates machine language instructions, you can know the name of the source program in which the program exception occurred.

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

第1図は本発明の一実施例のプログラム例外方式の構成
を示すブロック図、第2図は第1図の決定手段5の処理
の流れを示すフローチャートである。 1・・・モジュール形成手段、2・・・対応付は手段、
3・・・通知手段、4・・・参照手段、5・・・決定手
段、11〜13・・・ソースプログラム、20・・・実
行可能形式モジュール、21・・・実行可能形式プログ
ラム、22・・・対応データ、30・・・主記憶、40
・・・表示装置。
FIG. 1 is a block diagram showing the configuration of a program exception method according to an embodiment of the present invention, and FIG. 2 is a flowchart showing the flow of processing of the determining means 5 of FIG. 1. 1... Module forming means, 2... Corresponding means,
3... Notification means, 4... Reference means, 5... Determination means, 11-13... Source program, 20... Executable format module, 21... Executable format program, 22. ...Corresponding data, 30...Main memory, 40
...Display device.

Claims (1)

【特許請求の範囲】  1つ以上のソースプログラムをコンパイルし、機械語
命令の集合である実行可能な形式のプログラムを作成す
るコンピュータシステムのプログラム実行方式において
、 前記ソースプログラムの名前と、このソースプログラム
がコンパイルされてなる前記実行可能な形式のプログラ
ムに割当てられた前記機械語命令の実行番地とを対応付
ける手段と、 この対応付け手段により対応付けられた前記ソースプロ
グラムの名前と前記機械語命令実行番地との対応データ
を前記実行可能な形式のプログラムとともに実行可能な
形式のモジュールとして形成する手段と、 このモジュール形成手段により形成された前記実行可能
な形式のモジュール内の前記対応データを参照する手段
と、 プログラム例外が発生した前記機械語命令実行番地を通
知する手段と、 この通知手段により通知された前記機械語命令実行番地
と前記参照手段により参照した前記対応データとに基づ
いて、前記プログラム例外が発生したソースプログラム
の名前を決定する手段とを有することを特徴とするプロ
グラム例外処理方式。
[Claims] A program execution method for a computer system that compiles one or more source programs to create an executable program that is a set of machine language instructions, comprising: means for associating execution addresses of the machine language instructions assigned to the program in an executable format obtained by compiling the program; and a name of the source program and the execution addresses of the machine language instructions that are correlated by the associating means. means for forming a module in an executable format together with the program in an executable format; and means for referencing the corresponding data in the module in an executable format formed by the module forming means; , means for notifying the machine language instruction execution address where the program exception has occurred, and determining whether the program exception has occurred based on the machine language instruction execution address notified by the notification means and the corresponding data referenced by the reference means. 1. A program exception handling method, comprising means for determining the name of a source program that has occurred.
JP63013266A 1988-01-22 1988-01-22 Program exception processing system Pending JPH01188957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63013266A JPH01188957A (en) 1988-01-22 1988-01-22 Program exception processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63013266A JPH01188957A (en) 1988-01-22 1988-01-22 Program exception processing system

Publications (1)

Publication Number Publication Date
JPH01188957A true JPH01188957A (en) 1989-07-28

Family

ID=11828416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63013266A Pending JPH01188957A (en) 1988-01-22 1988-01-22 Program exception processing system

Country Status (1)

Country Link
JP (1) JPH01188957A (en)

Similar Documents

Publication Publication Date Title
US5319645A (en) Method for debugging and testing the correctness of programs
US6275985B1 (en) Method and apparatus for developing an application that implements garbage collection efficiently by combining proxy objects with compiler support
JP2919302B2 (en) CPU simulation method
JPH01188957A (en) Program exception processing system
JPS62214443A (en) Emulation executing method
JPH01188956A (en) Program exception processing system
JPH02275539A (en) Debugging system
JP3085309B2 (en) Debug system
JPH0461380B2 (en)
JPH0283749A (en) Internal interruption control system for microprocessor
JPH05127945A (en) Program execution situation analysis system
JPH03164835A (en) Compiling method for global variable processing in interpreter type language processing system
JPS62147534A (en) Program test system
JPH04324525A (en) Program transplantation supporting device
JPH0468446A (en) Debugging supporting device
JPS63178341A (en) Program debugging system
JPH03290739A (en) Dynamic analysis system for program
JPS63223930A (en) Simulation system for program of exclusive processor
JPH03225532A (en) Code generation system of compiler for tracing variable of debugger
JPS6292032A (en) Test method for program
JPH0546434A (en) Program debugging system
JPS63217421A (en) Dynamic link system
JPS63289656A (en) Program processor
JPH04134535A (en) Exception information sampling mechanism for multitask program
JPH03139703A (en) Timer instruction processing system of programmable controller