From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24862 invoked by alias); 9 Jun 2004 17:46:57 -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 24831 invoked from network); 9 Jun 2004 17:46:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Jun 2004 17:46:56 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i59Hksi7025094 for ; Wed, 9 Jun 2004 13:46:54 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i59Hkn006230; Wed, 9 Jun 2004 13:46:53 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B1C882B9D; Wed, 9 Jun 2004 13:46:43 -0400 (EDT) Message-ID: <40C74D03.1080508@gnu.org> Date: Wed, 09 Jun 2004 17:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com, Michael Elizabeth Chastain Subject: [patch/rfc;testsuite] Append patchlevel to compiler_info Content-Type: multipart/mixed; boundary="------------070205000104010405080506" X-SW-Source: 2004-06/txt/msg00182.txt.bz2 This is a multi-part message in MIME format. --------------070205000104010405080506 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 548 Hello, The attached patch changes the testsuite compiler_info for gcc from: gcc-MAJOR-MINOR e.g., gcc-3-3 to either of: gcc-MAJOR-MINOR-PATCHLEVEL e.g., gcc-3-3-2 gcc-MAJOR-MINOR- e.g., gcc-2-95- dependant on that info being available via __GNUC_PATCHLEVEL__. For the latter, possible alternatives include: gcc-MAJOR-MINOR-__GNUC_PATCHLEVEL__ e.g., gcc-2-95-__GNUC_PATCHLEVEL__ gcc-MAJOR-MINOR e.g., gcc-2-95 Thoughts? Michael? The original motivation for the change is gone but seeing as it is sitting in my sandpit. Andrew --------------070205000104010405080506 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3041 2004-06-09 Andrew Cagney * lib/compiler.cc, lib/compiler.c: Append __GNUC_PATCHLEVEL__ to the compiler_info. * gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-* instead of gcc-3-3. Index: gdb.base/structs.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v retrieving revision 1.20 diff -p -u -r1.20 structs.exp --- gdb.base/structs.exp 9 Jun 2004 17:27:57 -0000 1.20 +++ gdb.base/structs.exp 9 Jun 2004 17:39:08 -0000 @@ -218,8 +218,8 @@ proc test_struct_calls { n } { set tests "call $n ${testfile}" # Call fun${n}, checking the printed return-value. - setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455 - setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455 + setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455 + setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455 gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun(); ${tests}" # Check that GDB can always pass a structure to an inferior function. @@ -230,8 +230,8 @@ proc test_struct_calls { n } { # examining that global to confirm that the value is as expected. gdb_test "call Fun${n}(foo${n})" "" "call Fun(foo); ${tests}" - setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455 - setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455 + setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455 + setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455 gdb_test "p/c L${n}" [foo ${n}] "p/c L; ${tests}" } Index: lib/compiler.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.c,v retrieving revision 1.3 diff -p -u -r1.3 compiler.c --- lib/compiler.c 24 Jan 2004 21:59:03 -0000 1.3 +++ lib/compiler.c 9 Jun 2004 17:39:08 -0000 @@ -37,7 +37,11 @@ set compiler_info "" #if defined (__GNUC__) -set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -] +#if defined (__GNUC_PATCHLEVEL__) +set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -] +#else +set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ ""} -] +#endif set gcc_compiled __GNUC__ #else set gcc_compiled 0 Index: lib/compiler.cc =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v retrieving revision 1.5 diff -p -u -r1.5 compiler.cc --- lib/compiler.cc 24 Jan 2004 21:59:03 -0000 1.5 +++ lib/compiler.cc 9 Jun 2004 17:39:08 -0000 @@ -25,7 +25,11 @@ set compiler_info "" #if defined (__GNUC__) -set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -] +#if defined (__GNUC_PATCHLEVEL__) +set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -] +#else +set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ ""} -] +#endif set gcc_compiled __GNUC__ #else set gcc_compiled 0 --------------070205000104010405080506--