From: Clifford Wolf Date: Wed, 30 Jul 2014 23:05:27 +0000 (+0200) Subject: Added "yosys -A" X-Git-Tag: yosys-0.4~352 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6166c768313f6a2dee774f0ba0a531816b24502d;p=yosys.git Added "yosys -A" --- diff --git a/kernel/driver.cc b/kernel/driver.cc index ab8ecba9d..d9ef22238 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -556,6 +556,7 @@ int main(int argc, char **argv) bool scriptfile_tcl = false; bool got_output_filename = false; bool print_banner = true; + bool call_abort = false; int history_offset = 0; std::string history_file; @@ -566,10 +567,13 @@ int main(int argc, char **argv) } int opt; - while ((opt = getopt(argc, argv, "QVSm:f:Hh:b:o:p:l:qv:ts:c:")) != -1) + while ((opt = getopt(argc, argv, "AQVSm:f:Hh:b:o:p:l:qv:ts:c:")) != -1) { switch (opt) { + case 'A': + call_abort = true; + break; case 'Q': print_banner = false; break; @@ -683,6 +687,9 @@ int main(int argc, char **argv) fprintf(stderr, " -m module_file\n"); fprintf(stderr, " load the specified module (aka plugin)\n"); fprintf(stderr, "\n"); + fprintf(stderr, " -A\n"); + fprintf(stderr, " will call abort() at the end of the script. useful for debugging\n"); + fprintf(stderr, "\n"); fprintf(stderr, " -V\n"); fprintf(stderr, " print version information and exit\n"); fprintf(stderr, "\n"); @@ -795,6 +802,8 @@ int main(int argc, char **argv) #endif log("\nEnd of script.\n"); + if (call_abort) + abort(); log_pop(); if (!history_file.empty()) {