From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3411 invoked by alias); 19 Dec 2001 20:54:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3372 invoked from network); 19 Dec 2001 20:54:15 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 19 Dec 2001 20:54:15 -0000 Received: from redhat.com (totem.toronto.redhat.com [172.16.14.242]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA12925; Wed, 19 Dec 2001 12:54:06 -0800 (PST) Message-ID: <3C20FE6D.B70276C2@redhat.com> Date: Wed, 19 Dec 2001 12:54:00 -0000 From: Fernando Nasser Organization: Red Hat , Inc. - Toronto X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10smp i686) X-Accept-Language: en MIME-Version: 1.0 To: law@redhat.com CC: gdb-patches@sources.redhat.com Subject: Re: constvars.exp & volatile.exp fixes References: <22600.1008793888@porcupine.cygnus.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00483.txt.bz2 OK with me. You can check it in. Fernando law@redhat.com wrote: > > constvars.exp & volatile.exp are failing miserably on the PA when using > GCC. > > The problem is we compile these ".c" files with the C++ compiler. > > This causes names to be mangled, but because we're working with a .c > file, the debugger has set the language to "C", not "C++". Therefore > it does not demangle the names. > > It appears this was done to pacify HP's compilers; particularly since > if you use GCC all these tests ought to pass without problems. > > The fix is pretty obvious. First, we have to get the compiler info > so that we know whether we're using GCC or one of HP's compilers. Once > armed with that information, we can arrange to do the right thing for > whatever compiler we happen to be using. > > With this change, there are no unexpected failures in either test when > using GCC. > > * gdb.base/constvars.exp: Only set lang to c++ if we're > compiling the test with HP's compilers. > * gdb.base/volatile.exp: Similarly. > > Index: constvars.exp > =================================================================== > RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/constvars.exp,v > retrieving revision 1.8 > diff -c -3 -p -r1.8 constvars.exp > *** constvars.exp 2001/09/28 11:46:40 1.8 > --- constvars.exp 2001/12/19 20:26:18 > *************** set testfile "constvars" > *** 41,47 **** > set srcfile ${testfile}.c > set binfile ${objdir}/${subdir}/${testfile} > > ! if [istarget "hppa*-*-*"] { > set lang "c++" > } else { > set lang "" > --- 41,53 ---- > set srcfile ${testfile}.c > set binfile ${objdir}/${subdir}/${testfile} > > ! # Create and source the file that provides information about the compiler > ! # used to compile the test case. > ! if [get_compiler_info ${binfile}] { > ! return -1; > ! } > ! > ! if {$hp_aCC_compiler || $hp_cc_compiler} { > set lang "c++" > } else { > set lang "" > Index: volatile.exp > =================================================================== > RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/volatile.exp,v > retrieving revision 1.6 > diff -c -3 -p -r1.6 volatile.exp > *** volatile.exp 2001/09/28 11:46:40 1.6 > --- volatile.exp 2001/12/19 20:26:18 > *************** set testfile "constvars" > *** 49,55 **** > set srcfile ${testfile}.c > set binfile ${objdir}/${subdir}/${testfile} > > ! if [istarget "hppa*-*-*"] { > set lang "c++" > } else { > set lang "" > --- 49,61 ---- > set srcfile ${testfile}.c > set binfile ${objdir}/${subdir}/${testfile} > > ! # Create and source the file that provides information about the compiler > ! # used to compile the test case. > ! if [get_compiler_info ${binfile}] { > ! return -1; > ! } > ! > ! if {$hp_aCC_compiler || $hp_cc_compiler} { > set lang "c++" > } else { > set lang "" -- Fernando Nasser Red Hat - Toronto E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9