forked from github/verilator
Debug: Show column numbers in .tree files
This commit is contained in:
parent
e591afd101
commit
35fc8b7259
@ -786,10 +786,10 @@ better viewers let us know; ZGRViewer isn't great for large graphs.
|
|||||||
Tree files are dumps of the AST Tree and are produced between every major
|
Tree files are dumps of the AST Tree and are produced between every major
|
||||||
algorithmic stage. An example:
|
algorithmic stage. An example:
|
||||||
|
|
||||||
NETLIST 0x90fb00 <e1> {a0}
|
NETLIST 0x90fb00 <e1> {a0ah}
|
||||||
1: MODULE 0x912b20 <e8822> {a8} top L2 [P]
|
1: MODULE 0x912b20 <e8822> {a8ah} top L2 [P]
|
||||||
*1:2: VAR 0x91a780 <e74#> {a22} @dt=0xa2e640(w32) out_wide [O] WIRE
|
*1:2: VAR 0x91a780 <e74#> {a22ah} @dt=0xa2e640(w32) out_wide [O] WIRE
|
||||||
1:2:1: BASICDTYPE 0xa2e640 <e2149> {e24} @dt=this(sw32) integer kwd=integer range=[31:0]
|
1:2:1: BASICDTYPE 0xa2e640 <e2149> {e24ah} @dt=this(sw32) integer kwd=integer range=[31:0]
|
||||||
|
|
||||||
The following summarizes the above example dump, with more detail on each
|
The following summarizes the above example dump, with more detail on each
|
||||||
field in the section below.
|
field in the section below.
|
||||||
@ -807,8 +807,9 @@ the `MODULE`, which in turn is the `op1p` pointer under the `NETLIST`
|
|||||||
| `<e74>` | means the 74th edit to the netlist was the last modification to
|
| `<e74>` | means the 74th edit to the netlist was the last modification to
|
||||||
this node.
|
this node.
|
||||||
|
|
||||||
| `{a22}` | indicates this node is related to line 22 in the source filename
|
| `{a22ah}` | indicates this node is related to the source filename "a",
|
||||||
"a", where "a" is the first file read, "z" the 26th, and "aa" the 27th.
|
where "a" is the first file read, "z" the 26th, and "aa" the 27th. Then
|
||||||
|
line 22 in that file, then column 8 (aa=0, az=25, ba=26, ...).
|
||||||
|
|
||||||
| `@dt=0x...` | indicates the address of the data type this node contains.
|
| `@dt=0x...` | indicates the address of the data type this node contains.
|
||||||
|
|
||||||
|
@ -970,7 +970,8 @@ void AstNode::dump(std::ostream& str) const {
|
|||||||
<< cvtToHex(this)
|
<< cvtToHex(this)
|
||||||
//<<" "<<cvtToHex(this)->m_backp
|
//<<" "<<cvtToHex(this)->m_backp
|
||||||
<< " <e" << std::dec << editCount() << ((editCount() >= editCountLast()) ? "#>" : ">")
|
<< " <e" << std::dec << editCount() << ((editCount() >= editCountLast()) ? "#>" : ">")
|
||||||
<< " {" << fileline()->filenameLetters() << std::dec << fileline()->lastLineno() << "}";
|
<< " {" << fileline()->filenameLetters() << std::dec << fileline()->lastLineno()
|
||||||
|
<< fileline()->firstColumnLetters() << "}";
|
||||||
if (user1p()) str << " u1=" << cvtToHex(user1p());
|
if (user1p()) str << " u1=" << cvtToHex(user1p());
|
||||||
if (user2p()) str << " u2=" << cvtToHex(user2p());
|
if (user2p()) str << " u2=" << cvtToHex(user2p());
|
||||||
if (user3p()) str << " u3=" << cvtToHex(user3p());
|
if (user3p()) str << " u3=" << cvtToHex(user3p());
|
||||||
|
@ -276,6 +276,12 @@ const string FileLine::filebasenameNoExt() const {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const string FileLine::firstColumnLetters() const {
|
||||||
|
char a = ((firstColumn() / 26) % 26) + 'a';
|
||||||
|
char b = (firstColumn() % 26) + 'a';
|
||||||
|
return string(1, a) + string(1, b);
|
||||||
|
}
|
||||||
|
|
||||||
const string FileLine::profileFuncname() const {
|
const string FileLine::profileFuncname() const {
|
||||||
// Return string that is OK as a function name - for profiling
|
// Return string that is OK as a function name - for profiling
|
||||||
string name = filebasenameNoExt();
|
string name = filebasenameNoExt();
|
||||||
|
@ -200,6 +200,7 @@ public:
|
|||||||
const string filenameLetters() const { return singleton().filenameLetters(m_filenameno); }
|
const string filenameLetters() const { return singleton().filenameLetters(m_filenameno); }
|
||||||
const string filebasename() const;
|
const string filebasename() const;
|
||||||
const string filebasenameNoExt() const;
|
const string filebasenameNoExt() const;
|
||||||
|
const string firstColumnLetters() const;
|
||||||
const string profileFuncname() const;
|
const string profileFuncname() const;
|
||||||
const string xml() const {
|
const string xml() const {
|
||||||
return "fl=\"" + filenameLetters() + cvtToStr(lastLineno()) + "\"";
|
return "fl=\"" + filenameLetters() + cvtToStr(lastLineno()) + "\"";
|
||||||
|
Loading…
Reference in New Issue
Block a user