This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Small C++ PATCH for debug_tree(cp_expr)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>, David Malcolm <dmalcolm at redhat dot com>
- Date: Wed, 10 Feb 2016 10:33:36 -0500
- Subject: Small C++ PATCH for debug_tree(cp_expr)
- Authentication-results: sourceware.org; auth=none
David's cp_expr change made use of the 'pt' gdb macro less convenient in
some cases, so I'm adding a debug_tree overload to handle it.
commit 48d6e68c6b43b11d4f0bd696f19b490358954937
Author: Jason Merrill <jason@redhat.com>
Date: Mon Feb 8 23:46:14 2016 -0500
* ptree.c (debug_tree): Implement for cp_expr.
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 2c8ff99..8266e83 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -287,3 +287,11 @@ cxx_print_xnode (FILE *file, tree node, int indent)
break;
}
}
+
+/* Print the node NODE on standard error, for debugging. */
+
+DEBUG_FUNCTION void
+debug_tree (cp_expr node)
+{
+ debug_tree (node.get_value());
+}