From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20863 invoked by alias); 10 Jan 2002 19:21:44 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20822 invoked from network); 10 Jan 2002 19:21:43 -0000 Received: from unknown (HELO prospero.cambridge.redhat.com) (62.30.164.150) by sources.redhat.com with SMTP; 10 Jan 2002 19:21:43 -0000 Received: (from jason@localhost) by prospero.cambridge.redhat.com (8.11.6/8.11.6) id g0AJLIp07412; Thu, 10 Jan 2002 19:21:18 GMT X-Authentication-Warning: localhost.localdomain: jason set sender to jason@redhat.com using -f To: Michael Elizabeth Chastain Cc: gdb@sources.redhat.com, fnf@redhat.com Subject: Re: gdb.c++ failures References: <200201101712.LAA18053@duracef.shout.net> From: Jason Merrill In-Reply-To: <200201101712.LAA18053@duracef.shout.net> (Michael Elizabeth Chastain's message of "Thu, 10 Jan 2002 11:12:01 -0600") Date: Thu, 10 Jan 2002 11:21:00 -0000 Message-ID: User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-01/txt/msg00102.txt.bz2 >>>>> "Michael" == Michael Elizabeth Chastain writes: > Jason Merrill writes: >> method.exp: The 'print this' tests are failing because gdb is printing >> the types as, say, (A * const), and the test just wants (A *). The >> former is correct, since 'this' is readonly. Any objection to changing >> the test (and others affected) to allow the const? > Fred Fish submitted a patch for this. Quite so. Fred, it looks good to me. > There is a second issue in the patch about the type of "this" in const > methods. The type should be "const A *", and I would be willing to > accept "const A * const". But gdb with stabs is printing just plain "A > *". The stabs output from gcc ignores const and volatile. There is even a comment saying that "stabs does not distinguish const and volatile". The method qualifiers are described, and gdb could do the work to apply them to the type of 'this', but it's probably fine just to leave it as it is. >> templates.exp: >> Also, the cv-qual placement issue breaks 'print Foo::foo'; >> it needs to be 'print "Foo::foo"' to match the demangler >> output. I take it the aCC demangler makes different choices? I don't >> see any way to get around the dependence of template naming on the >> canonical format chosen by the demangler unless gdb learns to mangle >> names itself; perhaps the syntax of the test should vary with the compiler. > The test script could probe the demangler and then provide whatever > input gdb is using that day. See gdb.c++/cplusfuncs.exp probe_demangler > for an example. Good idea. But is there no way to return a matched string in gdb_expect? Testing for all possible permutations seems rather cumbersome. Jason