JP2001344128A - Setting method for disassemble display address and recording medium - Google Patents

Setting method for disassemble display address and recording medium

Info

Publication number
JP2001344128A
JP2001344128A JP2000166220A JP2000166220A JP2001344128A JP 2001344128 A JP2001344128 A JP 2001344128A JP 2000166220 A JP2000166220 A JP 2000166220A JP 2000166220 A JP2000166220 A JP 2000166220A JP 2001344128 A JP2001344128 A JP 2001344128A
Authority
JP
Japan
Prior art keywords
address
disassembly
start address
display
code
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
JP2000166220A
Other languages
Japanese (ja)
Inventor
Fumiko Nakagawa
文子 中川
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems Co Ltd
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 Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2000166220A priority Critical patent/JP2001344128A/en
Publication of JP2001344128A publication Critical patent/JP2001344128A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To make an accurate analysis by referring the assemble code of a multi-byte code as a lump, and displaying its top address even when an intermediate address of the multi-byte code is specified as a display address. SOLUTION: Symbols are retrieved in the descending direction from the disassemble display top address specified by a user (process step S12), and the address of a first detected symbol is set as the analysis start address of an object code (S14). When no symbol is detected, 00H is set as the analysis start address of the object code (S15). An analysis is started from the set analysis start address of the object code, the top address belonging to the assemble code including the object code indicated by the user-specified disassemble display address is set as a disassemble display address (S16), and its address is displayed (S17).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は逆アセンブル表示ア
ドレスの設定方法に係わり、特に指定された表示開始ア
ドレスが、複数バイトのアセンブル・コードの途中のア
ドレスであったときでも、正しいアセンブル・コードを
表示させることが可能な逆アセンブル表示アドレスの設
定方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of setting a disassembly display address, and particularly to a method of setting a correct assemble code even when a designated display start address is an address in the middle of a plurality of bytes of an assemble code. The present invention relates to a method of setting a disassembly display address that can be displayed.

【0002】[0002]

【従来の技術】半導体素子の微細化の進展に伴い、半導
体素子で構成されるマイクロコンピュータの機能も複雑
かつ、大規模化し、家電製品を始めパーソナルコンピュ
ータやコピー機等のOA関連機器、あるいは工業用ロボ
ットや自動化生産設備等に広く利用されている。
2. Description of the Related Art With the advance of miniaturization of semiconductor elements, the functions of microcomputers composed of semiconductor elements have become complicated and large-scale, and OA-related devices such as home appliances, personal computers and copy machines, or industrial equipment have been developed. Robots and automated production equipment.

【0003】これらの機器に応用されるマイクロコンピ
ュータの対象とするプログラム容量も年々増大してお
り、これらを搭載するマイコン応用製品開発も仕様の複
雑化とともにプログラム容量の増加による開発時間の増
大となって現れている。
The program capacity targeted by microcomputers applied to these devices has been increasing year by year, and the development of microcomputer application products equipped with them has become more complicated and the development time has increased due to the increase in program capacity. It is appearing.

【0004】しかし、市場の要求に答えるためには短時
間で、複雑化したプログラム開発に対処しなければなら
ず効率的なマイコン開発支援ツールが必要となる。
[0004] However, in order to respond to market demands, it is necessary to deal with complicated program development in a short time, and an efficient microcomputer development support tool is required.

【0005】プログラム、すなわちソフト開発はコーデ
ィング、アセンブル、およびデバッグを繰り返し行って
完成するが、コーディング終了後、ホストマシンのエデ
ィタを用いてソース・プログラムを作成し、その後ソー
ス・プログラムのアセンブルを行う。
A program, that is, software development is completed by repeatedly performing coding, assembling, and debugging. After the coding is completed, a source program is created using an editor of a host machine, and then the source program is assembled.

【0006】アセンブル結果にエラーがあれば、再びエ
ディタでエラー箇所を修正し、アセンブルを行う処理の
繰り返しでエラーを取り除いた後に、デバッグ処理を行
う。このデバッグにはインサーキット・エミュレータ等
のデバッガを使用し、プログラムの流れ、割り込みや入
出力の非同期関係の検証を行った後、プログラムをライ
タを用いて不揮発性半導体メモリに書き込み、評価ツー
ルに搭載した実際のマイクロコンピュータを動作させな
がらデバッグを行っている。
If there is an error in the assembly result, the error portion is corrected again by the editor, and the error is removed by repeating the assembling process, and then the debugging process is performed. This debugger uses a debugger such as an in-circuit emulator to verify the flow of the program, the asynchronous relationship between interrupts and I / O, and then writes the program to the nonvolatile semiconductor memory using a writer and installs it in the evaluation tool. Debugging while operating the actual microcomputer.

【0007】なお、デバッガは、ホストマシンにより設
定されたオブジェクト・プログラムをターゲット・シス
テムと接続し、プログラムを実行させながらそのデバッ
グに使用する。
[0007] The debugger connects the object program set by the host machine to the target system and uses the object program for debugging while executing the program.

【0008】デバッガには、例えば、1命令ずつプログ
ラムを実行する1ステップ動作、指定のアドレスまで実
行するブレーク動作,CPUの内部レジスタおよびメモ
リ内容の表示、変更等の機能を備え、これらの機能の組
み合わせでデバッグを行っている。
The debugger has, for example, functions such as a one-step operation for executing a program one instruction at a time, a break operation for executing a program up to a specified address, and displaying and changing the contents of a CPU internal register and memory. Debugging is performed in combination.

【0009】一般に高級言語、いわゆるソース・コード
はコンパイラ・プログラムによってアセンブリ言語に変
換される。このアセンブリ言語はオブジェク・トコード
と呼ばれる2進形式のコードでコンピュータに所望の処
理を実行させるための機械語である。
Generally, a high-level language, so-called source code, is converted into an assembly language by a compiler program. This assembly language is a machine language for causing a computer to execute a desired process using a binary code called an object code.

【0010】このオブジェクト・プログラムで記述され
たプログラムのエラーを発見して修正するためのツール
として上述したデバッガがあり、このデバッガは、実行
中の対象プログラムの動作を一時停止させ、所定のコー
ドがどのようにユーザー資源に作用しているかを検証す
る。これらのユーザ資源はソース・コードで定義されそ
の値は上述したプログラムが正常に動作しないときに、
その原因究明の手がかりとしてユーザに寄与するもので
ある。
As a tool for finding and correcting an error in a program described in the object program, there is the above-described debugger. This debugger temporarily stops the operation of the target program being executed, and a predetermined code is executed. Verify how it is affecting user resources. These user resources are defined in the source code and their values are set when the above program does not work properly.
This contributes to the user as a clue for investigating the cause.

【0011】すなわち、デバッグ・システムの一般的な
構成は、オブジェクト・プログラムが実行可能なインサ
ーキット・エミュレータの情報を解析する手段、ユーザ
からの入力情報を得る入力装置、ユーザに必要な情報を
提供する表示装置、オブジェクト・コードからアセンブ
ル・コードに変換する逆アセンブル機能をもつデバッガ
からなり、リセット・アドレス(プログラムのスタート
・アドレス)から表示する場合を除き、インサーキット
・エミュレータとデバッガ間の通信に時間を要するた
め、ユーザの指定したアドレスがどの位置を示していて
も、そのアドレスの示す位置からオブジェクト・コード
を読み出し逆アセンブルし、表示を行なう。
That is, a general configuration of a debugging system includes a means for analyzing information of an in-circuit emulator capable of executing an object program, an input device for obtaining input information from a user, and providing a user with necessary information. It consists of a debugger with a disassembly function that converts the object code into assemble code from the display device that performs the communication between the in-circuit emulator and the debugger, except when displaying from the reset address (start address of the program). Since it takes time, no matter where the address specified by the user indicates, the object code is read from the position indicated by the address, disassembled, and displayed.

【0012】上述した構成を備えたデバッグ・システム
による逆アセンブル表示アドレスの設定方法は、そのフ
ローチャートの一例を示した図4を参照すると、ユーザ
指定逆アセンブル表示先頭アドレスを入力装置から取り
込む(処理ステップS31)と、その取り込んだユーザ
指定逆アセンブル表示先頭アドレスをそのまま逆アセン
ブルして表示装置へ出力していた(処理ステップS3
2)。
Referring to FIG. 4 showing an example of a flowchart of a method for setting a disassembly display address by the debug system having the above-described configuration, a user-specified disassembly display start address is fetched from an input device (processing step). S31), the user-specified disassembly display start address thus taken in is disassembled as it is and output to the display device (processing step S3).
2).

【0013】[0013]

【発明が解決しようとする課題】上述した従来の逆アセ
ンブル表示アドレスの設定方法では、ユーザ指定逆アセ
ンブル表示先頭アドレスを入力装置から取り込むと、そ
の取り込んだユーザ指定逆アセンブル表示先頭アドレス
ををそのまま逆アセンブルして表示装置へ出力していた
ので、逆アセンブル表示の先頭アドレスとして、複数バ
イト・コードの途中のアドレスを指定されている場合、
途中のコードを先頭のコードと判断して逆アセンブルし
てしまうため、正確な解析を行なえず、不正なアセンブ
ル・コード表示を行なってしまう問題があった。
In the above-described conventional method of setting a disassembly display address, when a user-specified disassembly display start address is fetched from an input device, the fetched user-specified disassemble display start address is directly inverted. Since it was assembled and output to the display device, if an address in the middle of a multi-byte code was specified as the start address of the disassembly display,
Since the code in the middle is determined as the first code and disassembled, there is a problem that accurate analysis cannot be performed and an incorrect assembled code is displayed.

【0014】例えば、下記のプログラム例を参照して説
明すると、00611Hアドレスから表示を指定されて
そのまま表示した場合、本来ならば、07f90fhで
一塊のアセンブルコードBGE $@@lsdiv+1
8H となるが、00611Hアドレスの0f9Hを単
独で CALLT[_@vect0e+64H]と解釈
してしまう。
For example, with reference to the following program example, if the display is designated from address 6111H and displayed as it is, a mass of assemble code BGE @ lsdiv + 1 is normally set at 07f90fh.
8H, but 0f9H of the 610011H address alone is interpreted as CALLT [_ @ vector0e + 64H].

【0015】つまり、機械語のコード長が一定ではない
ので、ユーザが適当に指定した逆アセンブル開始先頭ア
ドレスが例示するように、機械語の切りの良いアドレス
とは限らない場合がほとんどである。
In other words, since the code length of the machine language is not constant, in most cases, the address is not always a well-cut address of the machine language, as exemplified by the disassembly start start address appropriately specified by the user.

