blob: 2b7b71fdbfa70b53e1187d5d5aec95d21343871f [file] [log] [blame]
kcc86e43882018-06-06 01:23:29 +00001//===- FuzzerDataFlowTrace.h - Internal header for the Fuzzer ---*- C++ -* ===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// fuzzer::DataFlowTrace; reads and handles a data-flow trace.
10//
11// A data flow trace is generated by e.g. dataflow/DataFlow.cpp
12// and is stored on disk in a separate directory.
13//
14// The trace dir contains a file 'functions.txt' which lists function names,
15// oner per line, e.g.
16// ==> functions.txt <==
17// Func2
18// LLVMFuzzerTestOneInput
19// Func1
20//
21// All other files in the dir are the traces, see dataflow/DataFlow.cpp.
22// The name of the file is sha1 of the input used to generate the trace.
23//
24// Current status:
25// the data is parsed and the summary is printed, but the data is not yet
26// used in any other way.
27//===----------------------------------------------------------------------===//
28
29#ifndef LLVM_FUZZER_DATA_FLOW_TRACE
30#define LLVM_FUZZER_DATA_FLOW_TRACE
31
32#include "FuzzerDefs.h"
33
34namespace fuzzer {
35struct DataFlowTrace {
36 void Init(const std::string &DirPath, const std::string &FocusFunction);
37};
38} // namespace fuzzer
39
40#endif // LLVM_FUZZER_DATA_FLOW_TRACE