From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24038 invoked by alias); 3 Jun 2013 12:31:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24029 invoked by uid 89); 3 Jun 2013 12:31:49 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_VT autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 03 Jun 2013 12:31:48 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UjTvO-0007Hd-QF from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Mon, 03 Jun 2013 05:31:46 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 3 Jun 2013 05:31:41 -0700 Received: from [172.30.64.221] ([172.30.64.221]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 Jun 2013 05:31:41 -0700 Message-ID: <51AC8CA2.3030008@codesourcery.com> Date: Mon, 03 Jun 2013 12:31:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: "'gdb-patches@sourceware.org'" Subject: [PATCH, c++ testsuite] Fix a few failures in gdb.cp/virtfunc.exp Content-Type: multipart/mixed; boundary="------------090705010507060605010903" X-Virus-Found: No X-SW-Source: 2013-06/txt/msg00012.txt.bz2 This is a multi-part message in MIME format. --------------090705010507060605010903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 951 Hi, I noticed a few tests failing for ppc64. Those are related to printing virtual tables for objects. Some of these failures are related to how the output from that command comes out in a target that uses function descriptors. This is the regular non-function-descriptor output: info vtbl a vtable for 'A' @ 0x401858 (subobject @ 0x603220): [0]: 0x400d9a vtable for 'V' @ 0x401880 (subobject @ 0x603230): [0]: 0x400ea2 [1]: 0x400e16 And the output for a target that does function descriptors: info vtbl a vtable for 'A' @ 0x10013518 (subobject @ 0x10013e20): [0]: @0x10013b88: 0x10001c6c vtable for 'V' @ 0x10013540 (subobject @ 0x10013e30): [0]: @0x10013cd8: 0x10001f74 [1]: @0x10013c48: 0x10001df4 As you can see, there are additional fields for each virtual function pointer, and that is the address of the function descriptor. The attached patch takes care of this. OK? --------------090705010507060605010903 Content-Type: text/x-patch; name="vtbl_fd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vtbl_fd.diff" Content-length: 694 2013-06-03 Luis Machado * gdb.cp/virtfunc.exp (make_one_vtable_result): Handle extra output from targets that use function descriptors in the virtual tables. diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp index 2509cc7..4b73482 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -234,7 +234,7 @@ proc make_one_vtable_result {name args} { set result "vtable for '${name}' @ $hex .subobject @ $hex.:$nls" set count 0 foreach func $args { - append result ".${count}.: $hex <$func..>${nls}" + append result ".${count}.:( @$hex:)? $hex <$func..>${nls}" incr count } --------------090705010507060605010903--