JPH10301804A - Debugging method and recording medium for recording debugging program - Google Patents

Debugging method and recording medium for recording debugging program

Info

Publication number
JPH10301804A
JPH10301804A JP9112092A JP11209297A JPH10301804A JP H10301804 A JPH10301804 A JP H10301804A JP 9112092 A JP9112092 A JP 9112092A JP 11209297 A JP11209297 A JP 11209297A JP H10301804 A JPH10301804 A JP H10301804A
Authority
JP
Japan
Prior art keywords
symbol
information
debugging
hash table
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.)
Granted
Application number
JP9112092A
Other languages
Japanese (ja)
Other versions
JP3077627B2 (en
Inventor
Satoshi Imai
智 今井
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 JP09112092A priority Critical patent/JP3077627B2/en
Publication of JPH10301804A publication Critical patent/JPH10301804A/en
Application granted granted Critical
Publication of JP3077627B2 publication Critical patent/JP3077627B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To execute the debugging work of a large scale with a little memory capacity by performing the debugging work by using only one symbol used in common among respective source files. SOLUTION: A CPU reads a symbol program list for debugging from debugging information to a debugger. Symbol information is read to the prescribed address of symbol address/correspondence information 21 and the address is stored in a symbol address/correspondence information index 20. Whether or not a read EQU symbol is already registered in a hash table 22 is retrieved, and when the symbol of the same name and same value is present in the hash table 22, the attribute of the already registered symbol of the same name and same value is changed to be public. Information relating to the symbol is distributed in a final shape from a work area. In such a manner, since the common symbol is not repeatedly stored among the plural source files, large-scale debugging is executed even with the main memory of a little capacity.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はコンピュータのプロ
グラム開発等で使用されるデバッグ方法およびデバッグ
プログラムを記録する記録媒体に関し、特に少ないメモ
リ容量でもデバッグ作業を実施することができるデバッ
グ方法およびデバッグプログラムを記録する記録媒体に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging method and a recording medium for recording a debugging program used in computer program development and the like, and more particularly to a debugging method and a debugging program capable of performing a debugging operation with a small memory capacity. It relates to a recording medium for recording.

【0002】[0002]

【従来の技術】従来、パーソナルコンピュータ等におけ
るプログラム開発においては、C言語等の高級言語やア
センブラ言語等によって作成されたソ−スプログラムを
コンパイルおよびリンクして実行プログラムを作成して
いる。ところで、このようにして作成されたソースプロ
グラムは最初から完全に動作することは稀である。すな
わち、ソースプログラム中に含まれる記載ミス等(以
下、バグという)によってコンパイル時やプログラムの
実行時にエラーが発生することがある。そこで、従来よ
りプログラム開発においては、デバッガと呼ばれるツー
ルを用いてバグを取り除く作業(以下、デバッグとい
う)が行われている。
2. Description of the Related Art Conventionally, in developing a program in a personal computer or the like, an execution program is created by compiling and linking a source program created in a high-level language such as the C language or an assembler language. By the way, it is rare that a source program created in this way operates completely from the beginning. That is, an error may occur during compilation or execution of the program due to a description error or the like (hereinafter referred to as a bug) included in the source program. Therefore, conventionally, in program development, an operation of removing a bug using a tool called a debugger (hereinafter, referred to as debugging) has been performed.

【0003】まず、従来のコンピュータについて説明す
る。図6は従来のコンピュータの構成を示すブロック図
である。図6において、コンピュータ1は中央処理装置
であるCPU3と、主記憶であるメモリ4と、ハードデ
ィスクドライブであるHDD5と、CD−ROMドライ
ブ6等を備えている。さらに、コンピュータ1はディス
プレイ装置であるCRT2、入力装置であるキーボード
7およびマウス8等がIOバスを介して接続されてい
る。通常、デバッグを行うためのプログラム(以下、デ
バッガという)はHDD5やCD−ROMドライブ6に
装着されたCD−ROMに記憶保持されており、必要に
応じてメモリ4に読み出されて実行される。
First, a conventional computer will be described. FIG. 6 is a block diagram showing the configuration of a conventional computer. 6, the computer 1 includes a CPU 3 as a central processing unit, a memory 4 as a main memory, an HDD 5 as a hard disk drive, a CD-ROM drive 6, and the like. Further, the computer 1 is connected with a CRT 2 as a display device, a keyboard 7 and a mouse 8 as input devices via an IO bus. Usually, a program for debugging (hereinafter, referred to as a debugger) is stored and held in the HDD 5 or a CD-ROM mounted on the CD-ROM drive 6, and is read out to the memory 4 and executed as needed. .

【0004】次に、ソースプログラムのコンパイルから
デバッグまでの一連の手順について図面を参照して説明
する。図7は使用者によって作成されたソースプログラ
ムをコンパイルしてからデバッグを行うまでの一連の手
順を示す説明図である。
Next, a series of procedures from compiling a source program to debugging will be described with reference to the drawings. FIG. 7 is an explanatory diagram showing a series of procedures from compiling a source program created by a user to debugging.

【0005】図7に示すように、この例ではアセンブラ
言語で記述された4個のソースファイル(.ASM)に
対してそれぞれ共通のファイル(.INC)がインクル
ードされている。そして、各ソースファイルはコンパイ
ラによってコンパイルされ、それぞれ機械語から成る4
個のオブジェクトモジュール(OM)に変換される。そ
の後、各オブジェクトモジュールはリンカによってリン
クされ、デバッグ情報およびロードモジュール(LM)
が作成される。
As shown in FIG. 7, in this example, a common file (.INC) is included for each of four source files (.ASM) described in the assembler language. Then, each source file is compiled by a compiler, and each source file is composed of a machine language.
Is converted into the number of object modules (OM). Thereafter, each object module is linked by the linker, and the debug information and the load module (LM)
Is created.

【0006】次に、デバッグ作業について詳細に説明す
る。デバッグ作業は、図7に記載されているデバッグ情
報およびロードモジュールと、デバッグ作業を実施する
ためのツールであるデバッガとを用いて行われる。ま
ず、アセンブラ言語で記述されたソ−スプログラムの具
体例(ファイル名はtest.asmとする)を示す。
なお、左端に記載されている数字は行番号を示し、これ
ら行番号の右側にソースプログラムが記載されている。
Next, the debugging operation will be described in detail. The debugging operation is performed using the debug information and the load module shown in FIG. 7 and a debugger which is a tool for performing the debugging operation. First, a specific example (file name is test.asm) of a source program described in an assembler language is shown.
The numbers on the left end indicate line numbers, and the source program is described on the right side of these line numbers.

【0007】 1 $PC(054) 2 ; 3 ;comment 4 ; 5 name imai 6 public start 7 $include ’a.inc’ 8 vect cseg at 0 9 dw start 10 11 mac01 macro 12 local l_lab 13 mov a,#TEN 14 l_lab: 15 dec a 16 bnz $l_lab 17 endm 18 19 mac02 macro 20 local loop 21 22 mov a,#TEN 23 loop: 24 dec a 25 bnz $loop 26 endm 27 28 text cseg 29 start: 30 nop 31 mac01 32 nop 33 mac02 34 nop 35 call !func 36 nop 37 $include ’b.inc’ 38 $include ’g.inc’ 39 $include ’c.inc’ 40 nop 41 work: 42 nop 43 func: 44 nop 45 ret 46 end1 @PC (054) 2; 3; comment 4; 5 name imai 6 public start 7 $ include 'a. inc '8 vector cseg at 09 dw start 10 11 mac01 macro 12 local l_lab 13 mova, #TEN 14 l_lab: 15 deca 16lob albomac embalm 21m02a1m18m18 loop: 24 dec a 25 bnz $ loop 26 endm 27 28 text cseg 29 start: 30 nop 31 mac01 32 nop 33 mac02 34 nop 35 call! func 36 nop 37 'include' b. inc '38' include 'g. inc '39' include 'c. inc '40 nop 41 work: 42 nop 43 func: 44 nop 45 ret 46 end

【0008】ソースプログラムtest.asm中には
「mov」,「dec」,「ret」等のアセンブラ言
語による命令の他に、複数のシンボルが記載されてい
る。
The source program test. In the asm, a plurality of symbols are described in addition to instructions in assembler language such as "mov", "dec", and "ret".

【0009】ここで、「start」の属性はパブリッ
ク(以下、パブリックシンボルという)である。したが
って、図7に示した複数のソースファイル(.ASM)
間において共通に使用されるシンボルである。また、
「vect,text」はセグメントシンボル、「ma
c01,mac02」はマクロシンボルを表し、それぞ
れ、ソースファイル「test.asm」内のみで有効
な属性がローカルのシンボル(以下、ローカルシンボル
という)である。同様に、「l_lab,loop,w
ork,func」もローカルシンボルである。
Here, the attribute of "start" is public (hereinafter, referred to as public symbol). Therefore, a plurality of source files (.ASM) shown in FIG.
This is a symbol that is commonly used between. Also,
“Vector, text” is a segment symbol, and “ma
“c01, mac02” represents a macro symbol, and the attribute effective only in the source file “test.asm” is a local symbol (hereinafter, referred to as a local symbol). Similarly, “l_lab, loop, w
“ork, func” is also a local symbol.

【0010】ところで、test.asmには、4つの
ファイル(a.inc、b.inc、g.inc、c.
inc)がインクルードされている。これらのインクル
ードファイルは、図7に示したようにtest.asm
だけでなく複数のソースファイル(.ASM)によって
共有される。例えば、a.incの具体例は以下のよう
になる。
By the way, test. Asm has four files (a. inc, b. inc, g. inc, c.
inc) is included. These include files are stored in test. asm
As well as shared by multiple source files (.ASM). For example, a. The specific example of inc is as follows.

【0011】 1 TEN EQU 10 2 FIVE EQU 5 ・ ・ 以下、省略 ・[0011] 1 TEN EQU 10 2 FIVE EQU 5 ···

【0012】ここで、「TEN」は値が「10」である
EQUシンボルであり、その属性はローカルである。し
たがって、このEQUシンボル「TEN」はtest.
asm内においてのみ通用するシンボルである。同様
に、「FIVE」は値が「5」であるEQUシンボルで
ある。すなわち、インクルードファイルによってインク
ルードされたEQUシンボルは、インクルード先の各ソ
ースファイルにおいてローカルシンボルとして扱われ
る。
Here, "TEN" is an EQU symbol whose value is "10", and its attribute is local. Therefore, this EQU symbol “TEN” is assigned to test.
This symbol is valid only within the asm. Similarly, "FIVE" is an EQU symbol whose value is "5". That is, the EQU symbol included by the include file is treated as a local symbol in each included source file.

【0013】さて、このように記載されたソースプログ
ラムは、デバッグ時には所定の形式のデータ構造に変換
されてからデバッグが行われる。図8はデバッグ時に作
成される従来のデータ構造を示すブロック図である。図
8において、デバッグ情報中のシンボルプログラムリス
トからプログラム情報インデックス10が作成される。
このプログラム情報インデックス10はプログラム情報
11,12等が格納されているアドレスを指すポインタ
の集合である。
The source program described in this manner is converted into a data structure of a predetermined format at the time of debugging and then debugged. FIG. 8 is a block diagram showing a conventional data structure created at the time of debugging. In FIG. 8, a program information index 10 is created from a symbol program list in the debug information.
The program information index 10 is a set of pointers indicating addresses where program information 11, 12 and the like are stored.

【0014】プログラム情報11は、図6のメモリ4か
らデバッガにダウンロードされたロードモジュールに関
する情報の集合である。すなわち、外部関数情報インデ
ックス13,外部シンボル情報インデックス18,シン
ボル/アドレス対応情報インデックス20を指すポイン
タを備えている。
The program information 11 is a set of information on load modules downloaded from the memory 4 in FIG. 6 to the debugger. That is, it has pointers to the external function information index 13, the external symbol information index 18, and the symbol / address correspondence information index 20.

【0015】外部関数情報インデックス13は、関数情
報14を指すポインタの集合である。関数情報14は、
引数情報テーブル15とローカル変数情報インデックス
16を指すポインタの集合である。なお、ローカル変数
情報インデックス16は、ローカル変数に関するシンボ
ル情報であるローカル変数情報17を指すポインタによ
って構成されている。
The external function information index 13 is a set of pointers to the function information 14. The function information 14 is
It is a set of pointers indicating the argument information table 15 and the local variable information index 16. Note that the local variable information index 16 is configured by a pointer that points to local variable information 17 that is symbol information on local variables.

【0016】外部シンボル情報インデックス18は、外
部シンボル情報19を指すポインタの集合である。シン
ボル/アドレス対応情報インデックス20は、シンボル
/アドレス対応情報21を指すポインタの集合である。
シンボル/アドレス対応情報21はシンボルの名称とア
ドレスに関する情報とを備えている。
The external symbol information index 18 is a set of pointers pointing to the external symbol information 19. The symbol / address correspondence information index 20 is a set of pointers to the symbol / address correspondence information 21.
The symbol / address correspondence information 21 includes information on the symbol name and the address.

【0017】また、プログラム情報12は、プログラム
情報11と同様の構成をしている。ただし、図8におけ
るプログラム情報12は、さらにファイル情報インデッ
クス23を備えている。ファイル情報インデックス23
はソースファイルに関する情報であるファイル情報24
を指すポインタの集合である。
The program information 12 has the same configuration as the program information 11. However, the program information 12 in FIG. 8 further includes a file information index 23. File information index 23
Is file information 24 which is information about the source file.
Is a set of pointers to

【0018】ファイル情報24は、静的関数情報インデ
ックス26、静的シンボル情報インデックス30、マク
ロ情報インデックス32、セグメント情報インデックス
34、インクルード情報インデックス36を指すポイン
タの集合によって構成されている。静的関数情報インデ
ックス26は、静的関数情報27を指すポインタによっ
て構成され、この静的関数情報27は引数情報テーブル
28とローカル変数情報テーブル29とを指している。
The file information 24 is constituted by a set of pointers indicating a static function information index 26, a static symbol information index 30, a macro information index 32, a segment information index 34, and an include information index 36. The static function information index 26 is configured by a pointer pointing to the static function information 27, and the static function information 27 points to the argument information table 28 and the local variable information table 29.

【0019】また、静的シンボル情報インデックス3
0、マクロ情報インデックス32、セグメント情報イン
デックス34、インクルード情報インデックス36は、
それぞれ静的シンボル情報31、マクロ情報33、セグ
メント情報35、インクルード情報37を指すポインタ
によって構成されている。さらに、ファイル情報24
は、ソースプログラムの行情報である補助行情報25を
指している。なお、シンボルロード時には図の斜線で覆
われた領域が形成され、シンボルアクセス時には図の斜
線で覆われていない部分が形成される。
The static symbol information index 3
0, macro information index 32, segment information index 34, and include information index 36
Each is constituted by pointers indicating static symbol information 31, macro information 33, segment information 35, and include information 37. Further, file information 24
Indicates auxiliary line information 25 which is line information of the source program. At the time of symbol loading, an area covered by hatching is formed, and at the time of symbol access, a portion not covered by hatching is formed.

【0020】次に、従来のデバッグの具体的な手順につ
いて説明する。図9は従来のデバッグの手順を示す説明
図である。なお、デバッグにおいてはシンボル/アドレ
ス対応情報インデックス20およびシンボル/アドレス
対応情報21が使用される。
Next, a specific procedure of the conventional debugging will be described. FIG. 9 is an explanatory diagram showing a conventional debugging procedure. In debugging, the symbol / address correspondence information index 20 and the symbol / address correspondence information 21 are used.

【0021】まず、デバッグの開始とともにメモリ4内
に所定の大きさの作業領域が確保され、シンボルをロー
ドする毎にシンボル/アドレス対応情報インデックス2
0およびシンボル/アドレス対応情報21が形成され
る。図9においては既にローカルシンボルL1,L2、
パブリックシンボルP1,P2等が作業領域に記憶保持
されている。そして、いま新たにローカルシンボルL2
が読み出されたものとする。
First, at the start of debugging, a work area of a predetermined size is secured in the memory 4 and every time a symbol is loaded, the symbol / address correspondence information index 2
0 and symbol / address correspondence information 21 are formed. In FIG. 9, the local symbols L1, L2,
Public symbols P1, P2, etc. are stored and held in the work area. And now, a new local symbol L2
Is read.

【0022】するとこの読み出されたシンボルL2は、
シンボルP3の次のアドレスに記憶保持される。したが
って、作業領域の2番目のアドレスと7番目のアドレス
とにはシンボルL2が重複して記憶保持されることにな
る。
Then, the read symbol L2 is
It is stored and held at the address next to the symbol P3. Therefore, the symbol L2 is redundantly stored and held at the second address and the seventh address of the work area.

【0023】その後、全てのシンボルが読み出されると
作業領域に一時的に記憶保持されている全てのシンボル
はファイル毎に最終形に分散される。すなわち、例えば
A.ASMのローカルシンボルはL1,L2,L5、
B.ASMのローカルシンボルはL3,L2,L6、
C.ASMのローカルシンボルはL4,L2,L7、パ
ブリックシンボルはP1,P2,P3というように分散
される。ところが、上述のとおり、A.ASM,B.A
SM,C.ASMにはそれぞれローカルシンボルL2が
重複して記憶保持されている。
Thereafter, when all the symbols are read, all the symbols temporarily stored and held in the work area are distributed to the final form for each file. That is, for example, ASM local symbols are L1, L2, L5,
B. ASM local symbols are L3, L2, L6,
C. ASM local symbols are distributed as L4, L2 and L7, and public symbols are distributed as P1, P2 and P3. However, as described above, A.I. ASM, B .; A
SM, C.I. In the ASM, the local symbol L2 is redundantly stored and held.

【0024】[0024]

【発明が解決しようとする課題】このように、従来は言
語系の出力したシンボル(例えば、EQUシンボル等)
を逐次全て読み込んでいたため、同名同値のシンボルを
重複して読み込むことがあり、デバッグ作業に多くのメ
モリを要していた。そのため、パーソナルコンピュータ
等のようにメモリの容量に制限がある環境下では、作業
領域として確保できる大きさが限られているため全ての
シンボルをメモリに読み込むことができず、大規模なプ
ログラム開発が困難であるという問題点があった。本発
明は、このような課題を解決するためのものであり、少
ないメモリ容量で大規模なデバッグ作業を実施すること
ができるデバッグ方法およびデバッグプログラムを記録
する記録媒体を提供することを目的とする。
As described above, conventionally, symbols output from a language system (for example, EQU symbols, etc.)
, The symbols having the same name and the same value were sometimes read in duplicate, and a lot of memory was required for debugging. Therefore, in an environment where the memory capacity is limited, such as a personal computer, the size that can be secured as a work area is limited. There was a problem that it was difficult. An object of the present invention is to solve such a problem, and an object of the present invention is to provide a debugging method and a recording medium for recording a debugging program which can perform a large-scale debugging operation with a small memory capacity. .

【0025】[0025]

【課題を解決するための手段】このような目的を達成す
るために、本発明に係るデバッグ方法およびデバッグプ
ログラム記録する記録媒体は、各ソースファイル間で共
通して使用されているシンボルを1個だけ使ってデバッ
グ作業を実施するものである。このように構成すること
により本発明は、同一シンボルを重複して読み込むこと
無く、少ないメモリ容量でデバッグを実施することがで
きる。
In order to achieve the above object, a debugging method and a recording medium for recording a debugging program according to the present invention provide one symbol commonly used between source files. Is used to perform debugging work. With this configuration, the present invention can perform debugging with a small memory capacity without reading the same symbol repeatedly.

【0026】[0026]

【発明の実施の形態】次に、本発明の一つの実施の形態
について図を用いて説明する。なお、本発明におけるコ
ンピュータ等の構成は、図6と同じ構成をしており、デ
バッガ等のプログラムはHDD5またはCD−ROMド
ライブ6に装着されているCD−ROMに記憶保持され
ている。したがって、本発明に係るデバッグプログラム
はCD−ROM等の記録媒体に記録した状態で提供する
ことができる。そして、このCD−ROMをCD−RO
Mドライブ6に装着することにより、デバッグプログラ
ムは必要に応じてメモリ4に読み込まれ実行される。
Next, one embodiment of the present invention will be described with reference to the drawings. The configuration of the computer and the like according to the present invention is the same as that of FIG. 6, and the program such as the debugger is stored and held in the HDD 5 or the CD-ROM mounted on the CD-ROM drive 6. Therefore, the debug program according to the present invention can be provided in a state recorded on a recording medium such as a CD-ROM. Then, insert this CD-ROM into CD-RO
By attaching the debug program to the M drive 6, the debug program is read into the memory 4 and executed as needed.

【0027】図1はデバッグ時に作成されるデータ構造
を示すブロック図である。図1において、図8と同一符
号の部品は同一または同等の部品を示す。また、ハッシ
ュテーブル22は、読み出したシンボルをシンボル/ア
ドレス対応情報インデックス20に登録する前に、ハッ
シュ法によって登録するためのテーブルである。
FIG. 1 is a block diagram showing a data structure created at the time of debugging. In FIG. 1, components having the same reference numerals as those in FIG. 8 indicate the same or equivalent components. The hash table 22 is a table for registering the read symbols by the hash method before registering them in the symbol / address correspondence information index 20.

【0028】本発明に係るデバッグの手順について説明
する。図2はデバッグの一連の手順を示すフローチャー
トである。ステップ101において、CPU3はデバイ
ス依存情報を読み込む。すなわち、ターゲットCPUの
依存情報を蓄えたデバイスファイルをHDD5からメモ
リ4に読み込む。このデバイスファイルは、1個のCP
Uにつき1ファイルずつ存在する。ただし、途中でエラ
ーが発生すると処理を終了する。
Next, a debugging procedure according to the present invention will be described. FIG. 2 is a flowchart showing a series of debugging procedures. In step 101, the CPU 3 reads device-dependent information. That is, the device file storing the dependency information of the target CPU is read from the HDD 5 into the memory 4. This device file contains one CP
One file exists for each U. However, if an error occurs in the middle, the process ends.

【0029】ステップ102において、操作者はキーボ
ード7またはマウス8を使ってデバッグ条件を入力す
る。すなわち、CRT2の画面上にダイアログボックス
が表示され、操作者によってデバッグするターゲットC
PUや電圧等の設定が入力される。
In step 102, the operator uses the keyboard 7 or the mouse 8 to input debug conditions. That is, a dialog box is displayed on the screen of the CRT 2 and the target C to be debugged by the operator is displayed.
Settings such as PU and voltage are input.

【0030】ステップ103において、CPU3はハー
ドウェアの初期化を実施する。すなわち、インサーキッ
トエミュレータ(以下、ICEという)(図示せず)と
通信するための設定を行う。ターゲットCPUの情報や
モニタプログラムをHDD5からICEにダウンロード
する。ただし、途中でエラーが発生すると処理を終了す
る。
In step 103, the CPU 3 performs hardware initialization. That is, a setting for communicating with an in-circuit emulator (hereinafter, referred to as ICE) (not shown) is performed. The information of the target CPU and the monitor program are downloaded from the HDD 5 to the ICE. However, if an error occurs in the middle, the process ends.

【0031】ステップ104において、CPU3はデバ
ッガ本体の初期化を実施する。すなわち、デバッガのG
UI部以下のモジュールを全て起動し、デバッガのウィ
ンドウやメニューをCRT2の画面に表示する。ただ
し、途中でエラーが発生すると処理を終了する。ステッ
プ105において、CPU3はメッセージ受信ループを
実施する。すなわち、操作者がキーボード7またはマウ
ス8を使って終了メニューを選択するとステップは10
6へ移行する。また、LMロードメニューが選択される
とステップは107へ移行する。ただし、途中でエラー
が発生すると処理を終了する。
In step 104, the CPU 3 initializes the debugger body. That is, G of the debugger
All the modules below the UI section are activated, and the debugger window and menu are displayed on the CRT 2 screen. However, if an error occurs in the middle, the process ends. In step 105, the CPU 3 executes a message receiving loop. That is, when the operator selects the end menu using the keyboard 7 or the mouse 8, the step is 10 steps.
Move to 6. When the LM load menu is selected, the step moves to 107. However, if an error occurs in the middle, the process ends.

【0032】ステップ106において、CPU3は操作
者によって終了メニューが選択されたため終了処理を実
施する。ステップ107において、CPU3は操作者に
よってLMロード処理が選択されたためLMロード処理
を実施する。なおLMロード処理の詳細は後述する。
In step 106, the CPU 3 executes an end process because the end menu is selected by the operator. In step 107, the CPU 3 executes the LM loading process because the operator has selected the LM loading process. The details of the LM loading process will be described later.

【0033】次に、LMロード処理について詳細に説明
する。図3はLMロード処理の手順を示すフローチャー
トである。ステップ201において、CPU3はHDD
5からデバッグ対象であるロードモジュールのコードお
よびデータを、メモリ4にダウンロードする。ステップ
202において、CPU3はデバッグ情報からデバッグ
用のシンボルプログラムリストをデバッガに読み込む。
Next, the LM load processing will be described in detail. FIG. 3 is a flowchart showing the procedure of the LM load process. In step 201, the CPU 3
From 5, the code and data of the load module to be debugged are downloaded to the memory 4. In step 202, the CPU 3 reads a symbol program list for debugging from the debug information into the debugger.

【0034】次に、シンボルのロード手順について詳細
に説明する。図4はシンボルのロード手順を示すフロー
チャートである。ステップ301において、CPU3は
デバッグ情報からシンボルを全て読み込んだか否かを判
定する。全て読み込んでいればステップ308へ移行
し、全て読み込んでいなければステップ302へ移行す
る。ステップ302において、CPU3はシンボル情報
をシンボルアドレス/対応情報21の所定のアドレスに
読み込み、シンボル/アドレス対応情報インデックス2
0にはそのアドレスを格納する。
Next, the symbol loading procedure will be described in detail. FIG. 4 is a flowchart showing a symbol loading procedure. In step 301, the CPU 3 determines whether all the symbols have been read from the debug information. If all of them have been read, the process proceeds to step 308, and if not, the process proceeds to step 302. In step 302, the CPU 3 reads the symbol information into a predetermined address of the symbol address / correspondence information 21, and reads the symbol / address correspondence information index 2
0 stores the address.

【0035】ステップ303において、CPU3は読み
込んだシンボルがEQUシンボルか否かを判定する。E
QUシンボルであればステップ304へ移行し、EQU
シンボルでなければステップ301へ移行する。ステッ
プ304において、CPU3は読み込んだEQUシンボ
ルが既にハッシュテーブル22に登録されているか否か
を検索する。ハッシュテーブルに登録されていればステ
ップ306へ移行し、登録されていなければステップ3
05へ移行する。
In step 303, the CPU 3 determines whether the read symbol is an EQU symbol. E
If it is a KU symbol, proceed to step 304,
If it is not a symbol, the process proceeds to step 301. In step 304, the CPU 3 searches whether or not the read EQU symbol is already registered in the hash table 22. If it is registered in the hash table, the process proceeds to step 306;
Move to 05.

【0036】ステップ305において、CPU3はEQ
Uシンボルをハッシュテーブル22に登録して、ステッ
プ301へ移行する。ステップ306において、CPU
3はハッシュテーブル22に同名同値のシンボルがある
か否かを判定する。同名同値のシンボルがあればステッ
プは301へ移行し、なければ307へ移行する。
At step 305, the CPU 3 sets the EQ
The U symbol is registered in the hash table 22, and the process proceeds to step 301. In step 306, the CPU
No. 3 determines whether there is a symbol having the same name and the same value in the hash table 22. If there is a symbol having the same name and the same value, the process proceeds to step 301; otherwise, the process proceeds to 307.

【0037】ステップ307において、CPU3は既に
登録されている同名同値のシンボルの属性をパブリック
に変更する。ステップ308において、CPU2は作業
領域から最終形にシンボルに関する情報を分散する。
In step 307, the CPU 3 changes the attribute of the registered symbol having the same name and the same value to public. In step 308, the CPU 2 distributes information on symbols from the work area to the final form.

【0038】図5はデバッグ手順を示す説明図である。
なお、図9の場合と同様にデバッグにおいては、シンボ
ル/アドレス対応情報インデックス20およびシンボル
/アドレス対応情報21とが使用される。さらに、本発
明においては、ハッシュテーブル22も使用される。
FIG. 5 is an explanatory diagram showing a debugging procedure.
Note that the symbol / address correspondence information index 20 and the symbol / address correspondence information 21 are used in debugging, as in the case of FIG. Further, in the present invention, a hash table 22 is also used.

【0039】デバッグの開始とともにメモリ4内に所定
の大きさの作業領域が確保され、シンボルをロードする
毎にシンボル/アドレス対応情報インデックス20およ
びシンボル/アドレス対応情報21が形成される。さら
に、本発明においてはハッシュテーブル22(図5には
図示せず)も作成され、読み出されたシンボルはまずこ
のハッシュテーブルに登録されているか否かの判定が行
われる。
At the start of debugging, a work area of a predetermined size is secured in the memory 4 and a symbol / address correspondence information index 20 and a symbol / address correspondence information 21 are formed every time a symbol is loaded. Further, in the present invention, a hash table 22 (not shown in FIG. 5) is also created, and it is first determined whether or not the read symbols are registered in the hash table.

【0040】さて、図5に示すとおり、作業領域には既
にローカルシンボルL1,L2、パブリックシンボルP
1,P2等が記憶保持されている。いま、新たにローカ
ルシンボルL2が読み出されたものとする。
Now, as shown in FIG. 5, local symbols L1 and L2 and public symbols P are already stored in the work area.
1, P2, etc. are stored. Now, assume that the local symbol L2 is newly read.

【0041】するとこの読み出されたローカルシンボル
L2は、ハッシュテーブル22を検索することによって
既に2番目のアドレスに登録されていることがわかって
いる。そのため、新たに追加登録は行わず、既に登録さ
れている2番目のローカルシンボルL2の属性をパブリ
ックに変更する。すなわち、ローカルシンボルL2をパ
ブリックシンボルP4とする。
Then, by searching the hash table 22, it is known that the read local symbol L2 has already been registered at the second address. Therefore, no additional registration is newly performed, and the attribute of the second local symbol L2 already registered is changed to public. That is, the local symbol L2 is set as the public symbol P4.

【0042】その後、全てのシンボルが読み出される
と、作業領域に一時的に記憶保持されている全てのシン
ボルを、ファイル毎に最終形に分散する。すなわち、例
えばA.ASMのローカルシンボルはL1,L5、B.
ASMのローカルシンボルはL3,L6、C.ASMの
ローカルシンボルはL4,L7、パブリックシンボルは
P1,P2,P3,P4というように分散される。以上
の結果、同一のローカルシンボルが、重複して記憶保持
されることはない。
Thereafter, when all the symbols are read, all the symbols temporarily stored in the work area are distributed to the final form for each file. That is, for example, ASM local symbols are L1, L5, B.
ASM local symbols are L3, L6, C.I. ASM local symbols are distributed as L4 and L7, and public symbols are distributed as P1, P2, P3 and P4. As a result, the same local symbol is not redundantly stored and held.

【0043】[0043]

【発明の効果】このように本発明は、複数のソースファ
イル間で用いられた共通シンボルを重複して記憶するこ
とがないため、少容量の主記憶しかなくても大規模なデ
バッグを実施することができる。
As described above, according to the present invention, a common symbol used between a plurality of source files is not redundantly stored, so that large-scale debugging can be performed even with a small-capacity main memory. be able to.

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

【図1】 本発明の一つの実施の形態を示すブロック図
である。
FIG. 1 is a block diagram showing one embodiment of the present invention.

【図2】 本発明に係るデバッグの手順を示すフローチ
ャートである。
FIG. 2 is a flowchart showing a debugging procedure according to the present invention.

【図3】 本発明に係るデバッグの手順を示すフローチ
ャートである。
FIG. 3 is a flowchart showing a debugging procedure according to the present invention.

【図4】 本発明に係るデバッグの手順を示すフローチ
ャートである。
FIG. 4 is a flowchart showing a debugging procedure according to the present invention.

【図5】 本発明に係るデバッグの手順を示す説明図で
ある。
FIG. 5 is an explanatory diagram showing a debugging procedure according to the present invention.

【図6】 コンピュータの構成を示すブロック図であ
る。
FIG. 6 is a block diagram illustrating a configuration of a computer.

【図7】 コンパイルからデバッグまでの手順を示す説
明図である。
FIG. 7 is an explanatory diagram showing a procedure from compiling to debugging.

【図8】 従来例を示すブロック図である。FIG. 8 is a block diagram showing a conventional example.

【図9】 従来例に係るデバッグの手順を示す説明図で
ある。
FIG. 9 is an explanatory diagram showing a debugging procedure according to a conventional example.

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

10,12…プログラム情報インデックス、11…プロ
グラム情報、13…外部関数情報インデックス、14…
外部関数情報、15…引数情報テーブル、16…ローカ
ル変数情報インデックス、17…ローカル変数情報イン
デックス、18…外部シンボル情報インデックス、19
…外部シンボル情報、20…シンボル/アドレス対応情
報インデックス、21…シンボルアドレス対応情報、2
2…ハッシュテーブル、23…ファイル情報、24…フ
ァイル情報、25…補助行情報、26…静的関数情報イ
ンデックス、27…静的関数情報、28…引数情報テー
ブル、29…ローカル変数情報テーブル、30…静的シ
ンボル情報インデックス、31…静的シンボル情報、3
2…マクロ情報インデックス、33…マクロ情報、34
…セグメント情報インデックス、35…セグメント情
報、36…インクルード情報インデックス、37…イン
クルード情報。
10, 12 ... program information index, 11 ... program information, 13 ... external function information index, 14 ...
External function information, 15: Argument information table, 16: Local variable information index, 17: Local variable information index, 18: External symbol information index, 19
... external symbol information, 20 ... symbol / address correspondence information index, 21 ... symbol address correspondence information, 2
2 ... Hash table, 23 ... File information, 24 ... File information, 25 ... Auxiliary line information, 26 ... Static function information index, 27 ... Static function information, 28 ... Argument information table, 29 ... Local variable information table, 30 ... Static symbol information index, 31 ... Static symbol information, 3
2 macro information index, 33 macro information, 34
... Segment information index, 35 ... Segment information, 36 ... Include information index, 37 ... Include information.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数のソ−スファイルを所定の言語系に
よってそれぞれオブジェクトモジュールに変換し、これ
らのオブジェクトモジュールをリンクすることによって
得られたデバッグ情報およびロードモジュールを用いて
デバッグ作業を実施するデバッグ方法において、 前記各ソースファイル間で共通して使用されているシン
ボルを1個だけ使ってデバッグ作業を実施することを特
徴とするデバッグ方法。
1. A debugger for converting a plurality of source files into object modules according to a predetermined language system, and performing a debug operation using debug information and a load module obtained by linking these object modules. The debugging method according to claim 1, wherein the debugging is performed by using only one symbol commonly used between the source files.
【請求項2】 請求項1において、 前記デバッグ情報からシンボル情報を読み込む毎に、こ
のシンボル情報が所定のハッシュテーブルに登録されて
いるか否かを判定し、 前記ハッシュテーブルに登録されていないときは、この
シンボル情報を前記ハッシュテーブルに新たに登録し、 前記ハッシュテーブルに登録されているときは、このシ
ンボル情報を前記ハッシュテーブルに登録する代わり
に、以前に登録された同一シンボルの属性をパブリック
に変換することを特徴とするデバッグ方法。
2. The method according to claim 1, wherein each time symbol information is read from the debug information, it is determined whether or not the symbol information is registered in a predetermined hash table. When the symbol information is newly registered in the hash table, and when the symbol information is registered in the hash table, the attribute of the same symbol previously registered is made public instead of registering the symbol information in the hash table. A debugging method characterized by converting.
【請求項3】 複数のソ−スファイルを所定の言語系に
よってそれぞれオブジェクトモジュールに変換し、これ
らのオブジェクトモジュールをリンクすることによって
得られたデバッグ情報およびロードモジュールを用いて
デバッグ作業を実施するデバッグプログラムを記録する
記録媒体において、 前記各ソースファイル間で共通して使用されているシン
ボルを1個だけ使ってデバッグ作業を実施することを特
徴とするデバッグプログラムを記録する記録媒体。
3. A debugger for converting a plurality of source files into object modules according to a predetermined language system, and performing a debugging operation using debug information and a load module obtained by linking these object modules. A recording medium for recording a debug program, wherein a debug operation is performed by using only one symbol commonly used between the source files.
【請求項4】 請求項3において、 前記デバッグ情報からシンボル情報を読み込む毎に、こ
のシンボル情報が所定のハッシュテーブルに登録されて
いるか否かを判定し、 前記ハッシュテーブルに登録されていないときは、この
シンボル情報を前記ハッシュテーブルに新たに登録し、 前記ハッシュテーブルに登録されているときは、このシ
ンボル情報を前記ハッシュテーブルに登録する代わり
に、以前に登録された同一シンボルの属性をパブリック
に変換することを特徴とするデバッグプログラムを記録
する記録媒体。
4. The method according to claim 3, wherein each time symbol information is read from the debug information, it is determined whether or not the symbol information is registered in a predetermined hash table. When the symbol information is newly registered in the hash table, and when the symbol information is registered in the hash table, the attribute of the same symbol previously registered is made public instead of registering the symbol information in the hash table. A recording medium for recording a debug program characterized by conversion.
JP09112092A 1997-04-30 1997-04-30 Debugging method and recording medium for recording debug program Expired - Fee Related JP3077627B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09112092A JP3077627B2 (en) 1997-04-30 1997-04-30 Debugging method and recording medium for recording debug program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09112092A JP3077627B2 (en) 1997-04-30 1997-04-30 Debugging method and recording medium for recording debug program

Publications (2)

Publication Number Publication Date
JPH10301804A true JPH10301804A (en) 1998-11-13
JP3077627B2 JP3077627B2 (en) 2000-08-14

Family

ID=14577919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09112092A Expired - Fee Related JP3077627B2 (en) 1997-04-30 1997-04-30 Debugging method and recording medium for recording debug program

Country Status (1)

Country Link
JP (1) JP3077627B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11734457B2 (en) * 2019-12-23 2023-08-22 Intel Corporation Technology for controlling access to processor debug features

Also Published As

Publication number Publication date
JP3077627B2 (en) 2000-08-14

Similar Documents

Publication Publication Date Title
EP0785510B1 (en) Program debugging system for debugging a program having a graphical user interface
EP1113367B1 (en) Automated regression testing of workstation software
US8752020B2 (en) System and process for debugging object-oriented programming code leveraging runtime metadata
US7089535B2 (en) Code coverage with an integrated development environment
WO2007145670A2 (en) Static instrumentation macros for fast declaration free dynamic probes
EP0111952B1 (en) Verification of a processor architecture having a partial instruction set
JP2000122886A (en) Program production system of semiconductor testing device
JP2004164554A (en) Device and method for executing and monitoring program
US6330714B1 (en) Method and computer program product for implementing redundant lock avoidance
US8230413B2 (en) Detecting incorrect versions of files
US7441158B1 (en) Embedded hardware debugging tool and associated method
US20070150866A1 (en) Displaying parameters associated with call statements
US20060074625A1 (en) Program development suport device, program execution device, compile method and debug method
US20020129336A1 (en) Automatic symbol table selection in a multi-cell environment
US6611924B1 (en) Reducing code size of debug output statements
JPH0766342B2 (en) Program test equipment
JP3077627B2 (en) Debugging method and recording medium for recording debug program
JP3300090B2 (en) Test program execution method
US20050050524A1 (en) Generating software test information
US7178064B2 (en) Debug device, debug method and storage medium
JP2004287869A (en) Program execution monitoring device and method
JP2002014847A (en) Device for checking program and method for the same and recording medium with checking program stored
WO2024069730A1 (en) Debugging device and debugging method
RU2306597C2 (en) Method for linking (assembling) software
JP4149047B2 (en) Simulator

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080616

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees