r282752 - [sanitizer-coverage] a bit more docs

Kostya Serebryany via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 12:06:09 PDT 2016


Author: kcc
Date: Thu Sep 29 14:06:09 2016
New Revision: 282752

URL: http://llvm.org/viewvc/llvm-project?rev=282752&view=rev
Log:
[sanitizer-coverage] a bit more docs

Modified:
    cfe/trunk/docs/SanitizerCoverage.rst

Modified: cfe/trunk/docs/SanitizerCoverage.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SanitizerCoverage.rst?rev=282752&r1=282751&r2=282752&view=diff
==============================================================================
--- cfe/trunk/docs/SanitizerCoverage.rst (original)
+++ cfe/trunk/docs/SanitizerCoverage.rst Thu Sep 29 14:06:09 2016
@@ -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
 =================




More information about the cfe-commits mailing list