Add --runtime-debug for Verilated executable runtime debugging.

This commit is contained in:
Wilson Snyder
2024-01-25 07:34:30 -05:00
parent 354a534d68
commit d4c8a15407
7 changed files with 95 additions and 26 deletions
+9
View File
@@ -1406,6 +1406,15 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
});
DECL_OPTION("-report-unoptflat", OnOff, &m_reportUnoptflat);
DECL_OPTION("-rr", CbCall, []() {}); // Processed only in bin/verilator shell
DECL_OPTION("-runtime-debug", CbCall, [this, fl]() {
decorations(fl, "node");
addCFlags("-ggdb");
addLdLibs("-ggdb");
addCFlags("-fsanitize=address,undefined");
addLdLibs("-fsanitize=address,undefined");
addCFlags("-D_GLIBCXX_DEBUG");
addCFlags("-DVL_DEBUG=1");
});
DECL_OPTION("-savable", OnOff, &m_savable);
DECL_OPTION("-sc", CbCall, [this]() {