JPH05181702A - Soft debugger - Google Patents

Soft debugger

Info

Publication number
JPH05181702A
JPH05181702A JP3347198A JP34719891A JPH05181702A JP H05181702 A JPH05181702 A JP H05181702A JP 3347198 A JP3347198 A JP 3347198A JP 34719891 A JP34719891 A JP 34719891A JP H05181702 A JPH05181702 A JP H05181702A
Authority
JP
Japan
Prior art keywords
program
memory
register
contents
registered
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
JP3347198A
Other languages
Japanese (ja)
Inventor
Riyouko Kadoki
良子 角木
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP3347198A priority Critical patent/JPH05181702A/en
Publication of JPH05181702A publication Critical patent/JPH05181702A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve working efficiency by registering the contents of a register and a memory in a storage device, optionally reading out the contents registered in the storage means and returning the read contents to the register and the memory. CONSTITUTION:An input device 11, a display device 12, an internal storage device 13 including a debugging storage area, a table, etc., and an external storage device 14 are connected to a CPU 10. In a brake point or function accessing step or the like, the contents of the register and the memory on the execution program side are stored in the debugging storage area and their leading addresses also are simultaneously registered in the table. In the case of returning execution, the brake point or function accessing step just before a current one is searched from the table and the contents of the register and the memory which are stored in the address storage area are read out to the program side register and memory. Since it is unnecessary to repeatedly execute the program or previously describing information by hand writing, the working efficiency can be improved.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プログラム開発環境下
で用いられるソフトデバッガに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a soft debugger used in a program development environment.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】従来の
デバッガはバックトレース機能を有していなかった。即
ち、プログラムの各ステップを実行するごとにレジスタ
及びメモリの内容は新たな情報で上書きされるのでそれ
以前のステップに関する情報は全て失われてしまい、元
の状態に戻すことができなかった。
2. Description of the Related Art Conventional debuggers do not have a backtrace function. That is, since the contents of the register and the memory are overwritten with new information each time each step of the program is executed, all the information regarding the previous steps is lost and the original state cannot be restored.

【0003】このため、以前のステップにおける情報を
知るためには、そのステップ実行時にオペレータが情報
を手書きによりあらかじめ記述しておくか、又はそのプ
ログラムを初めから再度実行させることが必要であっ
た。
Therefore, in order to know the information in the previous step, it was necessary for the operator to write the information in advance by handwriting when the step was executed, or to re-execute the program from the beginning.

【0004】関数呼出し時であれば、以前のステップで
あっても情報を見ることはできるが、得られるのは関数
名及びその引数(スタックに積まれている情報)のみで
あり、しかもこれは情報を知るのみで実行をそのステッ
プに戻すことは全くできなかった。
When a function is called, the information can be seen even in the previous step, but only the function name and its argument (information stacked on the stack) can be obtained. Knowing the information, we could never return to that step.

【0005】従って本発明は、プログラムを初めから再
度実行させたりオペレータが情報を手書きによりあらか
じめ記述しておく必要をなくし、作業効率を大幅に高め
ることを可能とするソフトデバッガを提供するものであ
る。
Therefore, the present invention provides a software debugger that can re-execute a program from the beginning or preliminarily write information by hand by an operator and can significantly improve work efficiency. ..

【0006】[0006]

【課題を解決するための手段】本発明によれば、記憶手
段と、実行中のプログラムの所定ステップにおけるレジ
スタ及びメモリの内容を記憶手段に登録する手段と、記
憶手段に登録された内容を所望により読み出してレジス
タ及びメモリへ戻す手段とを備えたソフトデバッガが提
供される。
According to the present invention, storage means, means for registering the contents of the register and memory at a predetermined step of a program being executed in the storage means, and the contents registered in the storage means are desired. Provides a soft debugger with means for reading and returning to registers and memory.

【0007】[0007]

