diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 501650ac8..46115f899 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,5 +1,6 @@ ^CVS/ /CVS/ +\.gdbinit$ \.git/ \.svn/ \.(bak|old)/ diff --git a/internals.pod b/internals.pod index 7e02d2571..b94b05903 100644 --- a/internals.pod +++ b/internals.pod @@ -249,9 +249,9 @@ what made a line in the tree dumps): To print a node: - p nodep->dumpCout() - p nodep->dumpTreeCout() - p nodep->dumpPtrsCout() + call nodep->dumpCout() # aliased to "pn" in .gdbinit + call nodep->dumpTreeCout() # aliased to "pnt" in .gdbinit + call nodep->dumpPtrsCout() # aliased to "pnp" in .gdbinit =head1 DISTRIBUTION diff --git a/src/.gdbinit b/src/.gdbinit new file mode 100644 index 000000000..79efc5b01 --- /dev/null +++ b/src/.gdbinit @@ -0,0 +1,27 @@ +# DESCRIPTION: Verilator: GDB startup file with useful defines +# +# Copyright 2012-2012 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. + +define pn + call $arg0->dumpCout() +end +document pn + Verilator: Print single AstNode NODEP +end + +define pnt + call $arg0->dumpTreeCout() +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/test_regress/.gdbinit b/test_regress/.gdbinit new file mode 100644 index 000000000..8b63c91ae --- /dev/null +++ b/test_regress/.gdbinit @@ -0,0 +1 @@ +source ../src/.gdbinit