【0016】ここで、00611Hをユーザが指定した
アドレスとすると、00611Hから3バイトの長さの
機械語07f90fHが書かれているにもかかわらず、
00611Hから逆アセンブルしてしまうと、0061
0Hの07Hは無視されてしまい、00611Hアドレ
スに書かれているf9Hから始まる機械語と解釈してし
まうことになる。 プログラム例 00611 f9 CALLT [_@vect0e+64H] 00612 0f246f47 CMPW _g_bMinuteALM,#4 76fH 00616 8a6d SUBW BC_,DE 00618 24ce MOVW DE,BC_ 0061A 8b66 SUBC C_,C_ 0061C 8b77 SUBC B_,B_ 0061E 8a6a SUBW BC_,BC 00620 242e MOVW BC,BC_ 00622 8a6e SUBW BC_,BC_ ↑ ↑ ↑ アドレス コード アセンブルコード 本発明の目的は、上述した従来の欠点に鑑みなされたも
のであり、逆アセンブル表示の先頭アドレスとして、複
数バイト・コードの途中のアドレスを指定されている場
合でも、複数バイト・コードのアセンブル・コードを1
塊とみなし、その途中のコードを先頭のコードと判断し
て逆アセンブルすることなく、正しいコードを表示させ
ることにより正確な解析を行なうことができる逆アセン
ブル表示アドレスの設定方法を提供することにある。
Here, assuming that 00611H is an address designated by the user, the machine language 07f90fH having a length of 3 bytes is written from 00611H.
When disassembling from 0061H, 0061
07H of 0H is ignored, and is interpreted as a machine language starting from f9H written in the 610061H address. Example Program 00611 f9 CALLT [_ @ vect0e + 64H] 00612 0f246f47 CMPW _g_bMinuteALM, # 4 76fH 00616 8a6d SUBW BC_, DE 00618 24ce MOVW DE, BC_ 0061A 8b66 SUBC C_, C_ 0061C 8b77 SUBC B_, B_ 0061E 8a6a SUBW BC_, BC 00620 242e MOVW BC, BC — 00622 8a6e SUBW BC —, BC — Address code Assemble code An object of the present invention has been made in view of the above-mentioned drawbacks of the related art. Even if the address is specified, the assemble code of the multi-byte code is set to 1
It is an object of the present invention to provide a disassembly display address setting method which can perform accurate analysis by displaying a correct code without disassembling by judging a code in the middle as a first code and disassembling it. .

【0017】[0017]

【課題を解決するための手段】本発明の逆アセンブル表
示アドレスの設定方法は、 ユーザからのコマンド入力
情報を受けて処理する入力装置と、オブジェクト・プロ
グラムが実行可能なインサーキット・エミュレータと、
解析対象プログラムのアドレスおよびシンボルをあらか
じめ定めて格納したシンボル・テーブルと前記オブジェ
クト・コードからアセンブル・コードに変換する逆アセ
ンブル解析手段とをもつデバッガと、ユーザに必要な情
報を表示する表示装置とを用いて、前記入力装置からユ
ーザにより指定された前記オブジェクト・コードの逆ア
センブル表示先頭アドレスが前記変換対象の全アドレス
のうちのどのアドレスであっても、前記逆アセンブル解
析手段により前記逆アセンブル表示先頭アドレスが含ま
れるオブジェクト・コードの先頭アドレスを解析開始ア
ドレスとして自動設定させるとともにその設定されたア
ドレスから逆アセンブルを開始し、そのアセンブル結果
の表示アドレスも前記オブジェクト・コードの先頭アド
レスを前記表示装置に表示させることを特徴とする。
According to the present invention, there is provided a method for setting a disassembly display address, comprising: an input device for receiving and processing command input information from a user; an in-circuit emulator capable of executing an object program;
A debugger having a symbol table in which addresses and symbols of a program to be analyzed are predetermined and stored, and disassembly analyzing means for converting the object code into assemble code, and a display device for displaying information necessary for a user. The disassembly display head of the object code specified by the user from the input device may be any one of the addresses to be converted. The head address of the object code including the address is automatically set as the analysis start address, and the disassembly is started from the set address, and the display address of the assembly result is the display address of the object code. Wherein the display on.

【0018】また、前記オブジェクト・コードが複数ア
ドレスを占有する複数バイト長の機械語で構成され、前
記複数アドレスのなかに前記逆アセンブル表示先頭アド
レスが含まれているときは、前記複数アドレスの先頭ア
ドレスを表示することができる。
Further, when the object code is constituted by a machine language having a plurality of bytes and occupying a plurality of addresses, and the disassembled display start address is included in the plurality of addresses, the head of the plurality of addresses is read. The address can be displayed.

【0019】さらに、前記オブジェクト・コードが複数
アドレスを占有する複数バイト長の機械語で構成され、
前記複数アドレスのなかに前記逆アセンブル表示先頭ア
ドレスが含まれているときは、前記複数アドレスの先頭
アドレスを表示するのに対応して、前記複数バイト長の
機械語に対応する1塊のアセンブル・コードに逆アセン
ブルすることもできる。
Further, the object code is constituted by a machine language of a plurality of bytes occupying a plurality of addresses,
When the disassembly display start address is included in the plurality of addresses, one block of assemble data corresponding to the plurality of bytes of machine language is displayed in correspondence with displaying the start address of the plurality of addresses. It can also be disassembled into code.

【0020】また、前記解析開始アドレスの設定は、あ
らかじめデバッグ用のシンボルが所定のアドレスに設け
られている解析対象プログラム中の、前記逆アセンブル
表示先頭アドレスに最も近いアドレスからアドレス値が
減少する降順方向にシンボルを探し、最初に見つかった
前記シンボルのアドレスを解析開始アドレスとし、見つ
からなければスタート・アドレスを解析開始アドレスと
することでもよい。
Further, the analysis start address is set in a descending order in which an address value decreases from an address closest to the disassembly display start address in an analysis target program in which a debugging symbol is provided at a predetermined address in advance. A symbol may be searched in the direction, and the address of the symbol found first is set as the analysis start address, and if not found, the start address is set as the analysis start address.

【0021】さらに、前記解析開始アドレスの設定は、
あらかじめデバッグ用のシンボルが所定のアドレスに設
けられている解析対象プログラム中の、前記逆アセンブ
ル表示先頭アドレスに最も近いアドレスからアドレス値
が減少する降順方向の任意の範囲で前記シンボルを探
し、最初に見つかったシンボルのアドレスを解析開始ア
ドレスとし、見つからなければ前記逆アセンブル表示先
頭アドレスを解析開始アドレスとすることでもよい。
Further, the analysis start address is set as follows:
In the analysis target program in which a symbol for debugging is provided at a predetermined address in advance, the symbol is searched for in an arbitrary range in a descending direction in which an address value decreases from an address closest to the disassembly display start address, and The address of the found symbol may be set as the analysis start address, and if not found, the disassembly display start address may be set as the analysis start address.

【0022】さらにまた、前記解析開始アドレスの設定
は、あらかじめデバッグ用のシンボルが所定のアドレス
に設けらている解析対象プログラム中の、前記逆アセン
ブル表示先頭アドレスに最も近いアドレスから降順方向
の任意の範囲で前記シンボルを探し、最初に見つかった
シンボルのアドレスを解析開始アドレスとし、見つから
なければ、解析対象プログラムの開始アドレスを前記逆
アセンブル表示先頭アドレスを解析開始アドレスとする
ことでもよい。
Further, the analysis start address is set in an analysis target program in which a symbol for debugging is provided at a predetermined address in advance from an address closest to the disassembly display start address in a descending order. The symbol may be searched for in a range, and the address of the first symbol found may be set as the analysis start address, and if not found, the start address of the analysis target program may be set as the disassembly display start address as the analysis start address.

【0023】本発明の逆アセンブル表示アドレスの設定
方法の他の特徴は、ユーザからの入力情報を受ける入力
装置と、オブジェクト・プログラムが実行可能なインサ
ーキット・エミュレータと、前記オブジェクト・コード
からアセンブル・コードに変換する逆アセンブル解析手
段をもつデバッガと、ユーザに必要な情報を表示する表
示装置とを用いて、前記逆アセンブル解析手段により、
ユーザが指定する逆アセンブルすべき逆アセンブル表示
先頭アドレスを取得する第1の処理と、取得したユーザ
指定の前記逆アセンブル表示先頭アドレスを基にして、
前記逆アセンブル解析手段により、あらかじめデバッグ
用のシンボルが所定のアドレスに設けられている解析対
象プログラムをアドレスの減少する降順方向に前記シン
ボルを検索する第2の処理と、前記逆アセンブル解析手
段により検出した前記シンボルが設定されたアドレスの
先頭アドレスを前記オブジェクト・コード解析開始アド
レスとする第3の処理と、降順方向に開始アドレスまで
検索しても、前記シンボルが発見されなかった場合は前
記開始アドレスをオブジェクト・コード解析開始アドレ
スとする第4の処理と、前記第3および前記第4の処理
で設定された前記オブジェクト・コード解析開始アドレ
スから前記オブジェクト・コードを解析して逆アセンブ
ルするアセンブル・コード内に前記ユーザ指定の逆アセ
ンブル表示先頭アドレスが含まれるときはアセンブル・
コードの先頭アドレスを逆アセンブル表示先頭アドレス
として設定する第5の処理と、設定された逆アセンブル
表示アドレスから逆アセンブルを開始するとともに、前
記アセンブル・コードの先頭アドレスを逆アセンブル表
示データとして前記表示装置に出力する第6の処理とを
有することにある。
Other features of the method for setting a disassembly display address according to the present invention include an input device for receiving input information from a user, an in-circuit emulator capable of executing an object program, and an assembling program from the object code. Using a debugger having disassembly analysis means for converting to code and a display device for displaying necessary information to the user, the disassembly analysis means
A first process of obtaining a disassembly display start address to be disassembled specified by the user; and
A second process of searching for an analysis target program in which a symbol for debugging is provided at a predetermined address in advance by the disassembly analysis unit in a descending direction in which the address decreases, and detecting the symbol by the disassembly analysis unit A third process in which the start address of the address in which the symbol is set is the object code analysis start address, and if the symbol is not found even when the start address is searched in descending order, the start address is used. Processing for setting the object code analysis start address as an assembling code; and assembling code for analyzing and disassembling the object code from the object code analysis start address set in the third and fourth processing. In the user specified disassembly display start address Assemble when that contains the Les
A fifth process for setting a head address of a code as a disassembly display start address, starting disassembly from the set disassembly display address, and using the head address of the assembly code as disassembly display data as the display device And a sixth process of outputting the data to