【作用】ブレークポイントや関数呼出しステップ等にお
いて実行プログラム側のレジスタ及びメモリの内容がデ
バッグ用の格納領域に記憶され同時にその先頭アドレス
もテーブルに登録される。実行を戻す場合、その直前の
ブレークポイントや関数呼出しステップを上述のテーブ
ルから探しだしそのアドレスの格納領域に記憶されてい
るレジスタ及びメモリの内容を実行プログラム側のレジ
スタ及びメモリへ読み出す。
The contents of the register and the memory on the side of the execution program are stored in the storage area for debugging at the breakpoint, the function calling step, etc., and at the same time, the head address thereof is also registered in the table. When the execution is returned, the breakpoint immediately before that or the function calling step is searched from the above table, and the contents of the register and the memory stored in the storage area of the address are read to the register and the memory of the execution program side.

【0008】[0008]

【実施例】図2は本発明の一実施例として、ソフトデバ
ッガを有するシステムの構成を概略的に示すブロック図
である。
FIG. 2 is a block diagram schematically showing the configuration of a system having a soft debugger as one embodiment of the present invention.

【0009】同図において、10はCPUであり、この
CPU10にはキーボード等による入力装置11、表示
装置12、後述するデバッグ用格納領域、テーブル等が
存在する内部記憶装置13、及び外部記憶装置14が接
続されている。
In FIG. 1, reference numeral 10 denotes a CPU. The CPU 10 has an input device 11 such as a keyboard, a display device 12, a debug storage area described later, an internal storage device 13 in which a table and the like exist, and an external storage device 14. Are connected.

【0010】図1は本実施例のソフトデバッガにおける
情報の登録処理及び読み出し処理を行うプログラムのフ
ローチャートであり、図3はこのプログラムによる特に
登録処理動作を説明する図である。
FIG. 1 is a flow chart of a program for performing information registration processing and information reading processing in the software debugger of this embodiment, and FIG. 3 is a diagram for explaining the registration processing operation particularly by this program.

【0011】まず図1及び図3を用いて登録処理につい
て説明する。ステップS1において、検査すべきプログ
ラムのプロセスがブレークポイント、即ちユーザがあら
かじめアドレス指定した停止位置となったかどうか繰り
返し判別する。ブレークポイントである場合は、デバッ
グプログラムの登録プログラムが作動して以下の処理が
実行される。ステップS2において、デバッグ用格納領
域がオーバーフローであるかどうか判別し、オーバーフ
ローの場合はステップS3において最も古い登録内容を
消去した後、またオーバーフローでない場合はそのまま
ステップS4へ進む。
First, the registration process will be described with reference to FIGS. 1 and 3. In step S1, it is repeatedly determined whether or not the process of the program to be inspected has reached a breakpoint, that is, a stop position previously addressed by the user. In the case of a breakpoint, the debug program registration program operates and the following processing is executed. In step S2, it is determined whether or not the storage area for debugging overflows. If it overflows, the oldest registered content is erased in step S3. If it does not overflow, the process proceeds to step S4.

【0012】ステップS4では、そのときのプログラム
レジスタの内容及び実行プログラムにおけるメモリの内
容(データ、スタック)をデバッグ用格納領域に登録す
ると共にその先頭アドレスをテーブルに登録する。次い
でステップS5において、読み出し処理かどうか判別す
る。読み出し処理ではない場合はステップS6へ進んで
その検査すべきプログラムの実行が終了したかどうか又
はデバッグを意図的に終了するかどうか判別する。終了
しない場合はステップS1以降の処理を繰り返す。
In step S4, the contents of the program register and the contents of the memory (data, stack) in the execution program at that time are registered in the storage area for debugging and the start address thereof is registered in the table. Next, in step S5, it is determined whether or not it is a reading process. If it is not the reading process, the process proceeds to step S6, and it is determined whether the execution of the program to be inspected is completed or whether the debugging is intentionally ended. If not completed, the processes from step S1 are repeated.

