From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21330 invoked by alias); 6 Dec 2005 18:10:36 -0000 Received: (qmail 21323 invoked by uid 22791); 6 Dec 2005 18:10:35 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-02.spheriq.net (HELO fra-del-02.spheriq.net) (195.46.51.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Dec 2005 18:10:33 +0000 Received: from fra-out-01.spheriq.net (fra-out-01.spheriq.net [195.46.51.129]) by fra-del-02.spheriq.net with ESMTP id jB6IAUcC019988 for ; Tue, 6 Dec 2005 18:10:30 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-01.spheriq.net with ESMTP id jB6IATf1004391 for ; Tue, 6 Dec 2005 18:10:29 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id jB6IASUA004549 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 6 Dec 2005 18:10:28 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C245DDA42 for ; Tue, 6 Dec 2005 18:10:27 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 7C1D1474A7; Tue, 6 Dec 2005 18:13:35 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 238CB75995 for ; Tue, 6 Dec 2005 18:13:35 +0000 (UTC) Received: from mail2.gnb.st.com (mail2.gnb.st.com [164.129.119.59]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9C349474A6 for ; Tue, 6 Dec 2005 18:13:34 +0000 (GMT) Received: from st.com (gnx2364.gnb.st.com [164.129.122.218]) by mail2.gnb.st.com (MOS 3.5.8-GR) with ESMTP id CFX80241 (AUTH lyon); Tue, 6 Dec 2005 19:10:26 +0100 (CET) Message-ID: <4395D411.6020904@st.com> Date: Tue, 06 Dec 2005 22:46:00 -0000 From: Christophe LYON User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [RFC] fix testsuite/gdb.cp/printmethod Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00115.txt.bz2 Hi all, As I explained in http://sources.redhat.com/ml/gdb/2005-11/msg00611.html, I think that the gdb.cp/printmethod test somewhat relies on G++ not generating code for the nonvirt() method. I propose the following fix. Christophe. 2005-12-06 Christophe Lyon * gdb.cp/printmethod.cc (main): call virt() and nonvirt() to force code generation for these functions. * gdb.cp/printmethod.exp: expect &A::nonvirt() instead of error message. Index: gdb.cp/printmethod.exp =================================================================== --- gdb.cp/printmethod.exp (revision 96) +++ gdb.cp/printmethod.exp (working copy) @@ -63,7 +63,7 @@ # The first of these is for PR gdb/653. gdb_test "print theA->virt" "\\$\[0-9\]* = &A::virt\\((void|)\\)" "print virtual method." -gdb_test "print theA->nonvirt" "Cannot take address of a method" "print nonvirtual method." +gdb_test "print theA->nonvirt" "\\$\[0-9\]* = &A::nonvirt\\((void|)\\)" "print nonvirtual method." gdb_exit return 0 Index: gdb.cp/printmethod.cc =================================================================== --- gdb.cp/printmethod.cc (revision 96) +++ gdb.cp/printmethod.cc (working copy) @@ -29,6 +29,8 @@ int main() { A *theA = new A; + theA->virt(); + theA->nonvirt(); return 0; // breakpoint: constructs-done }