Skip to content

Commit f11668b

Browse files
Output options in JBMC
1 parent d11c9a6 commit f11668b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Author: Daniel Kroening, [email protected]
2020
#include <util/exit_codes.h>
2121
#include <util/invariant.h>
2222
#include <util/unicode.h>
23+
#include <util/xml.h>
2324
#include <util/version.h>
2425

2526
#include <langapi/language.h>
@@ -422,6 +423,24 @@ int jbmc_parse_optionst::doit()
422423
<< "-bit " << config.this_architecture() << " "
423424
<< config.this_operating_system() << eom;
424425

426+
// output the options
427+
switch(ui_message_handler.get_ui())
428+
{
429+
case ui_message_handlert::uit::PLAIN:
430+
options.output(debug());
431+
break;
432+
case ui_message_handlert::uit::JSON_UI:
433+
{
434+
json_objectt json_options;
435+
json_options["options"] = options.to_json();
436+
debug() << json_options;
437+
break;
438+
}
439+
case ui_message_handlert::uit::XML_UI:
440+
debug() << options.to_xml();
441+
break;
442+
}
443+
425444
register_language(new_ansi_c_language);
426445
register_language(new_java_bytecode_language);
427446

0 commit comments

Comments
 (0)