【0013】以上の説明では、ブレークポイントにおい
てそのときのレジスタ及びメモリの内容を登録している
が、ブレークポイントの代りに又はこれに加えて関数呼
出しステップで登録を行うようにしてもよい。さらに、
ユーザが手動でステップを1つずつ動かすステップ実行
によってプログラムを進め、所望の位置でレジスタ及び
メモリの登録を行うようにしてもよい。ただし、ブレー
クポイント及びステップ実行ではその位置でプログラム
が止まるが、関数呼出しステップではプログラムは停止
せず情報の登録が行われるのみである。
In the above description, the contents of the register and memory at that time are registered at the breakpoint, but the registration may be performed at the function calling step instead of or in addition to the breakpoint. further,
The user may manually move the steps one by one to advance the program to register the register and the memory at a desired position. However, the program stops at the position at the breakpoint and step execution, but at the function call step, the program does not stop and information is only registered.

【0014】デバッグ用格納領域としては内部記憶装置
13の使用してないメモリ領域又はページング領域が用
いられる。このデバッグ用格納領域としての容量は、あ
らかじめ固定されているか又は登録するステップ数に応
じてユーザが設定する。
A memory area or a paging area which is not used by the internal storage device 13 is used as a debug storage area. The capacity of the storage area for debugging is fixed in advance or set by the user according to the number of steps to be registered.

【0015】図4及び図5は図1のプログラムの一部を
詳細に説明するフローチャートであり、図6はこのプロ
グラムによる特に読み出し処理動作を説明する図であ
る。
FIGS. 4 and 5 are flow charts for explaining a part of the program of FIG. 1 in detail, and FIG. 6 is a diagram for explaining particularly the read processing operation by this program.

【0016】次にこれらの図4〜図6、及び図1を用い
て、登録されている情報の読み出し処理について説明す
る。図1のステップS5において読み出し処理であると
判別した場合、ステップS7へ進んでその読み出し処理
(実行を戻す処理)をステップ数指定によって行うか又
はアドレス指定によって行うかを判別する。どちらで行
うかはユーザが入力装置11を介して設定する。
Next, with reference to FIGS. 4 to 6 and FIG. 1, the read processing of registered information will be described. If it is determined in step S5 of FIG. 1 that the reading process is performed, the process proceeds to step S7, and it is determined whether the reading process (processing for returning execution) is performed by designating the number of steps or by addressing. The user sets which one is to be performed via the input device 11.

【0017】ステップ数指定の場合はステップS8へ進
み、図4に示すプログラムを実行する。まずステップS
81において、現在のステップから戻したいステップ数
を指定する。これは、ブレークポイント、ステップ実行
レベルでのステップ数であり、実際にユーザが入力装置
11を介して指定する。次いでステップS82におい
て、図6に示すように、デバッグプログラムの読み出し
プログラムは、戻したいステップに相当するブレークア
ドレスをテーブルから探し出し、そのブレークアドレス
を先頭アドレスとしてデバッグ用格納領域に登録されて
いる内容を実行プログラム側のプログラムレジスタ及び
メモリに読み込む。
If the number of steps is designated, the process proceeds to step S8 to execute the program shown in FIG. First step S
At 81, the number of steps to be returned from the current step is designated. This is the number of steps at the breakpoint and step execution level, and is actually specified by the user via the input device 11. Next, in step S82, as shown in FIG. 6, the read program of the debug program finds the break address corresponding to the step to be returned from the table, and reads the contents registered in the debug storage area with the break address as the start address. It is read into the program register and memory of the execution program.

