From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103895 invoked by alias); 18 Aug 2015 21:26:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 103882 invoked by uid 89); 18 Aug 2015 21:26:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 18 Aug 2015 21:26:11 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id BB49C19F20E for ; Tue, 18 Aug 2015 21:26:10 +0000 (UTC) Received: from [10.10.116.45] (ovpn-116-45.rdu2.redhat.com [10.10.116.45]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7ILQAq4006089 for ; Tue, 18 Aug 2015 17:26:10 -0400 To: gcc-patches List From: Jason Merrill Subject: PATCH to print_node for TREE_BINFO Message-ID: <55D3A2F1.4000703@redhat.com> Date: Tue, 18 Aug 2015 21:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050305020907030004010304" X-SW-Source: 2015-08/txt/msg01037.txt.bz2 This is a multi-part message in MIME format. --------------050305020907030004010304 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 148 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. --------------050305020907030004010304 Content-Type: text/x-patch; name="print-binfo.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="print-binfo.patch" Content-length: 909 commit 98c80a68ea91426855ec2c04b6358aeb67909baf Author: Jason Merrill 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); --------------050305020907030004010304--