This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to print_node for TREE_BINFO
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Aug 2015 17:26:09 -0400
- Subject: PATCH to print_node for TREE_BINFO
- Authentication-results: sourceware.org; auth=none
When looking at access control bugs, it's nice to have a bit more
information about a TREE_BINFO.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 98c80a68ea91426855ec2c04b6358aeb67909baf
Author: Jason Merrill <jason@redhat.com>
Date: Tue Aug 18 17:13:16 2015 -0400
* print-tree.c (print_node): Handle TREE_BINFO.
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 6e0d4a9..ea50056 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -911,6 +911,17 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
indent + 4);
break;
+ case TREE_BINFO:
+ fprintf (file, " bases %d",
+ vec_safe_length (BINFO_BASE_BINFOS (node)));
+ print_node_brief (file, "offset", BINFO_OFFSET (node), indent + 4);
+ print_node_brief (file, "virtuals", BINFO_VIRTUALS (node),
+ indent + 4);
+ print_node_brief (file, "inheritance chain",
+ BINFO_INHERITANCE_CHAIN (node),
+ indent + 4);
+ break;
+
default:
if (EXCEPTIONAL_CLASS_P (node))
lang_hooks.print_xnode (file, node, indent);