diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-05-09 21:04:11 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-05-09 21:04:11 -0400 |
commit | 815b63fd3a630eb462e7ab9d8af09f19e129a5af (patch) | |
tree | 97eed9b70784e8e11d4b9c8630b7708be8dc3da7 /parse.c | |
parent | c8c33b8c44751444729eda6a9fb7d4715928ea43 (diff) | |
download | bfs-815b63fd3a630eb462e7ab9d8af09f19e129a5af.tar.xz |
Implement -D exec
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -697,6 +697,8 @@ static struct expr *parse_debug(struct parser_state *state, int arg1, int arg2) state->just_info = true; return NULL; + } else if (strcmp(flag, "exec") == 0) { + cmdline->debug |= DEBUG_EXEC; } else if (strcmp(flag, "opt") == 0) { cmdline->debug |= DEBUG_OPT; } else if (strcmp(flag, "rates") == 0) { @@ -912,7 +914,7 @@ static struct expr *parse_empty(struct parser_state *state, int arg1, int arg2) * Parse -exec(dir)?/-ok(dir)?. */ static struct expr *parse_exec(struct parser_state *state, int flags, int arg2) { - struct bfs_exec *execbuf = parse_bfs_exec(state->argv, flags, state->cmdline->cerr); + struct bfs_exec *execbuf = parse_bfs_exec(state->argv, flags, state->cmdline); if (!execbuf) { return NULL; } @@ -2741,6 +2743,9 @@ void dump_cmdline(const struct cmdline *cmdline, bool verbose) { fprintf(stderr, "-O%d ", cmdline->optlevel); } + if (cmdline->debug & DEBUG_EXEC) { + fputs("-D exec ", stderr); + } if (cmdline->debug & DEBUG_OPT) { fputs("-D opt ", stderr); } |