summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerUtilWindows.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerUtilWindows.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp b/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
index 3ca1f2c8f56..b9e039f81e5 100644
--- a/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
+++ b/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
@@ -178,6 +178,20 @@ const void *SearchMemory(const void *Data, size_t DataLen, const void *Patt,
return NULL;
}
+std::string DisassembleCmd(const std::string &FileName) {
+ if (ExecuteCommand("dumpbin > nul") == 0)
+ return "dumpbin /disasm " + FileName;
+ if (ExecuteCommand("llvm-objdump > nul") == 0)
+ return "llvm-objdump -d " + FileName;
+ Printf("libFuzzer: couldn't find tool to disassemble (dumpbin, "
+ "llvm-objdump)\n");
+ exit(1);
+}
+
+std::string SearchRegexCmd(const std::string &Regex) {
+ return "findstr /r \"" + Regex + "\"";
+}
+
} // namespace fuzzer
#endif // LIBFUZZER_WINDOWS
OpenPOWER on IntegriCloud