diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-12-28 21:27:51 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-12-28 21:27:51 +0100 |
commit | 8773fd5897d1057dc8f87d4ffd13c96a708080e8 (patch) | |
tree | a64b70c41d5962694969da7a6bef7ebf553999b2 /kernel/driver.cc | |
parent | 445686cba38e949e85031ff95858c21afd1e1463 (diff) | |
download | yosys-8773fd5897d1057dc8f87d4ffd13c96a708080e8.tar.gz yosys-8773fd5897d1057dc8f87d4ffd13c96a708080e8.tar.bz2 yosys-8773fd5897d1057dc8f87d4ffd13c96a708080e8.zip |
Added memhasher (yosys -M)
Diffstat (limited to 'kernel/driver.cc')
-rw-r--r-- | kernel/driver.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc index 4700bf61b..9a81d8a48 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -151,8 +151,11 @@ int main(int argc, char **argv) printf(" -m module_file\n"); printf(" load the specified module (aka plugin)\n"); printf("\n"); + printf(" -M\n"); + printf(" will slightly randomize allocated pointer addresses. for debugging\n"); + printf("\n"); printf(" -A\n"); - printf(" will call abort() at the end of the script. useful for debugging\n"); + printf(" will call abort() at the end of the script. for debugging\n"); printf("\n"); printf(" -V\n"); printf(" print version information and exit\n"); @@ -174,10 +177,13 @@ int main(int argc, char **argv) } int opt; - while ((opt = getopt(argc, argv, "AQTVSm:f:Hh:b:o:p:l:qv:tds:c:")) != -1) + while ((opt = getopt(argc, argv, "MAQTVSm:f:Hh:b:o:p:l:qv:tds:c:")) != -1) { switch (opt) { + case 'M': + memhasher_on(); + break; case 'A': call_abort = true; break; @@ -407,6 +413,7 @@ int main(int argc, char **argv) } #endif + memhasher_off(); if (call_abort) abort(); |