【0024】本発明の逆アセンブル表示アドレスの設定
方法のさらに他の特徴は、ユーザからの入力情報を受け
る入力装置と、オブジェクト・プログラムが実行可能な
インサーキット・エミュレータと、前記オブジェクト・
コードからアセンブル・コードに変換する逆アセンブル
解析手段をもつデバッガと、ユーザに必要な情報を表示
する表示装置とを用いて、前記逆アセンブル解析手段に
より、ユーザが指定する逆アセンブルすべき逆アセンブ
ル表示先頭アドレスを取得する第1の処理と、取得した
前記ユーザ指定の前記逆アセンブル表示先頭アドレスを
基にして、前記逆アセンブル解析手段により、あらかじ
めデバッグ用のシンボルが所定のアドレスに設けられて
いる解析対象プログラムをアドレスの減少する降順方向
に、任意の範囲で検索する第2の処理と、前記任意の範
囲で前記シンボルが検出された場合、前記逆アセンブル
解析手段により検出したシンボルの示すアドレスをオブ
ジェクト・コード解析開始アドレスとする第3の処理
と、前記オブジェクト・コードを解析して逆アセンブル
するアセンブル・コード内に前記ユーザ指定の前記逆ア
センブル表示先頭アドレスが含まれるときは前記アセン
ブル・コードの先頭アドレスを前記逆アセンブル表示先
頭アドレスとして設定する第4の処理と、前記任意の範
囲に前記シンボルが検出されなかった場合、前記逆アセ
ンブル解析手段により、前記ユーザ指定の前記逆アセン
ブル先頭アドレスを前記逆アセンブル表示先頭アドレス
として設定する第5の処理と、前記第4または前記第5
で設定された前記アセンブル・コードの先頭アドレスか
ら逆アセンブルを開始するとともに前記アセンブル・コ
ードの先頭アドレスを逆アセンブル表示データとして前
記表示装置に出力する第6の処理とを有することにあ
る。
Still other features of the method for setting a disassembly display address of the present invention include an input device for receiving input information from a user, an in-circuit emulator capable of executing an object program,
A disassembly display to be disassembled to be disassembled by a user specified by the disassembly analysis means using a debugger having disassembly analysis means for converting code into assemble code and a display device for displaying information necessary for the user. A first process for acquiring a start address, and an analysis in which a symbol for debugging is provided at a predetermined address in advance by the disassembly analysis unit based on the acquired disassembly display start address specified by the user. A second process of searching the target program in an arbitrary range in a descending order in which the address decreases, and when the symbol is detected in the arbitrary range, an address indicated by the symbol detected by the disassembly analyzing means is set to an object. A third processing to be a code analysis start address, and the object A fourth process of setting the disassembly display start address as the disassembly display start address when the disassembly display start address specified by the user is included in the assemble code for analyzing and disassembling the code; A fifth process of setting the disassembly start address specified by the user as the disassembly display start address by the disassembly analysis means when the symbol is not detected in the arbitrary range; 4 or the fifth
And starting the disassembly from the head address of the assembling code set in step (d) and outputting the head address of the assembling code to the display device as disassembly display data.

【0025】[0025]

【発明の実施の形態】まず、本発明の概要を述べると、
入力装置からユーザにより指定されたオブジェクト・コ
ードの逆アセンブル表示先頭アドレスが変換対象の全ア
ドレスのうちのどのアドレスであっても逆アセンブル表
示先頭アドレスが示すオブジェクト・コードの解析開始
アドレスを逆アセンブル解析手段で自動設定する。その
設定されたアドレスから逆アセンブルを開始し、そのア
センブル結果を表示装置に表示する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, an outline of the present invention will be described.
Disassembly analysis of the analysis start address of the object code indicated by the disassembly display start address regardless of the address of the disassembly display of the object code specified by the user from the input device, whichever is the address of all the addresses to be converted Automatic setting by means. The disassembly is started from the set address, and the assembly result is displayed on the display device.

【0026】オブジェクト・コードが複数のアドレスを
占有する複合語で構成され、複数のアドレスのなかにユ
ーザ指定の逆アセンブル表示先頭アドレスが含まれてい
るときは、複合語の先頭アドレスを表示するので、複合
語の途中のコードを先頭のコードと判断して逆アセンブ
ルすることなく、正しいコードを表示させることにより
正確な解析を行なうというものである。
If the object code is composed of a compound word occupying a plurality of addresses, and the plurality of addresses include a user-specified disassembly display start address, the start address of the compound word is displayed. In addition, a code in the middle of a compound word is determined to be the first code, and correct analysis is performed by displaying a correct code without disassembling the code.

【0027】次に、本発明の逆アセンブル設定方法の第
1の実施の形態を図面を参照しながら説明する。本発明
の逆アセンブル設定方法の第1の実施の形態を適用する
デバッグ・システム(開発支援ツール)の構成図を示し
た図1を参照すると、この開発支援ツールの構成は公知
のものであり、開発支援ツール1は図示されないホスト
マシンとインサーキット・エミュレータ11とデバッガ
12と入力装置13と表示装置14とからなる。
Next, a first embodiment of the disassembly setting method of the present invention will be described with reference to the drawings. Referring to FIG. 1 which shows a configuration diagram of a debugging system (development support tool) to which the first embodiment of the disassembly setting method of the present invention is applied, the configuration of this development support tool is known. The development support tool 1 includes a host machine (not shown), an in-circuit emulator 11, a debugger 12, an input device 13, and a display device 14.

【0028】ホストマシンは、プログラム開発の中心と
なるものであり、ソース・プログラムの作成と編集、ア
センブラの言語処理を用いて、ソース・プログラムをマ
シンコード、つまりオブジェクト・プログラムに変換す
る。その後デバッガと協働してプログラムのデバッグ作
業に用いられる。デバッグ終了後はホスト・マシンに接
続されているライタを用いてプログラムを不揮発性半導
体メモリに書き込み、最終評価を行う。
The host machine is the center of program development, and converts a source program into a machine code, that is, an object program, by creating and editing a source program and using language processing of an assembler. After that, it is used for debugging the program in cooperation with the debugger. After the debugging, the program is written into the nonvolatile semiconductor memory using a writer connected to the host machine, and the final evaluation is performed.

【0029】インサーキット・エミュレータ11は、内
部で実行可能なオブジェクト・プログラム111を有す
る。また、ホスト・マシンと接続して使用し、オンライ
ン・アセンブル、逆アセンブル、およびシンボリック・
デバッグ等の機能をもっている。インサーキット・エミ
ュレータを含めてデバッガと称することもある。
The in-circuit emulator 11 has an object program 111 that can be executed internally. It can also be used in connection with a host machine to allow online assembly, disassembly, and symbolic
It has functions such as debugging. Debuggers including in-circuit emulators are sometimes referred to as debuggers.

【0030】デバッガ12は、インサーキット・エミュ
ーレータ11からオブジェクト・コードを取得し、その
オブジェクト・コードと後述する図1および図3の処理
プログラムとを記録媒体に記録し、その記録内容を基に
ユーザに必要な出力データを作成する逆アセンブル解析
手段121と、解析対象となるオブジェクト・プログラ
ム111のアドレスおよびシンボルがあらかじめ対応さ
せたテーブルを格納したシンボル・テーブル122とを
有する。
The debugger 12 acquires an object code from the in-circuit emulator 11, records the object code and a processing program shown in FIGS. 1 and 3 described later on a recording medium, and based on the recorded contents. It has disassembly analysis means 121 for creating output data necessary for the user, and a symbol table 122 storing a table in which addresses and symbols of the object program 111 to be analyzed correspond in advance.

【0031】デバッガ12は、ホストマシンにより設定
されたオブジェクト・プログラム111をデバッガに接
続される評価対象のターゲット・システムと接続し、プ
ログラムを実行させながらそのターゲット・システムの
デバッグに使用する。
The debugger 12 connects the object program 111 set by the host machine to a target system to be evaluated connected to the debugger, and uses the object program 111 for debugging the target system while executing the program.

【0032】また、デバッガ12は、例えば、1命令ず
つプログラムを実行する1ステップ動作、指定のアドレ
スまで実行するブレーク動作,CPUの内部レジスタお
よびメモリ内容の表示、変更等の機能を備え、これらの
機能の組み合わせでデバッグを行う。
The debugger 12 has functions such as a one-step operation for executing a program one instruction at a time, a break operation for executing to a specified address, and displaying and changing the contents of a CPU internal register and memory. Debug with a combination of functions.

【0033】入力装置13は、ユーザからのコマンド入
力情報を受けてデバッガ12へ渡す処理をする。表示装
置14は、デバッガ12から出力データをうけ画面に表
示する。
The input device 13 performs a process of receiving command input information from a user and passing it to the debugger 12. The display device 14 receives output data from the debugger 12 and displays it on a screen.

【0034】オブジェクト・プログラム111が実行可
能なインサーキット・エミュレータ11と、インサーキ
ット・エミューレータ11よりオブジェクト・コード1
11を取得し、それらの情報をもとにユーザに必要な出
力データを作成する逆アセンブル解析手段121(上述
した記録媒体を含む)と解析対象プログラムのアドレス
およびシンボルをあらかじめ定めて格納したシンボル・
テーブル122とを有するデバッガ130と、ユーザに
必要な情報を表示する表示装置140とから構成されて
いる。
The in-circuit emulator 11 that can execute the object program 111 and the object code 1 from the in-circuit emulator 11
11 to obtain output data necessary for the user based on the information, a disassembly analysis unit 121 (including the recording medium described above), and a symbol
It comprises a debugger 130 having a table 122 and a display device 140 for displaying necessary information to the user.

【0035】次に、図1と、図1に示したシステム構成
に適用する、本発明の逆アセンブル表示アドレスの設定
方法の説明用フローチャートを示した図2と、下記に示
したシンボル・テーブルの抜粋およびプログラム例とを
併せて参照しながら本実施形態全体の動作を詳細に説明
する。
Next, FIG. 2 is a flow chart for explaining a method of setting a disassembly display address according to the present invention, which is applied to the system configuration shown in FIG. The operation of the entire embodiment will be described in detail with reference to an excerpt and a program example.

【0036】まず、全体の設定動作の概要を示すと、逆
アセンブル解析手段121は入力装置113からユーザ
が指定する逆アセンブル表示先頭アドレスを取得する。
逆アセンブル解析手段111は取得したユーザ指定の逆
アセンブル表示先頭アドレスに近い位置のアドレスにあ
るシンボルを、シンボル・テーブル122を参照して、
アドレス値の減少方向、すなわち降順方向に検索する。
First, an outline of the entire setting operation will be described. The disassembly analyzing means 121 acquires the disassembly display start address designated by the user from the input device 113.
The disassembly analyzing unit 111 refers to the symbol table 122 to obtain the symbol at the address close to the obtained user-specified disassembly display start address,
The search is performed in the decreasing direction of the address value, that is, in the descending order.

【0037】降順方向に00Hアドレスまで検索しても
シンボルが検出されなかった場合は、00Hアドレスを
オブジェクト・コード解析開始アドレスとする。逆アセ
ンブル解析手段121は、検出したシンボルをオブジェ
クト・コード解析開始アドレスとし、オブジェクト・コ
ード解析開始アドレスから逆アセンブルを開始する。
If no symbol is detected even after searching up to the 00H address in the descending direction, the 00H address is set as the object code analysis start address. The disassembly analysis unit 121 uses the detected symbol as an object code analysis start address, and starts disassembly from the object code analysis start address.

【0038】逆アセンブルしたアセンブル・コード内に
ユーザ指定の逆アセンブル表示先頭アドレスが含まれる
アセンブル・コードの属する先頭アドレスを逆アセンブ
ル表示アドレスとして設定するとともに、逆アセンブル
表示先頭アドレスをアセンブル表示データとして表示装
置114に出力する。
The disassembled assembling code includes the user-specified disassembly display start address, which includes the disassembly display start address, and sets the disassembly display address as the disassembly display address, and displays the disassembly display start address as disassembly display data. Output to the device 114.

