mirror of
https://github.com/verilator/verilator.git
synced 2025-01-19 12:54:02 +00:00
Debugging: Show tree file writes, commentary
This commit is contained in:
parent
641024c235
commit
3ba36dc30c
@ -527,8 +527,10 @@ what made a <e####> line in the tree dumps):
|
||||
|
||||
To print a node:
|
||||
|
||||
call nodep->dumpGdb() # aliased to "pn" in src/.gdbinit
|
||||
call nodep->dumpTreeGdb() # aliased to "pnt" in src/.gdbinit
|
||||
pn nodep
|
||||
# or: call nodep->dumpGdb() # aliased to "pn" in src/.gdbinit
|
||||
pnt nodep
|
||||
# or: call nodep->dumpTreeGdb() # aliased to "pnt" in src/.gdbinit
|
||||
|
||||
When GDB halts, it is useful to understand that the backtrace will commonly
|
||||
show the iterator functions between each invocation of C<visit> in the
|
||||
|
@ -18,3 +18,10 @@ end
|
||||
document pnt
|
||||
Verilator: Print AstNode NODEP's tree
|
||||
end
|
||||
|
||||
define watchedit
|
||||
watch AstNode::s_editCntGbl==$arg0
|
||||
end
|
||||
document watchedit
|
||||
Verilator: Create watch on where a edit number is made
|
||||
end
|
||||
|
@ -1011,6 +1011,7 @@ void AstNode::dumpTreeAndNext(ostream& os, const string& indent, int maxDepth) {
|
||||
void AstNode::dumpTreeFile(const string& filename, bool append) {
|
||||
if (v3Global.opt.dumpTree()) {
|
||||
{ // Write log & close
|
||||
UINFO(2,"Dumping "<<filename<<endl);
|
||||
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
|
||||
if (logsp->fail()) v3fatalSrc("Can't write "<<filename);
|
||||
*logsp<<"Tree Dump from <e"<<dec<<editCountLast()<<">";
|
||||
|
Loading…
Reference in New Issue
Block a user