forked from lifting-bits/grr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoverage.cc
31 lines (21 loc) · 909 Bytes
/
coverage.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Copyright 2015 Peter Goodman ([email protected]), all rights reserved. */
#include <gflags/gflags.h>
#include <iostream>
#include "granary/code/index.h"
DEFINE_bool(persist, true, "Should the code cache be persisted?");
DEFINE_string(persist_dir, "", "Directory path to where runtime state should "
"be persisted. This should be unique for a "
"given set of binaries.");
extern "C" int main(int argc, char **argv, char **) {
using namespace granary;
google::SetUsageMessage(std::string(argv[0]) + " [options]");
google::ParseCommandLineFlags(&argc, &argv, false);
if (FLAGS_persist_dir.empty()) {
std::cerr << "Must provide a unique path to a directory where the "
<< "runtime state can be persisted." << std::endl;
return EXIT_FAILURE;
}
index::Init();
index::Dump();
return EXIT_SUCCESS;
}