aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2022-10-07 15:00:19 +0200
committerJannis Harder <me@jix.one>2022-10-07 15:02:33 +0200
commitac906d15ce76115e1ef6796b2201ebf4d188bd34 (patch)
tree6e88df351ea3aaaa75d3795e0e25e943a7663f79 /kernel
parentc4a52b1b028fed3fcb1d14fb7c430ab1af5608ca (diff)
downloadyosys-ac906d15ce76115e1ef6796b2201ebf4d188bd34.tar.gz
yosys-ac906d15ce76115e1ef6796b2201ebf4d188bd34.tar.bz2
yosys-ac906d15ce76115e1ef6796b2201ebf4d188bd34.zip
Add YOSYS_ABORT_ON_LOG_ERROR environment variable for debugging.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/log.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index 4403dd0c7..af8c422b8 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -352,6 +352,9 @@ static void logv_error_with_prefix(const char *prefix,
log_error_atexit();
YS_DEBUGTRAP_IF_DEBUGGING;
+ const char *e = getenv("YOSYS_ABORT_ON_LOG_ERROR");
+ if (e && atoi(e))
+ abort();
#ifdef EMSCRIPTEN
log_files = backup_log_files;