From: Clifford Wolf Date: Wed, 5 Mar 2014 18:56:31 +0000 (+0100) Subject: Include id2ast pointers when dumping AST X-Git-Tag: yosys-0.3.0~92 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09805ee9ec0408bdc68b914927899f02371efcb7;p=yosys.git Include id2ast pointers when dumping AST --- diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index d9ad6d8ef..f2f2d0e69 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -244,6 +244,12 @@ void AstNode::dumpAst(FILE *f, std::string indent) std::string type_name = type2str(type); fprintf(f, "%s%s <%s:%d>", indent.c_str(), type_name.c_str(), filename.c_str(), linenum); + + if (id2ast) + fprintf(f, " [%p -> %p]", this, id2ast); + else + fprintf(f, " [%p]", this); + if (!str.empty()) fprintf(f, " str='%s'", str.c_str()); if (!bits.empty()) {