diff options
| author | Kostya Serebryany <kcc@google.com> | 2016-09-29 19:06:09 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2016-09-29 19:06:09 +0000 |
| commit | 851cb98269e94bb39cf2ee2b2f4b307535c4fb02 (patch) | |
| tree | c282bb9290865ab64c885b134bf7c4e8def90f53 /clang/docs/SanitizerCoverage.rst | |
| parent | d6ae22a7ab7333f4c0d588715462d22c9a6068d8 (diff) | |
| download | bcm5719-llvm-851cb98269e94bb39cf2ee2b2f4b307535c4fb02.tar.gz bcm5719-llvm-851cb98269e94bb39cf2ee2b2f4b307535c4fb02.zip | |
[sanitizer-coverage] a bit more docs
llvm-svn: 282752
Diffstat (limited to 'clang/docs/SanitizerCoverage.rst')
| -rw-r--r-- | clang/docs/SanitizerCoverage.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/docs/SanitizerCoverage.rst b/clang/docs/SanitizerCoverage.rst index 051a365e34f..f32976e2c18 100644 --- a/clang/docs/SanitizerCoverage.rst +++ b/clang/docs/SanitizerCoverage.rst @@ -385,7 +385,7 @@ Example: // Now you can get the PC and do whatever you want: // store it somewhere or symbolize it and print right away. // The values of `*guard` are as you set them in - // __sanitizer_cov_trace_pc_guard_init and so you can make the consecutive + // __sanitizer_cov_trace_pc_guard_init and so you can make them consecutive // and use them to dereference an array or a bit vector. void *PC = __builtin_return_address(0); char PcDescr[1024]; @@ -415,6 +415,18 @@ Example: guard: 0x71bcd4 2 PC 0x4ecd5b in main trace-pc-guard-example.cc:2 guard: 0x71bcd8 3 PC 0x4ecd9e in main trace-pc-guard-example.cc:3:7 +.. code-block:: console + + ASAN_OPTIONS=strip_path_prefix=`pwd`/ ./a.out with-foo + + +.. code-block:: console + + INIT: 0x71bcd0 0x71bce0 + guard: 0x71bcd4 2 PC 0x4ecd5b in main trace-pc-guard-example.cc:3 + guard: 0x71bcdc 4 PC 0x4ecdc7 in main trace-pc-guard-example.cc:4:17 + guard: 0x71bcd0 1 PC 0x4ecd20 in foo() trace-pc-guard-example.cc:2:14 + Tracing data flow ================= |

