From: Jason Merrill <jason@redhat.com>
To: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: PATCH to print_node for TREE_BINFO
Date: Tue, 18 Aug 2015 21:33:00 -0000 [thread overview]
Message-ID: <55D3A2F1.4000703@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
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.
[-- Attachment #2: print-binfo.patch --]
[-- Type: text/x-patch, Size: 909 bytes --]
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);
reply other threads:[~2015-08-18 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D3A2F1.4000703@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).