@@ -148,19 +148,21 @@ With ``-fsanitize-coverage=pc-table`` the compiler will create a table of
148
148
instrumented PCs. Requires either ``-fsanitize-coverage=inline-8bit-counters `` or
149
149
``-fsanitize-coverage=trace-pc-guard ``.
150
150
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:
152
152
153
153
.. code-block :: c++
154
154
155
155
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) {
158
158
// [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
163
163
// 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.
164
166
}
165
167
166
168
0 commit comments