From ff889fde18f52cefe48376d3010477c4a3e71229 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 6 Mar 2023 18:22:36 -0500 Subject: [PATCH] Add debug comment when trace disabled (#4004). --- src/V3TraceDecl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/V3TraceDecl.cpp b/src/V3TraceDecl.cpp index 8c6f73e25..bba3bc78b 100644 --- a/src/V3TraceDecl.cpp +++ b/src/V3TraceDecl.cpp @@ -237,8 +237,9 @@ private: void addIgnore(const char* why) { ++m_statIgnSigs; - addToSubFunc(new AstComment{m_traVscp->fileline(), - "Tracing: " + m_traName + " // Ignored: " + why, true}); + std::string cmt = std::string{"Tracing: "} + m_traName + " // Ignored: " + why; + if (debug() > 3 && m_traVscp) std::cout << "- " << m_traVscp->fileline() << cmt << endl; + addToSubFunc(new AstComment{m_traVscp->fileline(), cmt, true}); } // VISITORS