mirror of
https://github.com/verilator/verilator.git
synced 2025-01-31 18:54:03 +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:
|
To print a node:
|
||||||
|
|
||||||
call nodep->dumpGdb() # aliased to "pn" in src/.gdbinit
|
pn nodep
|
||||||
call nodep->dumpTreeGdb() # aliased to "pnt" in src/.gdbinit
|
# 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
|
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
|
show the iterator functions between each invocation of C<visit> in the
|
||||||
|
@ -18,3 +18,10 @@ end
|
|||||||
document pnt
|
document pnt
|
||||||
Verilator: Print AstNode NODEP's tree
|
Verilator: Print AstNode NODEP's tree
|
||||||
end
|
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) {
|
void AstNode::dumpTreeFile(const string& filename, bool append) {
|
||||||
if (v3Global.opt.dumpTree()) {
|
if (v3Global.opt.dumpTree()) {
|
||||||
{ // Write log & close
|
{ // Write log & close
|
||||||
|
UINFO(2,"Dumping "<<filename<<endl);
|
||||||
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
|
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
|
||||||
if (logsp->fail()) v3fatalSrc("Can't write "<<filename);
|
if (logsp->fail()) v3fatalSrc("Can't write "<<filename);
|
||||||
*logsp<<"Tree Dump from <e"<<dec<<editCountLast()<<">";
|
*logsp<<"Tree Dump from <e"<<dec<<editCountLast()<<">";
|
||||||
|
Loading…
Reference in New Issue
Block a user