【0039】次に上述した設定方法をさらに詳細な処理
ステップ単位で説明する。
Next, the above-described setting method will be described in more detail for each processing step.

【0040】下記に示すシンボル・テーブルの一例は、
シンボルおよびその対応アドレスのみを抜粋し、その前
後の行にあるシンボルのないアドレスは省略してある。 _hdwinit 005F0H @@1u1sh 005F1H @@1scmp 005FFH @@1sdiv 0060AH @@1umu1 0064FH まず、逆アセンブル解析手段121は、入力装置13か
らユーザが指定する逆アセンブル表示先頭アドレスを取
得する(図2の処理スッテプS11)。
One example of a symbol table shown below is:
Only the symbols and their corresponding addresses are excerpted, and addresses without symbols in the preceding and following lines are omitted. _Hdwinit 005F0H @@ 1u1sh 005F1H @@ 1scmp 005FFH @@ 1sdiv 0060AH @@ 1umu1 0064FH First, the disassembly analysis unit 121 acquires the disassembly display start address specified by the user from the input device 13 (the processing step S11 in FIG. 2). ).

【0041】例えばユーザが指定する逆アセンブル表示
先頭アドレスが00611Hであったとする。ここで、
シンボル・テーブルの抜粋を参照すると、通常、シンボ
ルはユーザがあらかじめ意図するアドレスに設けてある
ので、ユーザが指定する逆アセンブル表示先頭アドレス
が、これらのシンボルが設けられているアドレス同士の
間の、あるアドレスを指す場合と、スタート・アドレス
00Hおよび最初に出てくるシンボルが設けられたアド
レスの間に存在する場合と、逆アセンブル表示先頭アド
レスと同じアドレスを指す位置に存在する場合とがあ
る。
For example, assume that the disassembly display start address specified by the user is 610011H. here,
Referring to the excerpt of the symbol table, since the symbols are usually provided at the address intended by the user in advance, the disassembly display start address specified by the user is set between the addresses at which these symbols are provided. There are a case where the address indicates a certain address, a case where it exists between the start address 00H and the address where the first appearing symbol is provided, and a case where it exists at a position indicating the same address as the disassembly display start address.

【0042】処理ステップS11で取得したアドレスは
00611Hであるから、抜粋したシンボル・テーブル
によれば、0064FHおよび0060AHの間にある
ことがわかる。従って、逆アセンブル解析手段121は
降順方向の00611Hから遡って最初に出てくるシン
ボルを検索する(図2の処理ステップS12)。
Since the address acquired in the processing step S11 is 00611H, it can be seen from the extracted symbol table that the address is between 0064FH and 0060AH. Therefore, the disassembly analysis unit 121 searches for a symbol that first appears retroactively from 00611H in the descending direction (processing step S12 in FIG. 2).

【0043】この検索の結果、検出されたか検出されな
かったかを逆アセンブル解析手段121は判断する(図
2の処理ステップS13)。その結果、シンボル@@1
sdivが検出されたので(YES)、逆アセンブル解
析手段121は次の処理ステップS13を実行する。
As a result of this search, the disassembly analysis means 121 determines whether or not the search has been performed (process step S13 in FIG. 2). As a result, the symbol $ 1
Since sdiv is detected (YES), the disassembly analysis means 121 executes the next processing step S13.

【0044】すなわち、逆アセンブル解析手段121
は、検出されたシンボル@@1sdivの付されたアド
レスが0060AHであることから、この0060AH
をオブジェクト・コード解析開始アドレスに設定する
(図2の処理ステップS14)。
That is, the disassembly analyzing means 121
Since the address assigned to the detected symbol $ 1sdiv is 0060AH,
Is set to the object code analysis start address (processing step S14 in FIG. 2).

【0045】一方、前述したように、逆アセンブル表示
先頭アドレスがスタート・アドレス00Hおよび最初に
出てくるシンボルが設けられたアドレスの間に存在する
場合は、降順方向に遡って最初に出てくるシンボルを検
索しても、当然検出されないので、そのときは、逆アセ
ンブル解析手段121はスタート・アドレス00Hをオ
ブジェクト・コード解析開始アドレスに設定する(図2
の処理ステップS15)。
On the other hand, as described above, when the disassembly display start address exists between the start address 00H and the address at which the first appearing symbol is provided, it appears first in the descending order. Even if a symbol is searched for, it is not detected naturally, and in that case, the disassembly analysis means 121 sets the start address 00H to the object code analysis start address (FIG. 2).
Processing step S15).

【0046】次に、オブジェクト・コード解析開始アド
レスから解析して逆アセンブルするアセンブル・コード
内にユーザ指定の逆アセンブル表示先頭アドレスが含ま
れるときはアセンブル・コードの先頭アドレスを逆アセ
ンブル表示アドレスに設定する(図2の処理ステップS
16)。
Next, when the disassembly display start address specified by the user is included in the assemble code to be analyzed and disassembled from the object code analysis start address, the start address of the assemble code is set to the disassemble display address. (Processing step S in FIG. 2)
16).

【0047】次に、逆アセンブル解析手段121は、処
理ステップS14またはS15により設定されたオブジ
ェクト・コード解析開始アドレスから逆アセンブルを開
始する。
Next, the disassembly analysis means 121 starts disassembly from the object code analysis start address set in the processing step S14 or S15.

【0048】例えば、0060AH(@@1sdiv)
をオブジェクト・コード解析開始アドレスとして逆アセ
ンブルを開始した場合は、ユーザが指定する逆アセンブ
ル表示先頭アドレス00611Hの含まれるアセンブル
・コードBGE$@@1sdiv+18Hの先頭アドレ
ス00610Hを逆アセンブル表示アドレスとして設定
する。
For example, 0060AH ($ 1sdiv)
Is set as the object code analysis start address, the disassembly display start address 61060H of the assemble code BGE @ 1sdiv + 18H included in the disassembly display start address 6111H specified by the user is set as the disassembly display address.

【0049】すなわち、アドレス00610Hを先頭ア
ドレスとする機械語07f90fは3バイト命令である
から、00610Hは07、00611Hはf9、00
612Hは0fにそれぞれ対応するので、ユーザが指定
する逆アセンブル表示先頭アドレス00611Hはこの
3バイト命令のアドレスに含まれている。従って、逆ア
センブル表示先頭アドレス00611Hとしては、3バ
イト命令の先頭アドレスである00610Hを表示する
ことになる。
That is, since the machine language 07f90f having the address 6010H as the head address is a 3-byte instruction, 61010H is 07 and 6111H is f9,00.
Since 612H corresponds to 0f, the disassembly display start address 61111H specified by the user is included in the address of the 3-byte instruction. Therefore, as the disassembly display start address 61001H, 61010H which is the start address of the 3-byte instruction is displayed.

【0050】上述した機械語のコード長が一定でないの
で、ユーザが適当に指定した逆アセンブル開始先頭アド
レスが例示するように、機械語の切りの良いアドレスと
は限ら無い場合がほとんどになる。
Since the code length of the above-mentioned machine language is not constant, the disassembly start address appropriately specified by the user is not always a well-cut address in the machine language as exemplified.

【0051】機械語がすべて1バイトで示される言語に
ついては問題ないが、機械語のバイト長が一定でないた
め、2バイト長の命令には命令の途中を示すアドレスが
1個所、3バイト長の命令には2個所あることになる。
There is no problem for a language in which all machine language is represented by one byte. However, since the byte length of the machine language is not constant, an instruction indicating the middle of the instruction is provided at one place in a two-byte length instruction, and a three-byte length is included in the instruction. There are two places in the instruction.

【0052】例えば、00611Hをユーザが指定した
アドレスとすると、00610Hから3バイトの長さの
機械語07f90fHが書かれているにもかかわらず0
0611Hから逆アセンブルしてしまうと、00610
Hの07Hは無視されてしまい、00611Hアドレス
に書かれているf9Hからはじまる機械語と解釈してし
まうことになる。
For example, assuming that 6111H is an address designated by the user, 00001H is set even though the machine language 07f90fH having a length of 3 bytes is written.
If disassembly starts from 0611H, it will be 61060.
07H of H is ignored, and is interpreted as a machine language starting from f9H written at the address 00611H.

【0053】下記に処理ステップS3の判定結果がYE
Sの場合の説明用プログラム例を示す。
In the following, the judgment result of the processing step S3 is YE
An example of an explanatory program in the case of S is shown.

【0054】 アドレス シンボル コード アセンブル・コード ↓ ↓ ↓ ↓ 0060A @@1sdiv 3588 PUSH BC_,HL ↑(一番近いシンボル) 0060C 8aef SUBW HL,HL 0060E 8f2f CMPW BC,HL 00610 07f90f BGE $@@1sdiv+18H 00613 246f MOVW BC_,HL 00615 47 INCW HL 00616 8a6d SUBW BC_,DE 00618 24ce MOVW DE,BC 0061A 8b666 SUBC C_,C_ なお、ユーザ指定の逆アセンブル表示先頭アドレスが、
その逆アセンブル表示先頭アドレスに一番近い位置のシ
ンボルのアドレスと同じアドレスを指す場合、例えば、
逆アセンブル表示先頭アドレスが0061Hで、一番近
い位置のシンボルのアドレスが複数バイトのオブジェク
ト・コードを有するアドレス0060Hであれば、00
60Hをオブジェクト・コード解析開始アドレスとして
逆アセンブルを開始することは明らかである。
Address Symbol Code Assemble Code ↓ ↓ ↓ ↓ 0060A {1sdiv 3588 PUSH BC_, HL} (Nearest Symbol) MOVW BC_, HL 00615 47 INCW HL 00616 8a6d SUBW BC_, DE 00618 24ce MOVW DE, BC 0061A 8b666 SUBC C_, C_ Note that the disassembly display start address specified by the user is:
When pointing to the same address as the address of the symbol closest to the disassembly display start address, for example,
If the disassembly display start address is 0061H and the address of the nearest symbol is address 0060H having a plurality of bytes of object code, 00
It is clear that the disassembly starts with 60H as the object code analysis start address.

【0055】一方、00Hをオブジェクト・コード解析
開始アドレスとして逆アセンブルを開始した場合は、0
0Hから順次に逆アセンブルを実行する。例えば、56
HをRETに、8f2fをCMPW BC_,HLに順
次に逆アセンブルしていき、07f90fHをBGE$
@@1sdiv+18Hに逆アセンブルした時点で、ユ
ーザが指定する逆アセンブル表示先頭アドレス0061
1Hがアセンブル・コードBGE$@@1sdiv+1
8Hの先頭アドレス00610Hに含まれているので、
その先頭アドレス00610Hを逆アセンブル表示アド
レスとして設定する。
On the other hand, when disassembling is started with 00H as the object code analysis start address, 0 is set.
Disassembly is performed sequentially from 0H. For example, 56
H is disassembled sequentially into RET, 8f2f into CMPW BC_, HL, and 07f90fH into BGEB
$ Disassembly display start address 0061 specified by the user at the time of disassembling to 1sdiv + 18H
1H is the assembling code BGE @ 1sdiv + 1
Since it is included in the head address 6010H of 8H,
The head address 6010H is set as the disassembly display address.

