From d344d4874bda7e90692149d6989c8ca63f0db602 Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 5 Jun 2014 21:29:20 -0400 Subject: [PATCH] -{d,t} help => --show-{debug,trace}-tags --- src/options/base_options_handlers.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/options/base_options_handlers.h b/src/options/base_options_handlers.h index 15813a774..e701ee13d 100644 --- a/src/options/base_options_handlers.h +++ b/src/options/base_options_handlers.h @@ -121,6 +121,18 @@ inline std::string suggestTags(char const* const* validTags, std::string inputTa inline void addTraceTag(std::string option, std::string optarg, SmtEngine* smt) { if(Configuration::isTracingBuild()) { if(!Configuration::isTraceTag(optarg.c_str())) + + if(optarg == "help") { + printf("available tags:"); + unsigned ntags = Configuration::getNumTraceTags(); + char const* const* tags = Configuration::getTraceTags(); + for(unsigned i = 0; i < ntags; ++ i) { + printf(" %s", tags[i]); + } + printf("\n"); + exit(0); + } + throw OptionException(std::string("trace tag ") + optarg + std::string(" not available.") + suggestTags(Configuration::getTraceTags(), optarg) ); @@ -134,6 +146,18 @@ inline void addDebugTag(std::string option, std::string optarg, SmtEngine* smt) if(Configuration::isDebugBuild() && Configuration::isTracingBuild()) { if(!Configuration::isDebugTag(optarg.c_str()) && !Configuration::isTraceTag(optarg.c_str())) { + + if(optarg == "help") { + printf("available tags:"); + unsigned ntags = Configuration::getNumDebugTags(); + char const* const* tags = Configuration::getDebugTags(); + for(unsigned i = 0; i < ntags; ++ i) { + printf(" %s", tags[i]); + } + printf("\n"); + exit(0); + } + throw OptionException(std::string("debug tag ") + optarg + std::string(" not available.") + suggestTags(Configuration::getDebugTags(), optarg, Configuration::getTraceTags()) ); -- 2.30.2