ysyx-workbench/npc/csrc/Flow/config.cpp
xinyangli de9f770d08
Some checks failed
Build abstract machine with nix / build-abstract-machine (push) Failing after 53s
Run CTests within npc / npc-test (push) Failing after 48s
npc,refactor: remove original difftest wrapper, cleanup code
2024-08-02 11:18:52 +08:00

22 lines
690 B
C++

#include "config.hpp"
void Config::cli_parse(int argc, char **argv) {
CLI::App app;
app.add_option("-l,--listen", gdbsocket,
"Listen to debugger at this address");
app.add_flag("-g", do_debug, "Listen for gdb");
app.add_option("-m,--memory", memory_file, "Content of memory")
->check(CLI::ExistingFile);
app.add_flag("!--no-bin", memory_file_binary,
"Memory file is in text format");
app.add_option("--wav", wavefile, "output .vcd file path");
app.add_flag("-i", interactive, "Launch sdb for interactive session");
try {
app.parse(argc, argv);
} catch (const CLI::ParseError &e) {
exit((app).exit(e));
}
}
Config config;