JP2007052676A - データトレース方法およびトレースモジュール - Google Patents
データトレース方法およびトレースモジュール Download PDFInfo
- Publication number
- JP2007052676A JP2007052676A JP2005238029A JP2005238029A JP2007052676A JP 2007052676 A JP2007052676 A JP 2007052676A JP 2005238029 A JP2005238029 A JP 2005238029A JP 2005238029 A JP2005238029 A JP 2005238029A JP 2007052676 A JP2007052676 A JP 2007052676A
- Authority
- JP
- Japan
- Prior art keywords
- trace
- instruction
- data
- memory access
- trace data
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
【解決手段】 フェッチしたプログラムコードが、メモリアクセス命令の内のフレームポインタ操作であり、かつ直前のトレースデータが分岐命令であるときには、直後のトレースデータは、分岐命令直後のフレームポインタ操作から関数の入口にジャンプしてきたと考えられ、LR(リンクレジスタ:戻り先アドレス)は分岐命令のトレースから復元可能であり、また、SP(スタックポインタ)は直前のスタック回避操作のデータトレースから復元可能であるので、この直後のトレースデータ出力をマスクすることにより、デバッグに支障なくトレースデータを圧縮する。
【選択図】 図2
Description
mov r12,sp
push {fp,r12,lr,pc}
( fp:フレームポインタ、r12:汎用レジスタ、 sp:スタックポインタ、 lr:リンクレジスタ、 pc:プログラムカウンタ、 mov:代入命令、 push:スタック退避)、
{}に入っているレジスタをスタックに退避するが、直前にスタックポインタをr12レジスタに入れているので、毎回毎回上記のようなコードであれば、マスク可能なデータが分かる。即ち、fpの次のr12,lr,pcはマスクしても、全て後から推測可能となる。
mov r12,sp
push
となる場合には固定的な処理が出来なくなり、その場合にはr3,r4はマスクできない。
202 CPUコア
203 トレースモジュール
204 キャッシュメモリ
205 I/F
206 トレースデータ表示装置
207 外部メモリ
Claims (6)
- 分岐命令とメモリアクセス命令をトレース対象命令として分岐トレースデータ及びメモリアクセストレースデータを出力するデータトレース方法において、
フェッチしたプログラムコードが、メモリアクセス命令の内のフレームポインタ操作であり、かつ直前のトレースデータが分岐命令であるとき、前記フレームポインタ操作直後のトレースデータ出力をマスクすることにより、トレースデータを圧縮することを特徴とするデータトレース方法。 - 前記メモリアクセス命令がフレームポインタ操作ではないとき、または前記メモリアクセス命令がフレームポインタ操作であって且つ直前のトレースデータが分岐命令ではないときには、メモリアクセストレースデータとして出力することを特徴とする請求項1に記載のデータトレース方法。
- 分岐命令とメモリアクセス命令をトレース対象命令として分岐トレースデータ及びメモリアクセストレースデータを出力する手段を備えたトレースモジュールにおいて、
フェッチしたプログラムコードから前記トレース対象命令を判定する第1の判定手段と、該第1の判定手段によりトレース対象命令と判定されたプログラムコードがメモリアクセスであるか否かを判定する第2の判定手段と、該第2の判定手段によりメモリアクセスと判定された前記トレース対象命令がフレームポインタ操作であるか否かを判定する第3の判定手段と、該第3の判定手段によりフレームポインタ操作であると判定された前記トレース対象命令の直前のトレースデータが分岐命令であるか否かを判定する第4の判定手段と、該第4の判定手段により直前のトレースデータが分岐命令であると判定された前記フレームポインタ操作直後のトレースデータ出力をマスクする手段を備えていることを特徴とするトレースモジュール。 - 前記第2の判定手段でメモリアクセスではないと判定されたトレース対象命令から分岐トレースデータを出力する手段を備えていることを特徴とする請求項3に記載のトレースモジュール。
- 前記第3の判定手段でフレームポインタ操作ではないと判定されたメモリアクセス命令、および前記第3の判定手段でフレームポインタ操作であると判定され且つ前記第4の判定手段で前記フレームポインタ操作直前の命令が分岐命令ではないと判定されたトレース対象命令からメモリアクセストレースデータを出力する手段を備えていることを特徴とする請求項3または4に記載のトレースモジュール。
- コンピュータにデバッグ対象プログラムからトレースデータを出力する処理を実行させるためのプログラムであって、
フェッチしたプログラムコードが分岐命令であるとき、当該分岐命令の分岐トレースデータを出力する処理と、フェッチしたプログラムコードがメモリアクセス命令であるが、フレームポインタ操作ではないとき、当該メモリアクセスのトレースデータを出力する処理と、フェッチしたプログラムコードがメモリアクセス命令であって、かつフレームポインタ操作であるとき、直前のトレースデータが分岐命令であるか否かを判定する処理と、該判定の結果、直前のトレースデータが分岐命令ではないとき、前記メモリアクセスのトレースデータを出力する処理と、前記判定の結果、直前のトレースデータが分岐命令であるとき、前記フレームポインタ操作直後のトレースデータ(データアクセス)出力をマスクする処理を実行させることを特徴とするデータトレース用プログラム。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005238029A JP4725240B2 (ja) | 2005-08-18 | 2005-08-18 | データトレース方法およびトレースモジュール |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005238029A JP4725240B2 (ja) | 2005-08-18 | 2005-08-18 | データトレース方法およびトレースモジュール |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007052676A true JP2007052676A (ja) | 2007-03-01 |
JP4725240B2 JP4725240B2 (ja) | 2011-07-13 |
Family
ID=37917071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005238029A Expired - Fee Related JP4725240B2 (ja) | 2005-08-18 | 2005-08-18 | データトレース方法およびトレースモジュール |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4725240B2 (ja) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008065441A (ja) * | 2006-09-05 | 2008-03-21 | Fujitsu Ltd | デバッグシステム及びデバッグ回路 |
US7870541B1 (en) * | 2004-11-01 | 2011-01-11 | Wind River Systems, Inc. | Context tracing for software with a frame pointer and a stack pointer and with a stack pointer but without a frame pointer |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06274369A (ja) * | 1993-03-19 | 1994-09-30 | Hitachi Ltd | 最適化プログラムのデバッグ方式 |
JPH08161195A (ja) * | 1994-12-05 | 1996-06-21 | Matsushita Electric Ind Co Ltd | アドレストレース格納装置及びアドレストレース生成方法 |
JP2000222242A (ja) * | 1999-01-29 | 2000-08-11 | Internatl Business Mach Corp <Ibm> | コンパイル方法及び装置、並びにスタック・トレース方法及び装置 |
JP2003085000A (ja) * | 2001-09-10 | 2003-03-20 | Mitsubishi Electric Corp | トレース情報生成装置およびその方法 |
-
2005
- 2005-08-18 JP JP2005238029A patent/JP4725240B2/ja not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06274369A (ja) * | 1993-03-19 | 1994-09-30 | Hitachi Ltd | 最適化プログラムのデバッグ方式 |
JPH08161195A (ja) * | 1994-12-05 | 1996-06-21 | Matsushita Electric Ind Co Ltd | アドレストレース格納装置及びアドレストレース生成方法 |
JP2000222242A (ja) * | 1999-01-29 | 2000-08-11 | Internatl Business Mach Corp <Ibm> | コンパイル方法及び装置、並びにスタック・トレース方法及び装置 |
JP2003085000A (ja) * | 2001-09-10 | 2003-03-20 | Mitsubishi Electric Corp | トレース情報生成装置およびその方法 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7870541B1 (en) * | 2004-11-01 | 2011-01-11 | Wind River Systems, Inc. | Context tracing for software with a frame pointer and a stack pointer and with a stack pointer but without a frame pointer |
JP2008065441A (ja) * | 2006-09-05 | 2008-03-21 | Fujitsu Ltd | デバッグシステム及びデバッグ回路 |
Also Published As
Publication number | Publication date |
---|---|
JP4725240B2 (ja) | 2011-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8266608B2 (en) | Post-compile instrumentation of object code for generating execution trace data | |
US6708326B1 (en) | Method, system and program product comprising breakpoint handling mechanism for debugging and/or monitoring a computer instruction sequence | |
US8478948B2 (en) | Method and system for efficient tracing and profiling of memory accesses during program execution | |
JP3846939B2 (ja) | データプロセッサ | |
US7950001B2 (en) | Method and apparatus for instrumentation in a multiprocessing environment | |
JP5335887B2 (ja) | アドレスに基づく条件付きデバッグ命令を認証するデバッグ方法、制御方法、およびデバッグ装置 | |
JP5523872B2 (ja) | プログラムの動的分析方法及びその装置 | |
JP3731887B2 (ja) | 繰返し命令の追跡許可 | |
TWI461908B (zh) | 於即時指令追蹤紀錄中之除錯動作的選擇性紀錄技術 | |
JP5905911B2 (ja) | シングルステップ実行を用いる診断コード | |
US8037363B2 (en) | Generation of trace elements within a data processing apparatus | |
US20040030870A1 (en) | Software breakpoints with tailoring for multiple processor shared memory or multiple thread systems | |
JP2008529148A (ja) | デバッグ手段及び方法 | |
US20110320745A1 (en) | Data-scoped dynamic data race detection | |
US7353500B2 (en) | Suppressing execution of monitoring measurement program pointed to by inserted branch after threshold number of coverage to reduce instruction testing overhead | |
KR20110070468A (ko) | 인스트루먼테이션 실행 장치 및 방법 | |
US20120036501A1 (en) | Method and System for Capturing System and User Events Using Hardware Trace Devices | |
CN113742119A (zh) | 嵌入式系统的调用栈回溯方法、装置和计算机设备 | |
US7496899B2 (en) | Preventing loss of traced information in a data processing apparatus | |
Koju et al. | An efficient and generic reversible debugger using the virtual machine based approach | |
JP4725240B2 (ja) | データトレース方法およびトレースモジュール | |
CN111931191A (zh) | Linux平台二进制软件堆溢漏洞动态检测方法及系统 | |
Corliss et al. | Low-overhead interactive debugging via dynamic instrumentation with dise | |
US8499285B2 (en) | Method of logging stack trace information | |
US6615368B1 (en) | System and method for debugging highly integrated data processors |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080711 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20090702 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100423 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100525 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100723 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101207 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110203 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110315 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110328 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140422 Year of fee payment: 3 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |