Merge pull request #3503 from jix/abort_on_log_error

Add YOSYS_ABORT_ON_LOG_ERROR environment variable for debugging.
This commit is contained in:
Jannis Harder 2022-10-07 21:30:26 +02:00 committed by GitHub
commit ae1a24d0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,10 @@ List of major changes and improvements between releases
Yosys 0.22 .. Yosys 0.22-dev Yosys 0.22 .. Yosys 0.22-dev
-------------------------- --------------------------
* Various
- Added YOSYS_ABORT_ON_LOG_ERROR environment variable for debugging.
Setting it to 1 causes abort() to be called when Yosys terminates with an
error message.
Yosys 0.21 .. Yosys 0.22 Yosys 0.21 .. Yosys 0.22
-------------------------- --------------------------

View File

@ -352,6 +352,9 @@ static void logv_error_with_prefix(const char *prefix,
log_error_atexit(); log_error_atexit();
YS_DEBUGTRAP_IF_DEBUGGING; YS_DEBUGTRAP_IF_DEBUGGING;
const char *e = getenv("YOSYS_ABORT_ON_LOG_ERROR");
if (e && atoi(e))
abort();
#ifdef EMSCRIPTEN #ifdef EMSCRIPTEN
log_files = backup_log_files; log_files = backup_log_files;