From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8653 invoked by alias); 10 Jan 2002 17:12:09 -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 8599 invoked from network); 10 Jan 2002 17:12:06 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 10 Jan 2002 17:12:06 -0000 Received: (from mec@localhost) by duracef.shout.net (8.8.7/8.8.7) id LAA18053; Thu, 10 Jan 2002 11:12:01 -0600 Date: Thu, 10 Jan 2002 09:12:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200201101712.LAA18053@duracef.shout.net> To: gdb@sources.redhat.com, jason@redhat.com Subject: Re: gdb.c++ failures Cc: fnf@redhat.com X-SW-Source: 2002-01/txt/msg00091.txt.bz2 Jason Merrill writes: > classes.exp: dwarf2 doesn't provide mangled names for abstract > constructors, and there is a difference of opinion between the > demangler and c-typeprint.c as to whether the type should be written "A > const &" or "const A &". The demangler always puts the cv-qualifier > after the type it affects, whereas gdb puts it in front whenever that > would have the correct meaning. Either one could be changed to match > the other, or the testcase could be modified to accept either form. > Thoughts? I'm in favor of changing the test suite to accept either "A const &" or "const A &". > 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. 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 *". On the question of accepting "A * const" as the type of "this", I'm in favor of allowing that. > 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. Michael C