【0056】次に、逆アセンブル解析手段121は、処
理ステップS16で設定した先頭アドレス00610H
をユーザ指定の逆アセンブル表示先頭アドレスとして表
示装置114に出力する(図2の処理ステップS17)
下記に処理ステップS13の判定結果がNOの場合の説
明用プログラム例を示す。
Next, the disassembly analyzing means 121 sets the start address 00610H set in the processing step S16.
Is output to the display device 114 as the user-specified disassembly display start address (processing step S17 in FIG. 2)
The following is an example of an explanation program when the determination result of the processing step S13 is NO.

【0057】 アドレス シンボル コード アセンブル・コード ↓ ↓ ↓ ↓ 00000 @cstart 05af SEL RB7 : (シンボル無し) : : : 00610 07f90f BGE $@@1sdiv+18H ↑(一番近いコードの先頭アドレス) 00613 246f MOVW BC_,HL 00615 47 INKW HL 00616 8a6d SUBW BC_,DE 00618 24ce MOVW DE,BC 0061A 8b66 SUBC C_,C_ 0061C 8B77 SUBC B_,B_ 0061E 8a6a SUBW BC,BC 上述したように、本実施の形態によれば、指定された逆
アセンブル表示開始アドレスが、複数バイトのアセンブ
ル・コードの途中のコード(前述の例では07f90f
のf9)に対応するアドレス(ここでは00611H)
であったときでも、正しいアセンブル・コード(ここで
は00610H)を表示させることが可能になる。
Address Symbol code Assemble code ↓ ↓ ↓ ↓ 00000 @cstart 05af SEL RB7: (no symbol)::: 00610 07f90f BGE {1sdiv + 18H} (closest code start address) 00613 246f MOVWBC — 006147 INKW HL 00616 8a6d SUBW BC_, DE 00618 24ce MOVW DE, BC 0061A 8b66 SUBC C_, C_ 0061C 8B77 SUBBC B_, B_ 0061E 8a6a SUBC If the disassemble display start address is a code in the middle of a multi-byte assemble code (07f90f in the above example)
F9) (here, 6111H)
, It is possible to display the correct assembling code (here, 60110H).

【0058】つまり、ユーザが指定した逆アセンブル表
示先頭アドレスに近い位置にあるシンボルをアドレスの
降順方向に検索し、検出したシンボルの示すアドレスか
らオブジェクト・コードの解析を開始し、ユーザ指定ア
ドレスが示すオブジェクト・コードを含んだアセンブル
・コードの先頭アドレスを逆アセンブル表示アドレスと
して設定するからである。
That is, a symbol located at a position near the disassembly display start address specified by the user is searched in the descending direction of the address, and the analysis of the object code is started from the address indicated by the detected symbol. This is because the head address of the assembly code including the object code is set as the disassembly display address.

【0059】次に、本発明の第2の実施形態を説明す
る。ここでも適用する開発支援ツールの構成は第1の実
施形態と同様であり、インサーキット・エミュレータ1
1と、デバッガ12とから構成されている。
Next, a second embodiment of the present invention will be described. The configuration of the development support tool applied here is the same as that of the first embodiment, and the in-circuit emulator 1
1 and a debugger 12.

【0060】図1と,図3と、下記に示すシンボル・テ
ーブルと、処理ステップS13の判定結果がYESの場
合の説明用プログラム例とをそれぞれ参照しながら動作
を説明する。
The operation will be described with reference to FIG. 1, FIG. 3, a symbol table shown below, and an example program for explanation when the determination result of processing step S13 is YES.

【0061】まず、入力装置113からユーザ指定の逆
アセンブル表示先頭アドレスは、逆アセンブル解析手段
121に供給される。
First, the disassembly display start address specified by the user from the input device 113 is supplied to the disassembly analysis means 121.

【0062】逆アセンブル解析手段111は、入力され
たユーザ指定の逆アセンブル表示先頭アドレスを取得す
る。
The disassembly analyzing means 111 acquires the input disassembly display start address specified by the user.

【0063】取得したユーザ指定の逆アセンブル表示先
頭アドレスに近い値のアドレスを示すシンボルをシンボ
ル・テーブル112を参照して解析対象プログラムの任
意の範囲を検索する。
An arbitrary range of the analysis target program is searched for a symbol indicating an address of a value close to the obtained user-specified disassembly display start address with reference to the symbol table 112.

【0064】シンボル・テーブル122を参照して解析
対象プログラム内に任意の範囲でシンボルが検出された
場合、逆アセンブル解析手段121は、検出したシンボ
ルの付されたアドレスをオブジェクト・コード解析開始
アドレスとして設定する。
When a symbol is detected within an arbitrary range in the program to be analyzed with reference to the symbol table 122, the disassembly analysis means 121 sets the address with the detected symbol as the object code analysis start address. Set.

【0065】設定されたオブジェクト・コード解析開始
アドレスから解析して逆アセンブルするアセンブル・コ
ード内にユーザ指定の逆アセンブル表示先頭アドレスが
含まれるときはアセンブル・コードの先頭アドレスを逆
アセンブル表示先頭アドレスとして設定する。
When the disassembly code to be analyzed and disassembled from the set object code analysis start address includes the disassembly display start address specified by the user, the disassembly display start address is used as the disassembly display start address. Set.

【0066】シンボル・テーブル112を参照して解析
対象プログラム内に任意の範囲でシンボルが検出されな
かった場合、逆アセンブル解析手段121は、ユーザ指
定の逆アセンブル先頭アドレスを逆アセンブル表示先頭
アドレスとして設定する。
If no symbol is detected within an arbitrary range in the program to be analyzed with reference to the symbol table 112, the disassembly analysis means 121 sets the disassembly start address specified by the user as the disassembly display start address. I do.

【0067】解析対象プログラム内に任意の範囲でシン
ボルが検出されたとき、または検出されなかったときの
いずれの場合も、それぞれの場合に設定された逆アセン
ブル表示先頭アドレスから逆アセンブルを開始するとと
もに、設定された逆アセンブル表示先頭アドレスをアセ
ンブル表示データとして表示装置114に出力する。
When a symbol is detected in an arbitrary range in the analysis target program or when it is not detected, the disassembly is started from the disassembly display start address set in each case, and , And outputs the set disassembly display start address to the display device 114 as assembly display data.

【0068】次に上述した第2の実施形態の設定方法を
さらに詳細な処理ステップ単位で説明する。
Next, the setting method of the above-described second embodiment will be described in more detail in units of processing steps.

【0069】下記に示すシンボル・テーブルの一例も第
1の実施形態同様に、シンボルおよびその対応アドレス
のみを抜粋し、その前後の行にあるシンボルのないアド
レスは省略してある。 _@cstart 00000H _?R_INS1 000E9H _Sub1 000F6H _Func2 00100H _Sub2 00113H _Func3 0013BH : : _hdwinit 005F0H @@1u1sh 005F1H @@1scmp 005FFH @@1sdiv 0060AH @@1umu1 0064FH @@1srem 00668H @@1srsh 006ACH まず、逆アセンブル解析手段121は、入力装置13か
らユーザが指定する逆アセンブル表示先頭アドレスを取
得する(図3の処理スッテプS21)。
As in the case of the first embodiment, only an example of a symbol table shown below extracts symbols and their corresponding addresses, and omits addresses without symbols in the preceding and succeeding lines. _ @ Cstart 00000H _? R_INS1000E9H _Sub1 000F6H _Func2 00100H _Sub2 00113H _Func3 0013BH: _hdwinit 005F0H @@ 1u1sh 005F1H @@ 1scmp 005FFH s1s001H00 d1s1 000H1A1 Then, the disassembly display start address specified by the user is obtained from (step S21 in FIG. 3).

【0070】例えばユーザが指定する逆アセンブル表示
先頭アドレスが000F3Hであったとする。ここで、
シンボル・テーブルの抜粋を参照すると、取得したユー
ザ指定アセンブル表示アドレスが000F3Hであった
場合は、シンボルは000F2Hおよび000E9Hの
間にあることがわかる。従って、逆アセンブル解析手段
121は000F3Hから降順方向に遡って最初に出て
くるシンボルを検索する(図3の処理ステップS2
2)。
For example, assume that the disassembly display start address specified by the user is 000F3H. here,
Referring to the excerpt of the symbol table, if the obtained user-specified assemble display address is 000F3H, it is understood that the symbol is between 000F2H and 000E9H. Accordingly, the disassembly analysis unit 121 searches for the first symbol that appears backward from 000F3H in the descending direction (processing step S2 in FIG. 3).
2).

【0071】この検索の結果、検出されたか検出されな
かったかを逆アセンブル解析手段121は判断する(図
3の処理ステップS23)。その結果、最初に出てくる
シンボルとして_?R_INS1が検出されたので(Y
ES)、逆アセンブル解析手段121は次の処理ステッ
プS24を実行する。
As a result of this search, the disassembly analysis means 121 determines whether or not the search has been performed (step S23 in FIG. 3). As a result, _? Since R_INS1 was detected, (Y
ES), the disassembly analyzing means 121 executes the next processing step S24.

【0072】すなわち、逆アセンブル解析手段121
は、検出されたシンボル_?R_INS1の付されたア
ドレスが000E9Hであることから、この000E9
Hをオブジェクト・コード解析開始アドレスに設定する
(図3の処理ステップS24)。
That is, the disassembly analyzing means 121
Is the detected symbol_? Since the address with R_INS1 is 000E9H, this 000E9H
H is set to the object code analysis start address (processing step S24 in FIG. 3).

【0073】設定されたオブジェクト・コード解析開始
アドレスから解析して逆アセンブルするアセンブル・コ
ード内にユーザ指定の逆アセンブル表示先頭アドレスが
含まれるときはアセンブル・コードの先頭アドレスを逆
アセンブル表示先頭アドレスとして設定する(図3の処
理ステップS25)。
When the disassembly code to be analyzed and disassembled from the set object code analysis start address includes the disassembly display start address specified by the user, the disassembly display start address is used as the disassembly display start address. It is set (processing step S25 in FIG. 3).

【0074】次に、逆アセンブル解析手段121は、処
理ステップS25により設定されたオブジェクト・コー
ド解析開始アドレス000E9Hから逆アセンブルを開
始する。
Next, the disassembly analysis means 121 starts disassembly from the object code analysis start address 000E9H set in the processing step S25.

【0075】例えば、000E9H(_?R_INS
1)をオブジェクト・コード解析開始アドレスとして逆
アセンブルを開始した場合は、ユーザが指定する逆アセ
ンブル表示先頭アドレス000F3Hの含まれるアセン
ブル・コードMOVW BC,#1Hの先頭アドレス0
00F2Hを逆アセンブル表示アドレスとして設定す
る。
For example, 000E9H (_? R_INS
When disassembly is started with 1) as the object code analysis start address, the start address 0 of the assemble code MOVW BC, # 1H included in the disassembly display start address 000F3H specified by the user
00F2H is set as the disassembly display address.

