aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/log.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-04-22 20:09:51 +0200
committerGitHub <noreply@github.com>2019-04-22 20:09:51 +0200
commit8ed4a53d99fda86468658ade665fc2a9f2faa3c4 (patch)
tree56b9ee5a9707ab6c118154bcda611ca5e3e1d8df /kernel/log.cc
parent1d538ff1ecdbdbae7e8e462599a4a3d9983dd60b (diff)
parente158ea20979165c1bac4c5c4027cf53255e57baa (diff)
downloadyosys-8ed4a53d99fda86468658ade665fc2a9f2faa3c4.tar.gz
yosys-8ed4a53d99fda86468658ade665fc2a9f2faa3c4.tar.bz2
yosys-8ed4a53d99fda86468658ade665fc2a9f2faa3c4.zip
Merge pull request #951 from YosysHQ/clifford/logdebug
Add log_debug() framework
Diffstat (limited to 'kernel/log.cc')
-rw-r--r--kernel/log.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index 400a549dd..9a9104e26 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -56,6 +56,10 @@ int log_verbose_level;
string log_last_error;
void (*log_error_atexit)() = NULL;
+int log_make_debug = 0;
+int log_force_debug = 0;
+int log_debug_suppressed = 0;
+
vector<int> header_count;
pool<RTLIL::IdString> log_id_cache;
vector<shared_str> string_buf;
@@ -92,6 +96,9 @@ void logv(const char *format, va_list ap)
format++;
}
+ if (log_make_debug && !ys_debug(1))
+ return;
+
std::string str = vstringf(format, ap);
if (str.empty())