【0018】アドレス指定の場合はステップS9へ進
み、図5に示すプログラムを実行する。まずステップS
91において、戻したいステップのアドレスを指定す
る。これは、実際にユーザが入力装置11を介して指定
する。次いでステップS92において、図6に示すよう
に、デバッグプログラムの読み出しプログラムは、その
アドレスをテーブルから探し出す。次のステップS93
においては、このアドレスサーチの結果、その指定アド
レスの情報が登録されているかどうか判別する。登録さ
れている場合は、ステップS94へ進み、そのアドレス
を先頭アドレスとしてデバッグ用格納領域に登録されて
いる内容を実行プログラム側のプログラムレジスタ及び
メモリに読み込む。その指定アドレスの情報が登録され
ていない場合は、ステップS95へ進み、その指定アド
レスを含む関数の情報が登録されているかどうかテーブ
ルから判別する。登録されていないときはそのままこの
処理ルーチンを終了する。登録されているときは、ステ
ップS96においてその指定アドレスを含む関数のアド
レスをテーブルから取り出し、そのアドレスを先頭アド
レスとしてデバッグ用格納領域に登録されている内容を
実行プログラム側のプログラムレジスタ及びメモリに読
み込む。次いでステップS97において戻したいステッ
プのアドレス(指定アドレス)まで実行させる。
In the case of address designation, the process proceeds to step S9 to execute the program shown in FIG. First step S
At 91, the address of the step to be returned is designated. This is actually specified by the user via the input device 11. Next, in step S92, as shown in FIG. 6, the read program of the debug program finds the address from the table. Next step S93
At, as a result of this address search, it is determined whether or not the information of the designated address is registered. If it is registered, the process proceeds to step S94, and the content registered in the debug storage area is read into the program register and the memory on the side of the execution program, using the address as the start address. If the information of the designated address is not registered, the process proceeds to step S95, and it is determined from the table whether the information of the function including the designated address is registered. When it is not registered, this processing routine is ended as it is. If it is registered, in step S96, the address of the function including the designated address is taken out from the table, and the content registered in the debug storage area is read into the program register and the memory on the execution program side using the address as the start address. .. Then, in step S97, the process is executed up to the address (specified address) of the step to be returned.

【0019】以上述べた実施例によれば、データのこわ
れた箇所の前後の状態をデバッグ時に一度に知ることが
でき、従ってこわれる以前のデータをユーザが手書きに
より記述しておく必要がなくなる。さらに、データがこ
われた後、そのこわれた箇所の前のステップに直接的に
戻ることができるのでプログラムの最初からその箇所ま
でもう一度実行させる必要がなくなり、知りたいときに
知りたい情報を素早く得ることができるので作業効率が
大幅に向上する。
According to the above-described embodiment, the states before and after the broken portion of the data can be known at one time during debugging, and therefore it is not necessary for the user to write the data before the broken portion by handwriting. Moreover, after the data is broken, you can go straight back to the step before the broken point, eliminating the need to run from the beginning of the program to that point again, and get the information you need quickly when you need it. Because it can be done, work efficiency is greatly improved.

【0020】なお上述の実施例では、読み出し処理がス
テップ数指定又はアドレス指定を選択的に行うように構
成されているが、これはどちらか一方のみを行うように
構成してもよいことは明らかである。
In the above embodiment, the reading process is configured to selectively specify the number of steps or the address, but it is clear that this may be configured to perform only one of them. Is.

【0021】[0021]

【発明の効果】以上詳細に説明したように本発明によれ
ば、記憶手段と、実行中のプログラムの所定ステップに
おけるレジスタ及びメモリの内容を記憶手段に登録する
手段と、記憶手段に登録された内容を所望により読み出
してレジスタ及びメモリへ戻す手段とを備えているた
め、プログラムを初めから再度実行させたりオペレータ
が情報を手書きによりあらかじめ記述しておく必要をな
くし、作業効率を大幅に高めることを可能である。
As described above in detail, according to the present invention, the storage means, the means for registering the contents of the register and the memory in the predetermined step of the program being executed into the storage means, and the storage means are registered. Since it is equipped with a means for reading the contents as desired and returning them to the register and memory, there is no need to re-execute the program from the beginning or the operator to write the information in advance by handwriting, and work efficiency can be greatly improved. It is possible.

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

【図1】本発明の一実施例における情報の登録処理及び
戻し処理を行うプログラムのフローチャートである。
FIG. 1 is a flowchart of a program for performing an information registration process and an information return process according to an embodiment of the present invention.

【図2】図1の実施例おけるソフトデバッガを有するシ
ステムの構成を概略的に示すブロック図である。
FIG. 2 is a block diagram schematically showing the configuration of a system having a soft debugger in the embodiment of FIG.

【図3】図1のプログラムによる登録処理動作を説明す
る図である。
FIG. 3 is a diagram for explaining a registration processing operation by the program of FIG.

