diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-11-02 19:09:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-11-02 19:09:57 -0400 |
commit | c7a684d16808f0062284a0737503451894be4ce9 (patch) | |
tree | 8e5fd46827f8d020aa1dd023e199d591a18012f3 /parse.c | |
parent | 780a3ed08f22d45022e79b0a28b2b939e4f17f8f (diff) | |
download | bfs-c7a684d16808f0062284a0737503451894be4ce9.tar.xz |
parse: Add support for -D all to enable all debug flags
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -818,6 +818,7 @@ static void debug_help(CFILE *cfile) { cfprintf(cfile, " %{bld}search%{rs}: Trace the filesystem traversal.\n"); cfprintf(cfile, " %{bld}stat%{rs}: Trace all stat() calls.\n"); cfprintf(cfile, " %{bld}tree%{rs}: Print the parse tree.\n"); + cfprintf(cfile, " %{bld}all%{rs}: All debug flags at once.\n"); } /** @@ -852,6 +853,8 @@ static struct expr *parse_debug(struct parser_state *state, int arg1, int arg2) cmdline->debug |= DEBUG_STAT; } else if (strcmp(flag, "tree") == 0) { cmdline->debug |= DEBUG_TREE; + } else if (strcmp(flag, "all") == 0) { + cmdline->debug |= DEBUG_ALL; } else { cfprintf(cmdline->cerr, "%{wr}warning: Unrecognized debug flag '%s'.%{rs}\n\n", flag); debug_help(cmdline->cerr); |