【0076】すなわち、アドレス000F2Hを先頭ア
ドレスとする機械語620100は3バイト命令である
から、000F2Hは60、000F3Hは01、00
0F4Hは00にそれぞれ対応するので、ユーザが指定
する逆アセンブル表示先頭アドレス000F3Hはこの
3バイト命令のアドレスに含まれている。従って、逆ア
センブル表示先頭アドレス000F3Hとしては、3バ
イト命令の先頭アドレスである000F2Hを表示する
ことになる。
That is, since the machine language 620100 having the start address 000F2H is a 3-byte instruction, 000F2H is 60, and 000F3H is 01,00.
Since 0F4H corresponds to 00, the disassembly display start address 000F3H specified by the user is included in the address of the 3-byte instruction. Therefore, as the disassembly display start address 000F3H, 000F2H which is the start address of the 3-byte instruction is displayed.

【0077】下記に処理ステップS23の判定結果がY
ESの場合の説明用プログラム例を示す。
In the following, the determination result of processing step S23 is Y
An example program for explanation in the case of ES is shown.

【0078】 アドレス シンボル コード アセンブル・コード ↓ ↓ ↓ ↓ 000E9 _?R_INS1 3ee886be (一番近いシンボル)↑ MOVW HL,!_gSvar 000ED 47 INCW HL 000EE 3ee986be MOVW !_gSvar,HL 000F2 620100 MOVW BC,#1H ↑(このアドレスはユーザ指定アドレスを含む) 0005F 56 RET 000F6 _Sub1 286d01 CALL !?R_INS1 000F9 d2 MOV A,C 000FA 04 CTVBW !_gIvar,AX 000FF 56 RET なお、ユーザ指定の逆アセンブル表示先頭アドレスが、
その逆アセンブル表示先頭アドレスに一番近い位置のシ
ンボルのアドレスと同じアドレスを指す場合またはその
アドレスに含まれる場合、例えば、逆アセンブル表示先
頭アドレスが0000E9Hまたは00EAHで、一番
近い位置のシンボルのアドレスも000E9Hであれ
ば、000E9Hをオブジェクト・コード解析開始アド
レスとして逆アセンブルを開始することは明らかであ
る。
Address symbol code Assemble code ↓ ↓ ↓ ↓ 000E9 _? R_INS1 3ee886be (closest symbol) ↑ MOVW HL ,! _GSvar 000ED 47 INCW HL 000EE 3ee986be MOVW! _GSvar, HL 000F2 620100 MOVW BC, # 1H (This address includes the user-specified address) 0005F 56 RET 000F6 _Sub1 286d01 CALL! ? R_INS1 000F9 d2 MOV A, C 000FA 04 CTVBW! _GIvar, AX 000FF 56 RET The disassembly display start address specified by the user is
When the same address as the address of the symbol at the position closest to the disassembly display start address is included or included in the address, for example, when the disassembly display start address is 0000E9H or 00EAH, the address of the symbol at the closest position If it is 000E9H, it is clear that the disassembly starts with 000E9H as the object code analysis start address.

【0079】一方、処理ステップS21で取得したアド
レスが、例えば00637Hである場合、抜粋したシン
ボル・テーブルによれば、降順方向で一番近いシンボル
は0060Aのシンボル@@1sdivであるが、検索
は1ステップずつ進めていくので00636H〜006
0Aまで進めるのに時間がかかりすぎることになる。
On the other hand, when the address acquired in the processing step S21 is, for example, 00637H, the closest symbol in the descending direction is the symbol of 0060A @@ 1sdiv according to the extracted symbol table. 00636H ~ 006
It will take too long to advance to 0A.

【0080】従って、取得したアドレス00637Hか
ら降順方向の任意のアドレス、例えば00629Hまで
検索した時点でシンボルが検出されないので、検索を打
ち切り、取得したユーザ指定アセンブル表示アドレス0
0637Hを逆アセンブル表示アドレスに設定する。
Therefore, since no symbol is detected at the time of searching from the obtained address 00637H to an arbitrary address in the descending direction, for example, 60069H, the search is terminated and the obtained user-specified assemble display address 0 is obtained.
0637H is set as the disassembly display address.

【0081】また、前述したように、逆アセンブル表示
先頭アドレスがスタート・アドレス00Hおよび最初に
出てくるシンボルが設けられたアドレス間に存在する場
合は、例えばシンボル・テーブルを参照すると、逆アセ
ンブル表示先頭アドレスが000BFHとすると、降順
方向に遡って最初に出てくるシンボルを検索しても、当
然シンボルは検出されないので、そのときは、逆アセン
ブル解析手段121はスタート・アドレス00Hまたは
その途中の任意のアドレス00030Hをオブジェクト
・コード解析開始アドレスに設定する(図3の処理ステ
ップS26)。
As described above, if the disassembly display start address is between the start address 00H and the address where the first appearing symbol is provided, for example, referring to the symbol table, Assuming that the start address is 000 BFH, even if a symbol appearing first in the descending direction is searched for, no symbol is naturally detected. In this case, the disassembly analyzing means 121 returns to the start address 00H or any midway in the middle. Is set as the object code analysis start address (processing step S26 in FIG. 3).

【0082】例えば、00Hまたはその途中の任意のア
ドレス00030Hをオブジェクト・コード解析開始ア
ドレスとして逆アセンブルを開始した場合は、00Hま
たはその途中の任意のアドレス00030Hから順次に
逆アセンブルを実行する。
For example, when disassembling is started with 00H or an arbitrary address 00030H in the middle thereof as an object code analysis start address, the disassembling is sequentially performed from 00H or an arbitrary address 00030H in the middle.

【0083】00Hからであれば05afをSELRB
7に、00030Hからであれば05abをSEL R
B3に、順次に逆アセンブルしていき、000BFHn
o14f9をBR $_cstart+BDHに逆アセ
ンブルした時点で、ユーザが指定する逆アセンブル表示
先頭アドレス000BFHがアセンブル・コードBR$
_cstart+BDHの先頭アドレス000BEHに
含まれているので、その先頭アドレス000BEHを逆
アセンブル表示アドレスとして設定する。
If it is from 00H, 05af is set to SELRB
7, from 00030H, 05ab is SEL R
Disassemble sequentially to B3, 000BFHn
o14f9 is disassembled into BR {_cstart + BDH, the disassembly display start address 000BFH specified by the user is the assemble code BR}.
Since it is included in the start address 000BEH of _cstart + BDH, the start address 000BEH is set as the disassembly display address.

【0084】次に、逆アセンブル解析手段121は、処
理ステップS26で設定した先頭アドレス000BEH
をユーザ指定の逆アセンブル表示先頭アドレスとして表
示装置114に出力する(図3の処理ステップS27)
下記に処理ステップS23の判定結果がNOの場合の説
明用プログラム例を示す。
Next, the disassembly analysis means 121 sets the start address 000BEH set in the processing step S26.
Is output to the display device 114 as the disassembly display start address specified by the user (processing step S27 in FIG. 3).
The following is an example of an explanation program when the determination result of the processing step S23 is NO.

【0085】 アドレス シンボル コード アセンブル・コード ↓ ↓ ↓ ↓ 00000 @cstart 05af SEL RB7 : (シンボル無し) : : 00030 05ab MOV W,A : (シンボル無し) : : 00060 092080fe00 MOVG SP,#0fe80h : (シンボル無し) : : 000BE 14f9 BR $_@cstat+BDH : (シンボル無し) : : 000E9 ?R_INS1 3ee886be MOVW HL,!_gSvar : (シンボル無し) : : 000F2 620100 MOVW BC,#1H 上述したように、第2の実施形態によれば、任意の範囲
として、ユーザー指定アドレスからアドレスの降順方向
にオブジェクト・コード解析開始アドレスを検索する範
囲を用意することによって、最初のシンボルの設定位置
までのアドレス数が多い場合は、それ以前の任意のアド
レスで検索を打ち切り、そのアドレスを逆アセンブル表
示ドレスに設定することが出来るので、インサーキット
・エミュレータからオブジェクト・コードを読み出し解
析する時間を短縮できる。
Address Symbol Code Assemble Code ↓ ↓ ↓ ↓ 00000 @cstart 05af SEL RB7: (no symbol):: 000030 05ab MOV W, A: (no symbol):: 0000600920fe00 MOVGSPh, # 0fe80h ):: 000BE 14f9 BR $ _ @ cstat + BDH: (no symbol):: 000E9? R_INS1 3ee886be MOVW HL ,! _GSvar: (no symbol):: 000F2 620100 MOVW BC, # 1H As described above, according to the second embodiment, as an arbitrary range, the object code analysis start address is set in the descending order of the address from the user-specified address. By preparing a search range, if the number of addresses up to the setting position of the first symbol is large, the search can be stopped at any address before that and the address can be set in the disassembly display address, The time required to read and analyze the object code from the in-circuit emulator can be reduced.

【0086】[0086]

【発明の効果】以上説明したように、本発明の逆アセン
ブラ表示アドレス設定方法は、ユーザが指定した逆アセ
ンブル表示先頭アドレスから降順方向にシンボルを検索
し、最初に検出したシンボルの示すアドレスからオブジ
ェクト・コードの解析を開始し、ユーザ指定の逆アセン
ブル表示アドレスが示すオブジェクト・コードを含んだ
アセンブル・コードの属する先頭アドレスを、逆アセン
ブル表示アドレスとして設定するので、指定された逆ア
センブル表示開始アドレスが、複数バイトのアセンブル
・コードの途中のアドレスであったときでも、正しいア
センブル・コードを表示させることができる。
As described above, according to the disassembler display address setting method of the present invention, a symbol is searched for in descending order from the disassembly display start address specified by the user, and the object is searched from the address indicated by the first detected symbol.・ Begins code analysis and sets the start address of the assemble code including the object code indicated by the user-specified disassembly display address as the disassembly display address. The correct assembling code can be displayed even when the address is in the middle of the plural-byte assembling code.

【0087】また、最初のシンボルの設定位置までのア
ドレス数が多い場合は、それ以前の任意のアドレスで検
索を打ち切り、そのアドレスを逆アセンブル表示ドレス
に設定することが出来るので、インサーキット・エミュ
レータからオブジェクト・コードを読み出し解析する時
間を短縮できる。
When the number of addresses up to the set position of the first symbol is large, the search can be terminated at an arbitrary address before that and the address can be set to the disassemble display address. The time required to read and analyze an object code from a computer can be reduced.

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

【図1】本発明の実施形態を適用する開発支援ツールの
主要部の構成図である。
FIG. 1 is a configuration diagram of a main part of a development support tool to which an embodiment of the present invention is applied.

【図2】本発明の第1の実施形態を説明するためのフロ
ーチャートである。
FIG. 2 is a flowchart for explaining the first embodiment of the present invention.

【図3】本発明の第2の実施形態を説明するためのフロ
ーチャートである。
FIG. 3 is a flowchart for explaining a second embodiment of the present invention.

【図4】従来の逆アセンブル表示アドレスの設定方法を
説明するためのフローチャートである。
FIG. 4 is a flowchart for explaining a conventional disassembly display address setting method.

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

