Skip to content

Commit 4eefaef

Browse files
committed
Merge branch 'main' of github.com:simotin13/CodeCoverage
2 parents 1b182be + 15e5a93 commit 4eefaef

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

README-ja.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ Pinのプラグインとして動作します。
77
# サポートしているプラットフォーム
88
- GNU/Linux
99

10-
# 使い方
11-
12-
# Quick Start
10+
# 使い方(Quick Start)
1311
本レポジトリをダウンロードしてください。
12+
```
13+
git clone [email protected]:simotin13/CodeCoverage.git
14+
```
1415

15-
また、実行にはPin本体が必要になります。
16+
実行にはPin本体が必要になります。
1617
Pin本体は[Intel Pin](https://www.intel.com/content/www/us/en/developer/articles/tool/pin-a-dynamic-binary-instrumentation-tool.html)のサイトからダウンロードする必要があります。
1718

1819
ダウンロード&ビルド、および実行例のスクリプトがこのレポジトリに含まれています。
1920

2021
まずは、`00_setup.sh`を実行してください。
22+
```
23+
cd CodeCoverage/
24+
./00_setup.sh
25+
```
2126

2227
`00_setup.sh` では、
2328
[Pin 3.27](https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.27-98718-gbeaa5d51e-gcc-linux.tar.gz)
@@ -48,3 +53,12 @@ pinのツールをビルドする際の作法として、PIN本体のディレ
4853
../pin-3.27-98718-gbeaa5d51e-gcc-linux/pin -t ./obj-intel64/CodeCoverage.so -- <target_module_path> <target_args...>
4954
```
5055
のようにコマンドを実行してください。
56+
57+
# 注意事項
58+
このカバレッジツールでは行番号の情報を取得するためにDWARFのデバッグ情報を利用しています。
59+
Pin 3.27ではデバッグ情報としてDWARF4をサポートしています。カバレッジの計測対象のアプリケーションのをビルドする際は `-g` オプションと `-gdwarf-4` オプションをつけてビルドしてください。
60+
61+
例).
62+
```
63+
gcc -g -gdwarf-4 main.c
64+
```

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ This repository is a code coverage tool that utilizes [Pin](https://www.intel.co
77
- GNU/Linux
88

99
# How to use (Quick Start)
10-
Please download this repository.
10+
First, download this repository.
11+
```
12+
git clone [email protected]:simotin13/CodeCoverage.git
13+
```
1114

12-
In addition, the Pin tool itself is required to run the code.
15+
Pin tool itself is required to run the code.
1316
You can download the Pin tool from the Intel Pin website.
1417

15-
Scripts for downloading, building, and running examples are included in this repository. Please start by running `00_setup.sh.`
18+
Scripts for downloading, building, and running examples are included in this repository.
19+
Please start by running `00_setup.sh.`
20+
21+
```
22+
cd CodeCoverage/
23+
./00_setup.sh
24+
```
1625

1726
In `00_setup.sh`, Pin 3.27 is downloaded and extracted to the same directory as this repository. Then, the source code in this repository is built.
1827

@@ -45,3 +54,11 @@ To run this tool, execute the following command:
4554

4655
where <target_module_path> and <target_args...> are the path and any arguments for the target module you want to measure code coverage for.
4756

57+
# Note
58+
This coverage tool uses DWARF debugging information to obtain line number information.
59+
Pin 3.27 supports DWARF4 as debugging information. When building the application for which you want to measure coverage, please build it with the `-g` and `-gdwarf-4` options.
60+
61+
例).
62+
```
63+
gcc -g -gdwarf-4 main.c
64+
```

0 commit comments

Comments
 (0)