From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21394 invoked by alias); 19 Jul 2012 17:01:22 -0000 Received: (qmail 21383 invoked by uid 22791); 19 Jul 2012 17:01:21 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_VT,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jul 2012 17:01:08 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6JH16bX023642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Jul 2012 13:01:06 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q6JH15wS010460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 19 Jul 2012 13:01:05 -0400 From: Tom Tromey To: Andreas Schwab Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [4/5] implement "info vtable" References: <87mx82prmd.fsf@fleche.redhat.com> <4F4F8D39.60507@redhat.com> <874ntpdg5s.fsf@fleche.redhat.com> Date: Thu, 19 Jul 2012 17:01:00 -0000 In-Reply-To: (Andreas Schwab's message of "Thu, 19 Jul 2012 11:33:57 +0200") Message-ID: <878vefznvz.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2012-07/txt/msg00357.txt.bz2 Andreas> [0]: @0x10014278: 0x10001b0c Please try the appended. Tom b/gdb/testsuite/ChangeLog: 2012-07-19 Tom Tromey * gdb.cp/virtfunc.exp (make_one_vtable_result): Handle function descriptor. (test_info_vtbl): Remove unused globals. diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp index 4621a74..bef71c8 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -235,7 +235,9 @@ 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}" + # The (@$hex: ) part is because we might see a descriptor + # instead. + append result ".${count}.: (@$hex: )?$hex <$func..>${nls}" incr count } @@ -245,10 +247,6 @@ proc make_one_vtable_result {name args} { # Test "info vtbl". proc test_info_vtbl {} { - global hex - - set nls "\[\r\n\]+" - set vt_A [make_one_vtable_result A A::f] set vt_B [make_one_vtable_result B B::f] set vt_V [make_one_vtable_result V VB::vvb V::vv]