From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27052 invoked by alias); 7 Jan 2004 21:31:05 -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 27045 invoked from network); 7 Jan 2004 21:31:04 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sources.redhat.com with SMTP; 7 Jan 2004 21:31:04 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1AeLGZ-0005nb-00; Wed, 07 Jan 2004 16:31:03 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 4B8C34B35A; Wed, 7 Jan 2004 16:31:33 -0500 (EST) To: ezannoni@redhat.com Subject: [rfa/testsuite/stabs] weird.exp: skip hp Cc: gdb-patches@sources.redhat.com Message-Id: <20040107213133.4B8C34B35A@berman.michael-chastain.com> Date: Wed, 07 Jan 2004 21:31:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-01/txt/msg00172.txt.bz2 This patch fixes weird.exp so that it skips properly on hp-ux. The old code looked at the CC environment variable. The new code looks at hp_cc_compiler and hp_aCC_compiler. This isn't perfect, because we really want to test for the HP assembler, not the HP compiler. If someone is using an HP compiler then of course they are using the HP assembler. But if someone is using gcc with the HP assembler (which is not recommended on hp-ux), then the test script is going to execute. If I detect hp_cc_compiler or hp_aCC_compiler, I issue one UNSUPPORTED message and skip the test script. I also fixed the copyright years by adding years where patches were committed to this file on cvs HEAD. I could do this as a separate patch if you want. Tested on: native i686-pc-linux-gnu, gcc 2.95.3 3.3.2 HEAD, dwarf-2 and stabs+ native hppa2.0w-hp-hpux11.11, hp ansi c Okay to commit? Michael C 2004-01-07 Michael Chastain * gdb.stabs/weird.exp: Use hp_cc_compiler and hp_aCC_compiler to test for hp-ux assembler. Fix copyright years. Index: gdb.stabs/weird.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.stabs/weird.exp,v retrieving revision 1.6 diff -c -3 -p -r1.6 weird.exp *** gdb.stabs/weird.exp 11 Sep 2003 19:09:46 -0000 1.6 --- gdb.stabs/weird.exp 7 Jan 2004 21:18:43 -0000 *************** *** 1,4 **** ! # Copyright 1997, 1998, 1999 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,5 ---- ! # Copyright 1997, 1998, 1999, 2001, 2003, 2004 ! # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** if ![file isdirectory ${objdir}/${subdir *** 33,38 **** --- 34,57 ---- set prms_id 0 set bug_id 0 + set testfile weird + set srcfile ${objdir}/${subdir}/weird.s + set binfile ${objdir}/${subdir}/weirdx.o + + if { [ get_compiler_info "$binfile" ] } { + return -1 + } + + if { $hp_cc_compiler || $hp_aCC_compiler } { + # The native hp-ux assembler does not support stabs at all. + # If the compiler is native hp-ux, of course the assembler is too. + # But if someone builds gcc with the native assembler (not recommended) + # rather than the gnu assembler, then this logic will not suppress it. + # -- chastain 2004-01-07 + unsupported "stabs with HP assembler" + continue + } + proc do_tests {} { global binfile global gdb_prompt *************** proc print_weird_var { var } { *** 236,244 **** # Don't use gdb_load; it doesn't bitch if the loading produced some # error messages during symbol reading. - set testfile weird - set srcfile ${objdir}/${subdir}/weird.s - set binfile ${objdir}/${subdir}/weirdx.o global target_os set sedscript ${srcdir}/${subdir}/aout.sed --- 255,260 ---- *************** switch -glob ${target_triplet} { *** 266,284 **** } } - # Hope this is a Unix box. set exec_output [remote_exec build "sed" "-f ${sedscript}" "${srcdir}/${subdir}/weird.def" "${srcfile}"] if { [lindex $exec_output 0] != 0 } { perror "Couldn't make test case. $exec_output" return -1 } - - # HP's assembler has no idea of what to do with .stab directives; detect the - # use of HP compilers and escape from here. (No doubt a better heuristic - # could be devised.) - - if { [ info exists CC ] && [ string first "/opt/ansic/bin/cc" "$CC" ] >= 0 } then { continue } if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." --- 282,293 ----