From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4183 invoked by alias); 22 Feb 2013 19:15:48 -0000 Received: (qmail 4150 invoked by uid 22791); 22 Feb 2013 19:15:44 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Fri, 22 Feb 2013 19:15:39 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1MJFbXC010597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Feb 2013 14:15:37 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1MJFaH0025997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 22 Feb 2013 14:15:36 -0500 From: Tom Tromey To: Keith Seitz Cc: Doug Evans , gdb-patches@sourceware.org Subject: Re: [RFA] fix disassemble foo::bar::~bar References: <87sj4p9xp9.fsf@fleche.redhat.com> <5126B48A.1080903@redhat.com> Date: Fri, 22 Feb 2013 19:15:00 -0000 In-Reply-To: <5126B48A.1080903@redhat.com> (Keith Seitz's message of "Thu, 21 Feb 2013 15:58:02 -0800") Message-ID: <87k3q088iv.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (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: 2013-02/txt/msg00597.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> Another option is to use the c++ name parser: Keith> diff --git a/gdb/valops.c b/gdb/valops.c Keith> index 93c09d8..b006b49 100644 Keith> --- a/gdb/valops.c Keith> +++ b/gdb/valops.c Keith> @@ -3160,7 +3160,7 @@ destructor_name_p (const char *name, struct type Keith> *type) Keith> { Keith> if (name[0] == '~') Keith> { Keith> - const char *dname = type_name_no_tag_or_error (type); Keith> + const char *dname = cp_func_name (type_name_no_tag_or_error (type)); Keith> const char *cp = strchr (dname, '<'); Keith> unsigned int len; Keith> The above patch fixes Doug's test cases and also is regression-free on Keith> native x86_64-unknown-linux (Fedora 15). I tend to think this is preferable. At least, as long as we have to keep destructor_name_p. This patch is ok with me, if it includes Doug's test case, though I'd like to hear from Doug about it as well. Tom