BUILT_SOURCES = \
rational.h \
integer.h \
- tls.h
+ tls.h \
+ debug_tags.h
+
+debug_tags.h: debug_tags
+ $(AM_V_GEN)( \
+ echo 'const char* debug_tags[] = {'; \
+ first=1; \
+ for tag in `cat debug_tags`; \
+ do \
+ if [ $$first -eq 1 ]; then first=0; else echo ','; fi; \
+ echo -n "\"$$tag\""; \
+ done; \
+ echo; \
+ echo '};' \
+ ) >"$@"
+
+debug_tags:
+ $(AM_V_GEN)\
+ grep 'Debug(\".*\")' `find @srcdir@/../ -name "*.cpp" -or -name "*.h" -or -name "*.cc" -or -name "*.g"` | \
+ sed s/'.*Debug(\"'//g | sed s/'\".*'//g | sort | uniq >"$@"
+
+.PHONY: debug_tags
+
if CVC4_CLN_IMP
libutil_la_SOURCES += \
#include "util/language.h"
#include "util/options.h"
#include "util/output.h"
+#include "util/debug_tags.h"
#include "cvc4autoconfig.h"
--quiet | -q decrease verbosity (may be repeated)\n\
--trace | -t trace something (e.g. -t pushpop), can repeat\n\
--debug | -d debug something (e.g. -d arith), can repeat\n\
+ --show-debug-tags show all avalable tags for debug tracing\n\
--stats give statistics on exit\n\
--default-expr-depth=N print exprs to depth N (0 == default, -1 == no limit)\n\
--print-expr-types print types with variables when printing exprs\n\
NO_CHECKING,
NO_THEORY_REGISTRATION,
USE_MMAP,
+ SHOW_DEBUG_TAGS,
SHOW_CONFIG,
STRICT_PARSING,
DEFAULT_EXPR_DEPTH,
{ "stats" , no_argument , NULL, STATS },
{ "no-checking", no_argument , NULL, NO_CHECKING },
{ "no-theory-registration", no_argument, NULL, NO_THEORY_REGISTRATION },
+ { "show-debug-tags", no_argument, NULL, SHOW_DEBUG_TAGS },
{ "show-config", no_argument , NULL, SHOW_CONFIG },
{ "segv-nospin", no_argument , NULL, SEGV_NOSPIN },
{ "help" , no_argument , NULL, 'h' },
arithPropagateMaxLength = atoi(optarg);
break;
+ case SHOW_DEBUG_TAGS:
+ printf("available tags:");
+ if (Configuration::isTracingBuild()) {
+ unsigned nTags = sizeof(debug_tags) / sizeof(debug_tags[0]);
+ for (unsigned i = 0; i < nTags; ++ i) {
+ printf(" %s", debug_tags[i]);
+ }
+ printf("\n");
+ } else {
+ printf(" not available in this build");
+ }
+ exit(0);
+ break;
+
case SHOW_CONFIG:
fputs(Configuration::about().c_str(), stdout);
printf("\n");