From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8396 invoked by alias); 19 Jul 2012 09:34:13 -0000 Received: (qmail 8190 invoked by uid 22791); 19 Jul 2012 09:34:12 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_VT X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jul 2012 09:33:59 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3Wd97r4FKzz3hhbN; Thu, 19 Jul 2012 11:35:36 +0200 (CEST) Received: from igel.home (ppp-88-217-104-196.dynamic.mnet-online.de [88.217.104.196]) by mail.mnet-online.de (Postfix) with ESMTPA id 3Wd95y2zlhzbbkr; Thu, 19 Jul 2012 11:33:58 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 0C46BCA2A4; Thu, 19 Jul 2012 11:33:58 +0200 (CEST) From: Andreas Schwab To: Tom Tromey 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> X-Yow: Place me on a BUFFER counter while you BELITTLE several BELLHOPS in the Trianon Room!! Let me one of your SUBSIDIARIES! Date: Thu, 19 Jul 2012 09:34:00 -0000 In-Reply-To: <874ntpdg5s.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu, 15 Mar 2012 09:42:39 -0600") Message-ID: 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/msg00328.txt.bz2 Tom Tromey writes: > +# A helper proc that creates a regular expression matching a > +# particular vtable. NAME is the type name. Each element of ARGS is > +# the name of a function in the vtable. > + > +proc make_one_vtable_result {name args} { > + global hex > + > + set nls "\[\r\n\]+" > + > + set result "vtable for '${name}' @ $hex .subobject @ $hex.:$nls" > + set count 0 > + foreach func $args { > + append result ".${count}.: $hex <$func..>${nls}" > + incr count > + } > + > + return $result > +} info vtbl a vtable for 'A' @ 0x10013c28 (subobject @ 0x10014510): [0]: @0x10014278: 0x10001b0c vtable for 'V' @ 0x10013c50 (subobject @ 0x10014520): [0]: @0x100143c8: 0x10001e14 [1]: @0x10014338: 0x10001c94 (gdb) FAIL: gdb.cp/virtfunc.exp: info vtbl a Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."