mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
add DEBUGF
This commit is contained in:
@ -1582,7 +1582,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
|
||||||
SAYF(cMGN "[D]" cRST " cd '%s';", getthecwd());
|
DEBUGF("cd '%s';", getthecwd());
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
SAYF(" '%s'", argv[i]);
|
SAYF(" '%s'", argv[i]);
|
||||||
SAYF("\n");
|
SAYF("\n");
|
||||||
@ -1610,7 +1610,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
|
||||||
SAYF(cMGN "[D]" cRST " cd '%s';", getthecwd());
|
DEBUGF("cd '%s';", getthecwd());
|
||||||
for (i = 0; i < (s32)cc_par_cnt; i++)
|
for (i = 0; i < (s32)cc_par_cnt; i++)
|
||||||
SAYF(" '%s'", cc_params[i]);
|
SAYF(" '%s'", cc_params[i]);
|
||||||
SAYF("\n");
|
SAYF("\n");
|
||||||
|
@ -182,9 +182,7 @@ static void edit_params(int argc, char **argv) {
|
|||||||
instrim = 1;
|
instrim = 1;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
SAYF(cMGN "[D] " cRST
|
DEBUGF("passthrough=%s instrim=%d, gold_pos=%d, gold_present=%s inst_present=%s rt_present=%s rt_lto_present=%s\n",
|
||||||
"passthrough=%s instrim=%d, gold_pos=%d, gold_present=%s "
|
|
||||||
"inst_present=%s rt_present=%s rt_lto_present=%s\n",
|
|
||||||
passthrough ? "true" : "false", instrim, gold_pos,
|
passthrough ? "true" : "false", instrim, gold_pos,
|
||||||
gold_present ? "true" : "false", inst_present ? "true" : "false",
|
gold_present ? "true" : "false", inst_present ? "true" : "false",
|
||||||
rt_present ? "true" : "false", rt_lto_present ? "true" : "false");
|
rt_present ? "true" : "false", rt_lto_present ? "true" : "false");
|
||||||
@ -280,7 +278,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (getcwd(thecwd, sizeof(thecwd)) != 0) strcpy(thecwd, ".");
|
if (getcwd(thecwd, sizeof(thecwd)) != 0) strcpy(thecwd, ".");
|
||||||
|
|
||||||
SAYF(cMGN "[D] " cRST "cd \"%s\";", thecwd);
|
DEBUGF("cd \"%s\";", thecwd);
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
SAYF(" \"%s\"", argv[i]);
|
SAYF(" \"%s\"", argv[i]);
|
||||||
SAYF("\n");
|
SAYF("\n");
|
||||||
@ -315,7 +313,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
|
||||||
SAYF(cMGN "[D]" cRST " cd \"%s\";", thecwd);
|
DEBUGF("cd \"%s\";", thecwd);
|
||||||
for (i = 0; i < ld_param_cnt; i++)
|
for (i = 0; i < ld_param_cnt; i++)
|
||||||
SAYF(" \"%s\"", ld_params[i]);
|
SAYF(" \"%s\"", ld_params[i]);
|
||||||
SAYF("\n");
|
SAYF("\n");
|
||||||
@ -333,7 +331,7 @@ int main(int argc, char **argv) {
|
|||||||
if (pid < 0) PFATAL("fork() failed");
|
if (pid < 0) PFATAL("fork() failed");
|
||||||
|
|
||||||
if (waitpid(pid, &status, 0) <= 0) PFATAL("waitpid() failed");
|
if (waitpid(pid, &status, 0) <= 0) PFATAL("waitpid() failed");
|
||||||
if (debug) SAYF(cMGN "[D] " cRST "linker result: %d\n", status);
|
if (debug) DEBUGF("linker result: %d\n", status);
|
||||||
|
|
||||||
if (!just_version) {
|
if (!just_version) {
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
if (getenv("AFL_DEBUG")) {
|
if (getenv("AFL_DEBUG")) {
|
||||||
|
|
||||||
SAYF(cMGN "[D]" cRST);
|
DEBUGF("");
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
SAYF(" %s", argv[i]);
|
SAYF(" %s", argv[i]);
|
||||||
SAYF("\n");
|
SAYF("\n");
|
||||||
@ -1066,7 +1066,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
if (get_afl_env("AFL_DEBUG")) {
|
if (get_afl_env("AFL_DEBUG")) {
|
||||||
|
|
||||||
int i = optind;
|
int i = optind;
|
||||||
SAYF(cMGN "[D]" cRST " %s:", fsrv->target_path);
|
DEBUGF("%s:", fsrv->target_path);
|
||||||
while (argv[i] != NULL) {
|
while (argv[i] != NULL) {
|
||||||
|
|
||||||
SAYF(" \"%s\"", argv[i++]);
|
SAYF(" \"%s\"", argv[i++]);
|
||||||
|
Reference in New Issue
Block a user