From 09805ee9ec0408bdc68b914927899f02371efcb7 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 5 Mar 2014 19:56:31 +0100 Subject: [PATCH] Include id2ast pointers when dumping AST --- frontends/ast/ast.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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()) { -- 2.30.2