MCPcopy Create free account
hub / github.com/HexHive/NASS / PrintHelp

Function PrintHelp

fuzz/libfuzzer/FuzzerDriver.cpp:100–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98static std::string *ProgName;
99
100static void PrintHelp() {
101 Printf("Usage:\n");
102 auto Prog = ProgName->c_str();
103 Printf("\nTo run fuzzing pass 0 or more directories.\n");
104 Printf("%s [-flag1=val1 [-flag2=val2 ...] ] [dir1 [dir2 ...] ]\n", Prog);
105
106 Printf("\nTo run individual tests without fuzzing pass 1 or more files:\n");
107 Printf("%s [-flag1=val1 [-flag2=val2 ...] ] file1 [file2 ...]\n", Prog);
108
109 Printf("\nFlags: (strictly in form -flag=value)\n");
110 size_t MaxFlagLen = 0;
111 for (size_t F = 0; F < kNumFlags; F++)
112 MaxFlagLen = std::max(strlen(FlagDescriptions[F].Name), MaxFlagLen);
113
114 for (size_t F = 0; F < kNumFlags; F++) {
115 const auto &D = FlagDescriptions[F];
116 if (strstr(D.Description, "internal flag") == D.Description) continue;
117 Printf(" %s", D.Name);
118 for (size_t i = 0, n = MaxFlagLen - strlen(D.Name); i < n; i++)
119 Printf(" ");
120 Printf("\t");
121 Printf("%d\t%s\n", D.Default, D.Description);
122 }
123 Printf("\nFlags starting with '--' will be ignored and "
124 "will be passed verbatim to subprocesses.\n");
125}
126
127static const char *FlagValue(const char *Param, const char *Name) {
128 size_t Len = strlen(Name);

Callers 1

FuzzerDriverFunction · 0.85

Calls 3

strstrFunction · 0.85
PrintfFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected