diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-31 01:05:27 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-31 01:05:27 +0200 |
commit | 6166c768313f6a2dee774f0ba0a531816b24502d (patch) | |
tree | 559f4284b59afd86b5b05e9fb491bb223cd4a453 /kernel/driver.cc | |
parent | e5c245df9d086595063978298139a9aaed68979d (diff) | |
download | yosys-6166c768313f6a2dee774f0ba0a531816b24502d.tar.gz yosys-6166c768313f6a2dee774f0ba0a531816b24502d.tar.bz2 yosys-6166c768313f6a2dee774f0ba0a531816b24502d.zip |
Added "yosys -A"
Diffstat (limited to 'kernel/driver.cc')
-rw-r--r-- | kernel/driver.cc | 11 |
1 files changed, 10 insertions, 1 deletions
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()) { |