1 開発支援ツール 11 インサーキット・エミュレータ 12 デバッガ 13 入力装置 14 表示装置 111 オブジェクト・プログラム 121 逆アセンブル解析手段 122 シンボル・テーブル S11,S12,S13,S14,S15,S16,S
17,S21,S22,S23,S24,S25,S2
6,S27 処理ステップ
1 Development Support Tool 11 In-Circuit Emulator 12 Debugger 13 Input Device 14 Display Device 111 Object Program 121 Disassembly Analysis Means 122 Symbol Table S11, S12, S13, S14, S15, S16, S
17, S21, S22, S23, S24, S25, S2
6, S27 processing step

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 ユーザからのコマンド入力情報を受けて
処理する入力装置と、オブジェクト・プログラムが実行
可能なインサーキット・エミュレータと、解析対象プロ
グラムのアドレスおよびシンボルをあらかじめ定めて格
納したシンボル・テーブルと前記オブジェクト・コード
からアセンブル・コードに変換する逆アセンブル解析手
段とをもつデバッガと、ユーザに必要な情報を表示する
表示装置とを用いて、前記入力装置からユーザにより指
定された前記オブジェクト・コードの逆アセンブル表示
先頭アドレスが前記変換対象の全アドレスのうちのどの
アドレスであっても、前記逆アセンブル解析手段により
前記逆アセンブル表示先頭アドレスが含まれるオブジェ
クト・コードの先頭アドレスを解析開始アドレスとして
自動設定させるとともにその設定されたアドレスから逆
アセンブルを開始し、そのアセンブル結果の表示アドレ
スも前記オブジェクト・コードの先頭アドレスを前記表
示装置に表示させることを特徴とする逆アセンブル表示
アドレスの設定方法。
An input device for receiving and processing command input information from a user, an in-circuit emulator capable of executing an object program, a symbol table storing addresses and symbols of a program to be analyzed in a predetermined manner. Using a debugger having disassembly analyzing means for converting the object code into assemble code, and a display device for displaying information necessary for a user, the object code specified by the user from the input device is used. Even if the disassembly display start address is any of the addresses to be converted, the disassembly analysis means automatically sets the start address of the object code including the disassembly display start address as the analysis start address. Let me A disassembly display address is started from the set address, and the display address of the assembling result is also displayed on the display device at the head address of the object code.
【請求項2】 前記オブジェクト・コードが複数アドレ
スを占有する複数バイト長の機械語で構成され、前記複
数アドレスのなかに前記逆アセンブル表示先頭アドレス
が含まれているときは、前記複数アドレスの先頭アドレ
スを表示する請求項1記載の逆アセンブル表示アドレス
の設定方法。
2. The method according to claim 1, wherein the object code is composed of a machine language having a plurality of bytes and occupying a plurality of addresses. When the disassembled display start address is included in the plurality of addresses, a start of the plurality of addresses is provided. 2. The method for setting a disassembly display address according to claim 1, wherein the address is displayed.
【請求項3】 前記オブジェクト・コードが複数アドレ
スを占有する複数バイト長の機械語で構成され、前記複
数アドレスのなかに前記逆アセンブル表示先頭アドレス
が含まれているときは、前記複数アドレスの先頭アドレ
スを表示するのに対応して、前記複数バイト長の機械語
に対応する1塊のアセンブル・コードに逆アセンブルす
る請求項2記載の逆アセンブル表示アドレスの設定方
法。
3. The method according to claim 1, wherein the object code is composed of a machine language having a plurality of bytes and occupying a plurality of addresses. When the plurality of addresses include the disassembly display start address, the start of the plurality of addresses is provided. 3. The disassembly display address setting method according to claim 2, wherein the assembling code is disassembled into a block of assembling codes corresponding to the machine language having a length of plural bytes in response to displaying the address.
【請求項4】 前記解析開始アドレスの設定は、あらか
じめデバッグ用のシンボルが所定のアドレスに設けられ
ている解析対象プログラム中の、前記逆アセンブル表示
先頭アドレスに最も近いアドレスからアドレス値が減少
する降順方向にシンボルを探し、最初に見つかった前記
シンボルのアドレスを解析開始アドレスとし、見つから
なければスタート・アドレスを解析開始アドレスとする
請求項1記載の逆アセンブル表示アドレスの設定方法。
4. The analysis start address is set in a descending order in which an address value decreases from an address closest to the disassembly display start address in an analysis target program in which debugging symbols are provided at predetermined addresses in advance. 2. The disassembly display address setting method according to claim 1, wherein a symbol is searched in the direction, and an address of the symbol found first is set as an analysis start address, and if not found, a start address is set as an analysis start address.
【請求項5】 前記解析開始アドレスの設定は、あらか
じめデバッグ用のシンボルが所定のアドレスに設けられ
ている解析対象プログラム中の、前記逆アセンブル表示
先頭アドレスに最も近いアドレスからアドレス値が減少
する降順方向の任意の範囲で前記シンボルを探し、最初
に見つかったシンボルのアドレスを解析開始アドレスと
し、見つからなければ前記逆アセンブル表示先頭アドレ
スを解析開始アドレスとする請求項1記載の逆アセンブ
ル表示アドレスの設定方法。
5. The analysis start address is set in a descending order in which an address value decreases from an address closest to the disassembly display start address in an analysis target program in which a symbol for debugging is provided at a predetermined address in advance. 2. The disassembly display address setting according to claim 1, wherein the symbol is searched for in an arbitrary range in the direction, and the address of the symbol found first is set as the analysis start address, and if not found, the disassembly display start address is set as the analysis start address. Method.
【請求項6】 前記解析開始アドレスの設定は、あらか
じめデバッグ用のシンボルが所定のアドレスに設けらて
いる解析対象プログラム中の、前記逆アセンブル表示先
頭アドレスに最も近いアドレスから降順方向の任意の範
囲で前記シンボルを探し、最初に見つかったシンボルの
アドレスを解析開始アドレスとし、見つからなければ、
解析対象プログラムの開始アドレスを前記逆アセンブル
表示先頭アドレスを解析開始アドレスとする請求項1記
載の逆アセンブル表示アドレスの設定方法。
6. The analysis start address is set in an arbitrary range in a descending order from an address closest to the disassembly display start address in an analysis target program in which debugging symbols are provided at predetermined addresses in advance. The above symbol is searched, and the address of the first found symbol is used as the analysis start address.
2. The disassembly display address setting method according to claim 1, wherein the start address of the analysis target program is the disassembly display start address and the analysis start address is used.
【請求項7】 ユーザからの入力情報を受ける入力装置
と、オブジェクト・プログラムが実行可能なインサーキ
ット・エミュレータと、前記オブジェクト・コードから
アセンブル・コードに変換する逆アセンブル解析手段を
もつデバッガと、ユーザに必要な情報を表示する表示装
置とを用いて、前記逆アセンブル解析手段により、ユー
ザが指定する逆アセンブルすべき逆アセンブル表示先頭
アドレスを取得する第1の処理と、取得したユーザ指定
の前記逆アセンブル表示先頭アドレスを基にして、前記
逆アセンブル解析手段により、あらかじめデバッグ用の
シンボルが所定のアドレスに設けられている解析対象プ
ログラムをアドレスの減少する降順方向に前記シンボル
を検索する第2の処理と、前記逆アセンブル解析手段に
より検出した前記シンボルが設定されたアドレスの先頭
アドレスを前記オブジェクト・コード解析開始アドレス
とする第3の処理と、降順方向に開始アドレスまで検索
しても、前記シンボルが発見されなかった場合は前記開
始アドレスをオブジェクト・コード解析開始アドレスと
する第4の処理と、前記第3および前記第4の処理で設
定された前記オブジェクト・コード解析開始アドレスか
ら前記オブジェクト・コードを解析して逆アセンブルす
るアセンブル・コード内に前記ユーザ指定の逆アセンブ
ル表示先頭アドレスが含まれるときはアセンブル・コー
ドの先頭アドレスを逆アセンブル表示先頭アドレスとし
て設定する第5の処理と、設定された逆アセンブル表示
アドレスから逆アセンブルを開始するとともに、前記ア
センブル・コードの先頭アドレスを逆アセンブル表示デ
ータとして前記表示装置に出力する第6の処理とを有す
ることを特徴とする逆アセンブル表示アドレスの設定方
法。
7. An input device for receiving input information from a user, an in-circuit emulator capable of executing an object program, a debugger having disassembly analyzing means for converting the object code into assemble code, A first process for obtaining a disassembly display start address specified by a user to be disassembled by the disassembly analyzing means using a display device for displaying information necessary for the user; A second process of searching for an analysis target program in which a symbol for debugging is provided in advance at a predetermined address by the disassembly analysis means on the basis of the assemble display start address in the descending order in which the address decreases. And the system detected by the disassembly analysis means. A third process in which the start address of the address in which the symbol is set is the object code analysis start address, and if the symbol is not found even when the start address is searched in the descending direction, the start address is set to the object. A fourth process to be a code analysis start address; and an assemble code for analyzing and disassembling the object code from the object code analysis start address set in the third and fourth processes. Fifth processing for setting the assembling code start address as the disassembly display start address when the user-specified disassembly display start address is included, and starting disassembly from the set disassembly display address; Reverse the start address of the assemble code Disassemble display setting of addresses; and a sixth process of outputting to the display device as assemble display data.
【請求項8】 ユーザからの入力情報を受ける入力装置
と、オブジェクト・プログラムが実行可能なインサーキ
ット・エミュレータと、前記オブジェクト・コードから
アセンブル・コードに変換する逆アセンブル解析手段を
もつデバッガと、ユーザに必要な情報を表示する表示装
置とを用いて、前記逆アセンブル解析手段により、ユー
ザが指定する逆アセンブルすべき逆アセンブル表示先頭
アドレスを取得する第1の処理と、取得した前記ユーザ
指定の前記逆アセンブル表示先頭アドレスを基にして、
前記逆アセンブル解析手段により、あらかじめデバッグ
用のシンボルが所定のアドレスに設けられている解析対
象プログラムをアドレスの減少する降順方向に、任意の
範囲で検索する第2の処理と、前記任意の範囲で前記シ
ンボルが検出された場合、前記逆アセンブル解析手段に
より検出したシンボルの示すアドレスをオブジェクト・
コード解析開始アドレスとする第3の処理と、前記オブ
ジェクト・コードを解析して逆アセンブルするアセンブ
ル・コード内に前記ユーザ指定の前記逆アセンブル表示
先頭アドレスが含まれるときは前記アセンブル・コード
の先頭アドレスを前記逆アセンブル表示先頭アドレスと
して設定する第4の処理と、前記任意の範囲に前記シン
ボルが検出されなかった場合、前記逆アセンブル解析手
段により、前記ユーザ指定の前記逆アセンブル先頭アド
レスを前記逆アセンブル表示先頭アドレスとして設定す
る第5の処理と、前記第4または前記第5で設定された
前記アセンブル・コードの先頭アドレスから逆アセンブ
ルを開始するとともに前記アセンブル・コードの先頭ア
ドレスを逆アセンブル表示データとして前記表示装置に
出力する第6の処理とを有することを特徴とする逆アセ
ンブル表示アドレスの設定方法。
8. An input device for receiving input information from a user, an in-circuit emulator capable of executing an object program, a debugger having disassembly analyzing means for converting the object code into assemble code, A first processing for obtaining a disassembly display head address to be disassembled specified by a user by the disassembly analyzing means using a display device for displaying information necessary for the user; Based on the disassembly display start address,
A second process of searching for an analysis target program in which a debugging symbol is provided at a predetermined address in advance in a descending order in which the address decreases in an arbitrary range by the disassembly analysis unit; When the symbol is detected, the address indicated by the symbol detected by the disassembly analyzing means is set to an object
A third processing to be a code analysis start address; and, when the disassembly display start address specified by the user is included in the assemble code for analyzing and disassembling the object code, the start address of the assemble code. As the disassembly display start address, and when the symbol is not detected in the arbitrary range, the disassembly analysis means replaces the disassembly start address specified by the user with the disassembly address. Fifth processing for setting as a display start address, starting disassembly from the start address of the assemble code set in the fourth or fifth, and using the start address of the assemble code as disassemble display data Sixth processing for outputting to the display device Disassemble display setting of the address, characterized in that it comprises and.
【請求項9】 ユーザからの入力情報を受ける入力装置
と、オブジェクト・プログラムが実行可能なインサーキ
ット・エミュレータと、前記オブジェクト・コードから
アセンブル・コードに変換する逆アセンブル解析手段を
もつデバッガと、ユーザに必要な情報を表示する表示装
置とを用いて、前記逆アセンブル解析手段により、ユー
ザが指定する逆アセンブルすべき逆アセンブル表示先頭
アドレスを取得する第1の処理と、取得したユーザ指定
の前記逆アセンブル表示先頭アドレスを基にして、前記
逆アセンブル解析手段により、あらかじめデバッグ用の
シンボルが所定のアドレスに設けられている解析対象プ
ログラムをアドレスの減少する降順方向に前記シンボル
を検索する第2の処理と、前記逆アセンブル解析手段に
より検出した前記シンボルが設定されたアドレスの先頭
アドレスを前記オブジェクト・コード解析開始アドレス
とする第3の処理と、降順方向に開始アドレスまで検索
しても、前記シンボルが発見されなかった場合は前記開
始アドレスをオブジェクト・コード解析開始アドレスと
する第4の処理と、前記第3および前記第4の処理で設
定された前記オブジェクト・コード解析開始アドレスか
ら前記オブジェクト・コードを解析して逆アセンブルす
るアセンブル・コード内に前記ユーザ指定の逆アセンブ
ル表示先頭アドレスが含まれるときはアセンブル・コー
ドの先頭アドレスを逆アセンブル表示先頭アドレスとし
て設定する第5の処理と、設定された逆アセンブル表示
アドレスから逆アセンブルを開始するとともに、前記ア
センブル・コードの先頭アドレスを逆アセンブル表示デ
ータとして前記表示装置に出力する第6の処理とを有す
ることを特徴とする逆アセンブル表示アドレスの設定方
法をコンピュータに実行させるためのプログラムを記録
したコンピュータ読みとり可能な記録媒体。
9. An input device for receiving input information from a user, an in-circuit emulator capable of executing an object program, a debugger having disassembly analyzing means for converting the object code into assemble code, A first process for obtaining a disassembly display start address specified by a user to be disassembled by the disassembly analyzing means using a display device for displaying information necessary for the user; A second process of searching for an analysis target program in which a symbol for debugging is provided in advance at a predetermined address by the disassembly analysis means on the basis of the assemble display start address in the descending order in which the address decreases. And the system detected by the disassembly analysis means. A third process in which the start address of the address in which the symbol is set is the object code analysis start address, and if the symbol is not found even when the start address is searched in the descending direction, the start address is set to the object. A fourth process to be a code analysis start address; and an assemble code for analyzing and disassembling the object code from the object code analysis start address set in the third and fourth processes. Fifth processing for setting the assembling code start address as the disassembly display start address when the user-specified disassembly display start address is included, and starting disassembly from the set disassembly display address; Reverse the start address of the assemble code A computer-readable recording medium a program for implementing the method of setting the disassemble display addresses to computers and having a sixth process of outputting to the display device as assemble display data.
【請求項10】 ユーザからの入力情報を受ける入力装
置と、オブジェクト・プログラムが実行可能なインサー
キット・エミュレータと、前記オブジェクト・コードか
らアセンブル・コードに変換する逆アセンブル解析手段
をもつデバッガと、ユーザに必要な情報を表示する表示
装置とを用いて、前記逆アセンブル解析手段により、ユ
ーザが指定する逆アセンブルすべき逆アセンブル表示先
頭アドレスを取得する第1の処理と、取得した前記ユー
ザ指定の前記逆アセンブル表示先頭アドレスを基にし
て、前記逆アセンブル解析手段により、あらかじめデバ
ッグ用のシンボルが所定のアドレスに設けられている解
析対象プログラムをアドレスの減少する降順方向に、任
意の範囲で検索する第2の処理と、前記任意の範囲で前
記シンボルが検出された場合、前記逆アセンブル解析手
段により検出したシンボルの示すアドレスをオブジェク
ト・コード解析開始アドレスとする第3の処理と、前記
オブジェクト・コードを解析して逆アセンブルするアセ
ンブル・コード内に前記ユーザ指定の前記逆アセンブル
表示先頭アドレスが含まれるときは前記アセンブル・コ
ードの先頭アドレスを前記逆アセンブル表示先頭アドレ
スとして設定する第4の処理と、前記任意の範囲に前記
シンボルが検出されなかった場合、前記逆アセンブル解
析手段により、前記ユーザ指定の前記逆アセンブル先頭
アドレスを前記逆アセンブル表示先頭アドレスとして設
定する第5の処理と、前記第4または前記第5で設定さ
れた前記アセンブル・コードの先頭アドレスから逆アセ
ンブルを開始するとともに前記アセンブル・コードの先
頭アドレスを逆アセンブル表示データとして前記表示装
置に出力する第6の処理とを有することを特徴とする逆
アセンブル表示アドレスの設定方法をコンピュータに実
行させるためのプログラムを記録したコンピュータ読み
とり可能な記録媒体。
10. An input device for receiving input information from a user, an in-circuit emulator capable of executing an object program, a debugger having disassembly analyzing means for converting the object code into assemble code, A first processing for obtaining a disassembly display head address to be disassembled specified by a user by the disassembly analyzing means using a display device for displaying information necessary for the user; On the basis of the disassembly display start address, the disassembly analysis means searches for an analysis target program in which debug symbols are provided at predetermined addresses in advance in an arbitrary range in a descending order of decreasing addresses. 2, the symbol is detected in the arbitrary range. In this case, a third process in which an address indicated by the symbol detected by the disassembly analyzing means is used as an object code analysis start address, and the user-specified address in the assemble code for analyzing and disassembling the object code. A fourth process of setting the head address of the assemble code as the disassembly display start address when the disassembly display start address is included, and performing the reverse operation when the symbol is not detected in the arbitrary range. Fifth processing for setting the disassembly start address specified by the user as the disassembly display start address by the assemble analyzing means, and performing reverse processing from the start address of the assemble code set in the fourth or fifth. Start assembling and assemble And a sixth process for outputting the head address of the code as disassembled display data to the display device. The computer readable recording a program for causing a computer to execute a disassembled display address setting method. Recording medium.
JP2000166220A 2000-06-02 2000-06-02 Setting method for disassemble display address and recording medium Pending JP2001344128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000166220A JP2001344128A (en) 2000-06-02 2000-06-02 Setting method for disassemble display address and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000166220A JP2001344128A (en) 2000-06-02 2000-06-02 Setting method for disassemble display address and recording medium

