From 764399256c2fb8d66a70b0a1e466dc52c888b682 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 3 Mar 2012 11:29:09 -0500 Subject: [PATCH] Internals: Rename gdb dump utilities, add fileline dump --- Changes | 2 ++ internals.pod | 5 ++--- src/.gdbinit | 11 ++--------- src/V3Ast.cpp | 21 +++++++++++++++++---- src/V3Ast.h | 6 +++--- src/V3AstNodes.cpp | 4 ++-- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index 7b1fae7f8..78486d9cd 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,8 @@ indicates the contributor was also the author of the fix; Thanks! * Verilator 3.832 devel +[run cppcheck] + *** Fix memory delayed assignments from multiple clock domains. [Andrew Ling] *** Report MULTIDRIVEN on memories set in multiple clock domains. diff --git a/internals.pod b/internals.pod index b94b05903..03e433416 100644 --- a/internals.pod +++ b/internals.pod @@ -249,9 +249,8 @@ what made a line in the tree dumps): To print a node: - call nodep->dumpCout() # aliased to "pn" in .gdbinit - call nodep->dumpTreeCout() # aliased to "pnt" in .gdbinit - call nodep->dumpPtrsCout() # aliased to "pnp" in .gdbinit + call nodep->dumpGdb() # aliased to "pn" in .gdbinit + call nodep->dumpTreeGdb() # aliased to "pnt" in .gdbinit =head1 DISTRIBUTION diff --git a/src/.gdbinit b/src/.gdbinit index 79efc5b01..47b6a8929 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -6,22 +6,15 @@ # Version 2.0. define pn - call $arg0->dumpCout() + call $arg0->dumpGdb() end document pn Verilator: Print single AstNode NODEP end define pnt - call $arg0->dumpTreeCout() + call $arg0->dumpTreeGdb() end document pnt Verilator: Print AstNode NODEP's tree end - -define pnp - call $arg0->dumpPtrsCout() -end -document pnp - Verilator: Print AstNode NODEP internal pointers -end diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 291b7b1fd..b51dfe071 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -245,7 +245,7 @@ inline void AstNode::debugTreeChange(const char* prefix, int lineno, bool next) // Called on all major tree changers. // Only for use for those really nasty bugs relating to internals // Note this may be null. - //if (debug()) cout<<"-treeChange: V3Ast.cpp:"<"<dumpTree(cout,"-treeChange: "); @@ -719,6 +719,7 @@ void AstNode::deleteTree() { if (!this) return; UASSERT(m_backp==NULL,"Delete called on node with backlink still set\n"); this->debugTreeChange("-delTree: ", __LINE__, true); + this->editCountInc(); // MUST be depth first! deleteTreeIter(); } @@ -947,9 +948,21 @@ void AstNode::checkTree() { } } -void AstNode::dumpCout() { dump(cout); } // For GDB only -void AstNode::dumpPtrsCout() const { dumpPtrs(cout); } // For GDB only -void AstNode::dumpTreeCout() { dumpTree(cout); } // For GDB only +void AstNode::dumpGdb() { // For GDB only + if (!this) { cout<<"This=NULL"<AstNodeDType::dump(str); - str<<" ["<