【図4】図1のプログラムの一部を詳細に説明するフロ
ーチャートである。
FIG. 4 is a flowchart illustrating a part of the program of FIG. 1 in detail.

【図5】図1のプログラムの一部を詳細に説明するフロ
ーチャートである。
FIG. 5 is a flowchart illustrating a part of the program of FIG. 1 in detail.

【図6】図1のプログラムによる読み出し処理動作を説
明する図である。
6 is a diagram illustrating a read processing operation by the program of FIG.

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

10 CPU 11 入力装置 12 表示装置 13 内部記憶装置 14 外部記憶装置 10 CPU 11 Input Device 12 Display Device 13 Internal Storage Device 14 External Storage Device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 記憶手段と、実行中のプログラムの所定
ステップにおけるレジスタ及びメモリの内容を前記記憶
手段に登録する手段と、前記記憶手段に登録された内容
を所望により読み出して前記レジスタ及びメモリへ戻す
手段とを備えたことを特徴とするソフトデバッガ。
1. A storage unit, a unit for registering the contents of a register and a memory in a predetermined step of a program being executed in the storage unit, and reading the contents registered in the storage unit to the register and the memory as desired. A soft debugger having means for returning.
JP3347198A 1991-12-27 1991-12-27 Soft debugger Pending JPH05181702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3347198A JPH05181702A (en) 1991-12-27 1991-12-27 Soft debugger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3347198A JPH05181702A (en) 1991-12-27 1991-12-27 Soft debugger

Publications (1)

Publication Number Publication Date
JPH05181702A true JPH05181702A (en) 1993-07-23

Family

ID=18388588

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3347198A Pending JPH05181702A (en) 1991-12-27 1991-12-27 Soft debugger

Country Status (1)

Country Link
JP (1) JPH05181702A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07191875A (en) * 1993-12-27 1995-07-28 Nec Corp Debugger
US6240529B1 (en) 1997-06-04 2001-05-29 Nec Corporation Debugging method and debugging apparatus for microcomputer system and recording medium on which debug program is recorded

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07191875A (en) * 1993-12-27 1995-07-28 Nec Corp Debugger
US6240529B1 (en) 1997-06-04 2001-05-29 Nec Corporation Debugging method and debugging apparatus for microcomputer system and recording medium on which debug program is recorded

Similar Documents

Publication Publication Date Title
JPH05181702A (en) Soft debugger
JPH0581087A (en) Processor monitoring system
JPH05165680A (en) Memory operation tracing device
JP2000076095A (en) Device and method for tracing program and storage medium storing program therefor
JPH04328644A (en) Debug back-up device
JPH05204708A (en) Debugger processing system
JP2860054B2 (en) Program debugging device
JPH05241890A (en) Data trace system
JPH0724030B2 (en) Debug device
JPH1027153A (en) Bus transfer device
JPH04242455A (en) Inter-processor communication trace circuit
JPH06103115A (en) Debugging system
JPS6211746B2 (en)
JPH0399338A (en) Microprocessor
JP2001202272A (en) Debugging method, debugging device using this method and recording medium with debugging method recorded thereon
JPS609294B2 (en) Tracing method in electronic computers
JPH04316140A (en) Program tracing device
JPH02242445A (en) Debugging mechanism for information processor
JPH01201741A (en) Trace circuit
JPH06250881A (en) Symbolic debugging system
JPH01320547A (en) Program execution information collecting system
JPH09179753A (en) Stack information collecting system using timing of return processing
JPH06259278A (en) System for acquiring debugging information
JPH05204710A (en) Event tracer
JPS63170752A (en) Trace circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050208

A977 Report on retrieval

Effective date: 20070625

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070925

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070925

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071203

A711 Notification of change in applicant

Effective date: 20071203

Free format text: JAPANESE INTERMEDIATE CODE: A712

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20110118

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080124

RD04 Notification of resignation of power of attorney

Effective date: 20080212

Free format text: JAPANESE INTERMEDIATE CODE: A7424

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20130118

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 6

Free format text: PAYMENT UNTIL: 20140118