Skip to content

Commit eb0472e

Browse files
authored
Merge pull request #7240 from tautschnig/cleanup/symtab2gb-verbosity
Make verbosity of symtab2gb configurable
2 parents 69fbd6e + afea0d3 commit eb0472e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

doc/man/symtab2gb.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ This is to support integration of external language frontends, such as Ada
1515
(using GNAT2GOTO: https://github.com/diffblue/gnat2goto) or Rust (using Kani:
1616
https://github.com/model-checking/kani).
1717
.SH OPTIONS
18+
.TP
1819
\fB\-\-out\fR \fIoutfile\fR
1920
Specify the filename of the resulting binary (default: a.out)
21+
.TP
22+
\fB\-\-verbosity\fR #
23+
verbosity level
2024
.SH ENVIRONMENT
2125
All tools honor the TMPDIR environment variable when generating temporary
2226
files and directories.

src/symtab2gb/symtab2gb_parse_options.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ static inline bool failed(bool error_indicator)
4343

4444
static void run_symtab2gb(
4545
const std::vector<std::string> &symtab_filenames,
46-
const std::string &gb_filename)
46+
const std::string &gb_filename,
47+
const std::string &cmdline_verbosity)
4748
{
4849
// try opening all the files first to make sure we can
4950
// even read/write what we want
@@ -65,6 +66,8 @@ static void run_symtab2gb(
6566
}
6667

6768
stream_message_handlert message_handler{std::cerr};
69+
messaget::eval_verbosity(
70+
cmdline_verbosity, messaget::M_STATISTICS, message_handler);
6871

6972
auto const symtab_language = new_json_symtab_language();
7073
symtab_language->set_message_handler(message_handler);
@@ -138,7 +141,7 @@ int symtab2gb_parse_optionst::doit()
138141
}
139142
register_languages();
140143
config.set(cmdline);
141-
run_symtab2gb(symtab_filenames, gb_filename);
144+
run_symtab2gb(symtab_filenames, gb_filename, cmdline.get_value("verbosity"));
142145
return CPROVER_EXIT_SUCCESS;
143146
}
144147

@@ -162,5 +165,6 @@ void symtab2gb_parse_optionst::help()
162165
"--out <outfile> specify the filename of\n"
163166
" the resulting binary\n"
164167
" (default: a.out)\n"
168+
" --verbosity # verbosity level\n"
165169
<< messaget::eom;
166170
}

src/symtab2gb/symtab2gb_parse_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Author: Diffblue Ltd.
1717

1818
#define SYMTAB2GB_OPTIONS \
1919
"(" SYMTAB2GB_OUT_FILE_OPT "):" \
20+
"(verbosity):" \
2021
// end options
2122

2223
// clang-format on

0 commit comments

Comments
 (0)