diff options
author | Kostya Serebryany <kcc@google.com> | 2017-08-04 23:49:53 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-08-04 23:49:53 +0000 |
commit | a84a6c1e484e40a2b37c0f95cc9c88a466c078d7 (patch) | |
tree | b23a864a7c8bd676ced13a4515de10e253df9866 /llvm/lib/Fuzzer/FuzzerTracePC.h | |
parent | 4a8a0a2a88df617e002d62034849db8b432092c6 (diff) | |
download | bcm5719-llvm-a84a6c1e484e40a2b37c0f95cc9c88a466c078d7.tar.gz bcm5719-llvm-a84a6c1e484e40a2b37c0f95cc9c88a466c078d7.zip |
[libFuzzer] use the in-binary pc table (instead of PCs captured at run-time) to implement -exit_on_src_pos
llvm-svn: 310151
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerTracePC.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.h b/llvm/lib/Fuzzer/FuzzerTracePC.h index ad832d7b2d4..d5d2985d62c 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.h +++ b/llvm/lib/Fuzzer/FuzzerTracePC.h @@ -133,6 +133,13 @@ class TracePC { } uintptr_t GetMaxStackOffset() const { return InitialStack - LowestStack; } + template<class CallBack> + void ForEachObservedPC(CallBack CB) { + if (ObservedPCs) + for (auto PC : *ObservedPCs) + CB(PC); + } + private: bool UseCounters = false; bool UseValueProfile = false; |