aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 25477d02e..bb9e85d93 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -120,6 +120,12 @@ namespace RTLIL
global_id_storage_.at(idx) = strdup(p);
global_id_index_[global_id_storage_.at(idx)] = idx;
global_refcount_storage_.at(idx)++;
+
+ if (yosys_xtrace) {
+ log("#X# New IdString '%s' with index %d.\n", p, idx);
+ log_backtrace("-X- ", yosys_xtrace-1);
+ }
+
return idx;
}
@@ -135,6 +141,11 @@ namespace RTLIL
if (--global_refcount_storage_.at(idx) != 0)
return;
+ if (yosys_xtrace) {
+ log("#X# Removed IdString '%s' with index %d.\n", global_id_storage_.at(idx), idx);
+ log_backtrace("-X- ", yosys_xtrace-1);
+ }
+
global_id_index_.erase(global_id_storage_.at(idx));
free(global_id_storage_.at(idx));
global_id_storage_.at(idx) = nullptr;