3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 05:08:56 +00:00

[YOSYS][Issue 3594] Print backtrace on abort/assert #3594

ERROR: No such command: prox (type help for a command overview)
Error while executing script:
	Running script on file demo.ys
---------------------------------
   1 read_verilog ./tests/lut/map_not.v
   2 opt
   3 proc_clean
-->4 prox
---------------------------------
This commit is contained in:
Muthu Annamalai 2023-05-09 05:30:16 +00:00 committed by Muthu Annamalai
parent 0469405abf
commit 8b2994a05a
3 changed files with 26 additions and 3 deletions

View file

@ -354,6 +354,21 @@ static void logv_error_with_prefix(const char *prefix,
log_check_expected();
int lineno = 1;
if ( !log_line_number.empty() ) {
log("Error while executing script:\n\t");
log( log_line_number.begin()->c_str() );
log("\n");
log_line_number.erase(log_line_number.begin());
log("---------------------------------\n");
for(const std::string& script_line : log_line_number) {
const char* pfx = (lineno == log_line_number.size()) ? "-->" : " ";
log("%s%d %s\n",pfx,lineno++,script_line.c_str());
}
log("---------------------------------\n");
}
if (log_error_atexit)
log_error_atexit();