Publications (1)

Publication Number Publication Date
JP2001344128A true JP2001344128A (en) 2001-12-14

Family

ID=18669574

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000166220A Pending JP2001344128A (en) 2000-06-02 2000-06-02 Setting method for disassemble display address and recording medium

Country Status (1)

Country Link
JP (1) JP2001344128A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004077294A1 (en) * 2003-02-26 2004-09-10 Secure Ware Inc. Unauthorized processing judgment method, data processing device, computer program, and recording medium
WO2004077295A1 (en) * 2003-02-26 2004-09-10 Secure Ware Inc. Unauthorized processing judgment method, data processing device, computer program, and recording medium
JP2007072568A (en) * 2005-09-05 2007-03-22 Nec Electronics Corp Debugging device and debugging method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004077294A1 (en) * 2003-02-26 2004-09-10 Secure Ware Inc. Unauthorized processing judgment method, data processing device, computer program, and recording medium
WO2004077295A1 (en) * 2003-02-26 2004-09-10 Secure Ware Inc. Unauthorized processing judgment method, data processing device, computer program, and recording medium
US7827612B2 (en) 2003-02-26 2010-11-02 Secure Ware Inc. Malicious-process-determining method, data processing apparatus and recording medium
US7895655B2 (en) 2003-02-26 2011-02-22 Secure Ware Inc. Malicious-process-determining method, data processing apparatus and recording medium
JP2007072568A (en) * 2005-09-05 2007-03-22 Nec Electronics Corp Debugging device and debugging method

Similar Documents

Publication Publication Date Title
US5926638A (en) Program debugging system for debugging a program having graphical user interface
US6658649B1 (en) Method, apparatus and article of manufacture for debugging a user defined region of code
JP5376509B2 (en) Execution history trace method
US7266809B2 (en) Software debugger and software development support system for microcomputer operable to execute conditional execution instruction
US7178135B2 (en) Scope-based breakpoint selection and operation
JPH0689200A (en) Debug system and method
US9645911B2 (en) System and method for debugging firmware/software by generating trace data
US6618853B1 (en) Program production system for semiconductor tester
JP3380390B2 (en) Debug information display device
JP6763153B2 (en) Hardware / software co-verification device and hardware / software co-verification method
US20030177471A1 (en) System and method for graphically developing a program
JP2001344128A (en) Setting method for disassemble display address and recording medium
JP2001034497A (en) Method for acquiring binary code of inverse assembler
JP5021584B2 (en) Microcomputer simulator, simulation method thereof, program, and computer-readable medium
JP2008204023A (en) Programmable controller system and debug method for programmable controller
JP2003316605A (en) Debugger program
CN113311931B (en) Double-reset vector 8-bit MCU (microprogrammed control Unit) architecture convenient for IAP (inter Access Point) and method thereof
JP3309792B2 (en) Stack pointer trace device, stack pointer trace method, and recording medium
CN114764692A (en) Method and device for determining working hours of products
JPH04217034A (en) Display system for program trace
Gaurav Implementation of Breakpoints in GDB for Sim-nML based Architectures
CN114490342A (en) BIOS (basic input output System) automatic test system and method
JP2008217506A (en) Program debugging method
JP3398178B2 (en) Simulator
JPH11272500A (en) Debug method and debug device for the same and program storage medium

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040121

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040309