Skip to content

Commit 271a509

Browse files
committed
[sanitizer-coverage] extend fsanitize-coverage=pc-table with flags for every PC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311794 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cb990cd commit 271a509

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/SanitizerCoverage.rst

+9-7
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,21 @@ With ``-fsanitize-coverage=pc-table`` the compiler will create a table of
148148
instrumented PCs. Requires either ``-fsanitize-coverage=inline-8bit-counters`` or
149149
``-fsanitize-coverage=trace-pc-guard``.
150150

151-
Users need to implement a single function to capture the counters at startup:
151+
Users need to implement a single function to capture the PC table at startup:
152152

153153
.. code-block:: c++
154154

155155
extern "C"
156-
void __sanitizer_cov_pcs_init(const uint8_t *pcs_beg,
157-
const uint8_t *pcs_end) {
156+
void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg,
157+
const uintptr_t *pcs_end) {
158158
// [pcs_beg,pcs_end) is the array of ptr-sized integers representing
159-
// PCs of the instrumented blocks in the current DSO.
160-
// Capture this array in order to read the PCs.
161-
// The number of PCs for a given DSO is the same as the number of
162-
// 8-bit counters (-fsanitize-coverage=inline-8bit-counters) or
159+
// pairs [PC,PCFlags] for every instrumented block in the current DSO.
160+
// Capture this array in order to read the PCs and their Flags.
161+
// The number of PCs and PCFlags for a given DSO is the same as the number
162+
// of 8-bit counters (-fsanitize-coverage=inline-8bit-counters) or
163163
// trace_pc_guard callbacks (-fsanitize-coverage=trace-pc-guard)
164+
// A PCFlags describes the basic block:
165+
// * bit0: 1 if the block is the function entry block, 0 otherwise.
164166
}
165167
166168

0 commit comments

Comments
 (0)